CRPropa / CRPropa3

CRPropa is a public astrophysical simulation framework for propagating extraterrestrial ultra-high energy particles. https://crpropa.github.io/CRPropa3/
https://crpropa.desy.de
GNU General Public License v3.0
68 stars 67 forks source link

CRPropa3.1.7 installation in macOS 12.3.1 #390

Closed antoniocapanema closed 2 years ago

antoniocapanema commented 2 years ago

Dear developers,

I have problems installing CRPropa on my system System Information:

I installed version 3.1.7 from git.

I read and followed the installation instructions at https://crpropa.github.io/CRPropa3/ . Before writing this request I also checked previous installation issues at https://github.com/CRPropa/CRPropa3/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Ainstallation+ . However, I could not find the solution to my problem.

After cmake is complete, upon running the "make" command, I get the following error at error at 74% progress:

[ 74%] Linking CXX shared library libcrpropa.dylib ld: library not found for -lprofiler clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [libcrpropa.dylib] Error 1 make[1]: [CMakeFiles/crpropa.dir/all] Error 2 make: *** [all] Error 2

Thank you for any assistance you can give. Best, Antonio

lukasmerten commented 2 years ago

Hi @antoniocapanema there seems to be a problem linking google perftools on MacOS; compare #372 and #236.

In case you do not need them try to the following cmake command: cmake .. -DNO_TCMALLOC=TRUE

antoniocapanema commented 2 years ago

Hi @lukasmerten, Thank you so much for your prompt reply. I was able to bypass this issue with the flag -DNO_TCMALLOC=TRUE. However, I ran into another issue a little further ahead during the "make" stage:


[ 88%] Linking CXX shared module _crpropa.so Undefined symbols for architecture arm64: "_PyBytes_AsStringAndSize", referenced from: SWIG_AsCharPtrAndSize(_object*, char, unsigned long, int) in crpropa_wrap.cxx.o "_PyCMethod_New", referenced from: SWIG_PyInstanceMethod_New(_object, _object) in crpropa_wrap.cxx.o "_PyInstanceMethod_New", referenced from: SWIG_PyInstanceMethod_New(_object, _object) in crpropa_wrap.cxx.o "_PyModule_Create2", referenced from: _PyInitcrpropa in crpropa_wrap.cxx.o "_PySlice_AdjustIndices", referenced from: crpropa_ParticleCollector_getitem__SWIG_1(crpropa::ParticleCollector, _object) in crpropa_wrap.cxx.o "_PySlice_Unpack", referenced from: crpropaParticleCollectorgetitem__SWIG_1(crpropa::ParticleCollector, _object) in crpropa_wrap.cxx.o "_PyUnicode_AsUTF8", referenced from: SWIG_Python_AddErrorMsg(char const*) in crpropa_wrap.cxx.o crpropa_Candidate_setPropertySWIG_1(crpropa::Candidate, _object, _object) in crpropa_wrap.cxx.o crpropa_Candidate_getProperty(crpropa::Candidate, _object) in crpropa_wrap.cxx.o crpropa_Output_enableProperty__SWIG_0(crpropa::Output, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, _object, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in crpropa_wrap.cxx.o "_PyUnicode_AsUTF8String", referenced from: SWIG_AsCharPtrAndSize(_object, char*, unsigned long, int) in crpropa_wrap.cxx.o "_PyUnicode_Concat", referenced from: SwigPyObject_repr(SwigPyObject) in crpropa_wrap.cxx.o swig_varlink_str(swig_varlinkobject) in crpropa_wrap.cxx.o "_PyUnicode_DecodeUTF8", referenced from: Swig_var_g_GIT_SHA1_get() in crpropa_wrap.cxx.o Swig_var_g_GIT_REFSPEC_get() in crpropa_wrap.cxx.o Swig_var_g_GIT_DESC_get() in crpropa_wrap.cxx.o _wrap_getDataPath(_object, _object) in crpropa_wrap.cxx.o _wrap_getInstallPrefix(_object, _object) in crpropa_wrap.cxx.o _wrap_convertIdToName(_object, _object) in crpropa_wrap.cxx.o _wrap_particleName(_object, _object) in crpropa_wrap.cxx.o ... "_PyUnicode_FromFormat", referenced from: SWIG_Python_RaiseOrModifyTypeError(char const) in crpropa_wrap.cxx.o SwigPyPacked_repr(SwigPyPacked) in crpropa_wrap.cxx.o SwigPyPacked_str(SwigPyPacked) in crpropa_wrap.cxx.o SwigPyObject_repr(SwigPyObject) in crpropa_wrap.cxx.o SwigPyStaticVar_repr(PyGetSetDescrObject) in crpropa_wrap.cxx.o "_PyUnicode_FromString", referenced from: SwigDirector_Surface::distance(crpropa::Vector3 const&) const in crpropa_wrap.cxx.o SWIG_Python_NewPointerObj(_object, void, swig_type_info, int) in crpropa_wrap.cxx.o SwigDirector_Surface::normal(crpropa::Vector3 const&) const in crpropa_wrap.cxx.o SwigDirector_Surface::getDescription() const in crpropa_wrap.cxx.o SwigDirector_Module::getDescription() const in crpropa_wrap.cxx.o SwigDirector_Module::process(crpropa::Candidate) const in crpropa_wrap.cxx.o SwigDirector_AbstractCondition::getDescription() const in crpropa_wrap.cxx.o ... "_PyUnicode_InternFromString", referenced from: _PyInit__crpropa in crpropa_wrap.cxx.o swig_varlink_repr(swig_varlinkobject) in crpropa_wrap.cxx.o swig_varlink_str(swig_varlinkobject) in crpropa_wrap.cxx.o "__Py_Dealloc", referenced from: Swig::Director::~Director() in crpropa_wrap.cxx.o SwigDirector_Surface::distance(crpropa::Vector3 const&) const in crpropa_wrap.cxx.o SWIG_Python_NewPointerObj(_object, void, swig_type_info, int) in crpropa_wrap.cxx.o SwigDirector_Surface::normal(crpropa::Vector3 const&) const in crpropa_wrap.cxx.o SWIG_Python_ConvertPtrAndOwn(_object, void, swig_type_info, int, int) in crpropa_wrap.cxx.o SwigDirector_Surface::getDescription() const in crpropa_wrap.cxx.o SwigDirector_Module::getDescription() const in crpropa_wrap.cxx.o ... "__Py_FalseStruct", referenced from: crpropa_Candidate_getProperty(crpropa::Candidate, _object) in crpropa_wrap.cxx.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [_crpropa.so] Error 1 make[1]: [CMakeFiles/crpropa-swig.dir/all] Error 2 make: *** [all] Error 2


As far as I could find, there was no similar error reported in this forum. Any help will be greatly appreciated!

Best, Antonio

EDIT: I made a mistake when specifying the exact paths of the python library and interpreter in the CMAKE step. I have solved this problem.

JulienDoerner commented 2 years ago

As the problem is solved I close the issue now. If there are further problems please reopen the issue.