GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » [FIXED] LmdFit does not compile on MAC
[FIXED] LmdFit does not compile on MAC [message #14687] Thu, 02 May 2013 12:36 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Dear all,
I noticed that the package LmdFit does not compile on my mac:

/.../trunk/lmd/LmdFit/ModelPar.h:28:17: error: no member named 'shared_ptr' in namespace 'std'

  std::set<std::shared_ptr<ModelPar>> connections;
           ~~~~~^


This is due mainly to the usage of shared_ptr... it seems that under linux it is inside std::shared_ptr, while under mac it sits on std::tr1::shared_ptr. If I modify the call adding tr1 then it works on mac, but not on linux.

Another strange thing I found is that in ModelParSet the following function is private:

class ModelParSet {
  private:
    /**
     * Small structure defining the comparison operator used in the map
     * #model_par_map. Will return true only if this model parameter is equal to
     * the parameter. It is used when concatenating multiple ModelPar objects to
     * avoid having multiple instances of the same parameter. The check is based
     * on a name comparison.
     */
    struct stringcomp {
        bool operator()(const std::string& lhs, const std::string& rhs) const {
          return lhs.compare(rhs) < 0;
        }
    };


but it is used in ModelParameterHandler.cxx. In this case one has to move the function to public in order to compile.

Another problem under MAC:

[ 57%] Building CXX object lmd/CMakeFiles/Model.dir/LmdFit/Model.cxx.o

cc1plus: error: unrecognized command line option "-std=c++0x"


Is is really needed the flag c++0x? All the other packages do not have it. What's the reason?


Is it possible to fix this package so that it compiles also under Mac?

However, it seems the package does not follow the pandaroot coding rules. If this is only for group anayses maybe it would be better to put it under development so that the main compilation is not affected.

[Updated on: Thu, 04 July 2013 12:44]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FIXED] Error in running in macro runLumi2Reco.C
Next Topic: [INFO] RHO Update done
Goto Forum:
  


Current Time: Wed Jul 24 12:18:10 CEST 2024

Total time taken to generate the page: 0.00815 seconds