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
65 stars 66 forks source link

problem with Installation in python virtualenv #423

Closed BerenikaCermak closed 1 year ago

BerenikaCermak commented 1 year ago

Dear developers,

I have problems installing CRPropa on my system

I installed version 3.2 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, this did not work. I received the following error:

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

which was fixed with -DNO_TCMALLOC=TRUE.

But then when following the steps for Installation in python virtualenv, it failed at ./configure --prefix=$CRPROPA_DIR giving: zsh: no such file or directory: ./configure

Could you kindly tell me, what should be the next step?

Thank you!

reichherzerp commented 1 year ago

Hi @BerenikaCermak, does the make install command work when you skip the ./configure step? In general, we updated the installation instructions for mac OS, but the changes are not yet merged into the master branch (open pull request #420). You can find the improved installation guide already here: https://github.com/lukasmerten/CRPropa3/blob/documentation/doc/pages/Installation.md

Please tell us if it works. Thank you!

adundovi commented 1 year ago

Hi @BerenikaCermak,

ld: library not found for -lprofiler says that you miss gperftools. Install it following this, or disable it with ccmake since it is not a required library.

For the ./configure step -- depends on which library you want to install - we just described a general guidance: "Check the dependencies (see dependencies for details) and install at least mandatory ones. This can be done with package managers (see the package list in different OSes). If packages are installed from source, during the compilation the installation prefix should be specified:" But I suggest that you use only homebrew if you need to install something on Mac (like gperftools above).

BerenikaCermak commented 1 year ago

Hello again,

I tried both @reichherzerp, and @adundovi. I started from scratch, installing CRPropa and I got some errors after skipping the ./configure part (make and make install worked) at the part 4. of installation with python virtualenv.

For: (crpropa) berenikacermakova@watz196d build % CMAKE_PREFIX_PATH=$CRPROPA_DIR cmake -DCMAKE_INSTALL_PREFIX=$CRPROPA_DIR -DNO_TCMALLOC=TRUE ..

and then make I got: 1 warning generated. [ 34%] Linking CXX shared library libcrpropa.dylib ld: warning: could not create compact unwind for ef.part.0: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for crossection: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for _proctwopart: register 28 saved somewhere other than in frame ld: warning: could not create compact unwind for _resdecay3: registers 25 and 26 not saved contiguously in frame ld: warning: could not create compact unwind for _decproc2: register 26 saved somewhere other than in frame ld: warning: could not create compact unwind for _decres2: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for _checkevent: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for decpar: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for decsib: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for _lundput: registers 21 and 22 not saved contiguously in frame ld: warning: could not create compact unwind for _porndgam: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for _poselsx2: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for valences: registers 21 and 22 not saved contiguously in frame ld: warning: could not create compact unwind for ulangl: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for ulmass: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for plu: register 22 saved somewhere other than in frame ld: warning: could not create compact unwind for _lundget: registers 25 and 26 not saved contiguously in frame ld: warning: could not create compact unwind for luerrm: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for master.0.lurobo: registers 76 and 77 not saved contiguously in frame ld: warning: could not create compact unwind for luedit: registers 19 and 20 not saved contiguously in frame ld: warning: could not create compact unwind for lujoin: register 24 saved somewhere other than in frame ld: warning: could not create compact unwind for luboei: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for lukfdi: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for luzdis: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for luptdi: register 73 saved somewhere other than in frame ld: warning: could not create compact unwind for luindf: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for lustrf: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for luprep: registers 76 and 77 not saved contiguously in frame ld: warning: could not create compact unwind for lushow: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for ludecy: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for luexec: register 79 saved somewhere other than in frame ld: warning: could not create compact unwind for _lundfrag: register 22 saved somewhere other than in frame ld: warning: could not create compact unwind for _gammah: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for lutaud: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for _decinter3: register 28 saved somewhere other than in frame ld: warning: could not create compact unwind for eventgen: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for sophiaevent: register 28 saved somewhere other than in frame ld: warning: could not create compact unwind for _emutls_getaddress: registers 23 and 24 not saved contiguously in frame ld: warning: could not create compact unwind for multc3: registers 19 and 20 not saved contiguously in frame ld: warning: could not create compact unwind for divtc3: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for eprintf: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for floattisf: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for floattidf: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixtfsi: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixunstfsi: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixtfdi: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixunstfdi: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixtfti: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixunstfti: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for trunctfsf2: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for trunctfdf2: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for _trunctfhf2: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for _allocate_tramp_ctrl: register 22 saved somewhere other than in frame ld: warning: could not create compact unwind for ___builtin_nested_func_ptrcreated: register 26 saved somewhere other than in frame ld: warning: could not create compact unwind for builtin_nested_func_ptr_deleted: register 22 saved somewhere other than in frame ld: warning: could not create compact unwind for ___enable_execute_stack: registers 19 and 20 not saved contiguously in frame [ 74%] Built target crpropa Deprecated command line option: -py3. Ignored, this option is no longer supported. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/Random.h:95: Warning 560: Unknown Doxygen command: writeme. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:86: Warning 560: Unknown Doxygen command: f$l. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:86: Warning 560: Unknown Doxygen command: rm. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:86: Warning 560: Unknown Doxygen command: int. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:86: Warning 560: Unknown Doxygen command: infty. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:87: Warning 560: Unknown Doxygen command: langleB. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:87: Warning 560: Unknown Doxygen command: rangle$. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Observer.h:294: Warning 564: Error parsing Doxygen command param: No word followed the command. Command ignored. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Observer.h:302: Warning 564: Error parsing Doxygen command param: No word followed the command. Command ignored. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Acceleration.h:126: Warning 560: Unknown Doxygen command: f$E. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Acceleration.h:131: Warning 560: Unknown Doxygen command: f$R. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Acceleration.h:131: Warning 560: Unknown Doxygen command: frac{E}{B. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Acceleration.h:140: Warning 562: Expected Doxygen command: f$. [ 74%] Built target crpropa-swig-wrapper Consolidate compiler generated dependencies of target crpropa-swig [ 75%] Building CXX object CMakeFiles/crpropa-swig.dir/crpropa_wrap.cxx.o /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5610:5: error: unknown type name 'npy_intp' npy_intp shape[1]; ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5613:34: error: use of undeclared identifier 'NPY_SIZEOF_FLOAT' if (sizeof(self->data[0]) == NPY_SIZEOF_FLOAT) ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5615:48: error: use of undeclared identifier 'NPY_FLOAT' ro = PyArray_SimpleNewFromData(1, shape, NPY_FLOAT, self->data); ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5617:39: error: use of undeclared identifier 'NPY_SIZEOF_DOUBLE' else if (sizeof(self->data[0]) == NPY_SIZEOF_DOUBLE) ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5619:48: error: use of undeclared identifier 'NPY_DOUBLE' ro = PyArray_SimpleNewFromData(1, shape, NPY_DOUBLE, self->data); ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5666:5: error: unknown type name 'npy_intp' npy_intp shape[1]; ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5669:34: error: use of undeclared identifier 'NPY_SIZEOF_FLOAT' if (sizeof(self->data[0]) == NPY_SIZEOF_FLOAT) ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5671:48: error: use of undeclared identifier 'NPY_FLOAT' ro = PyArray_SimpleNewFromData(1, shape, NPY_FLOAT, self->data); ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5673:39: error: use of undeclared identifier 'NPY_SIZEOF_DOUBLE' else if (sizeof(self->data[0]) == NPY_SIZEOF_DOUBLE) ^ /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:5675:48: error: use of undeclared identifier 'NPY_DOUBLE' ro = PyArray_SimpleNewFromData(1, shape, NPY_DOUBLE, self->data); ^ 10 errors generated. make[2]: [CMakeFiles/crpropa-swig.dir/crpropa_wrap.cxx.o] Error 1 make[1]: [CMakeFiles/crpropa-swig.dir/all] Error 2 make: *** [all] Error 2

and for: (crpropa) berenikacermakova@watz196d build % CMAKE_PREFIX_PATH=$CRPROPA_DIR cmake -DCMAKE_INSTALL_PREFIX=$CRPROPA_DIR \ -DPYTHON_EXECUTABLE=/usr/local/Cellar/python/3.7.4/bin/python3 \ -DPYTHON_LIBRARY=/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib \ ..

and then make I got: [ 74%] Linking CXX shared library libcrpropa.dylib ld: warning: could not create compact unwind for ef.part.0: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for crossection: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for _proctwopart: register 28 saved somewhere other than in frame ld: warning: could not create compact unwind for _resdecay3: registers 25 and 26 not saved contiguously in frame ld: warning: could not create compact unwind for _decproc2: register 26 saved somewhere other than in frame ld: warning: could not create compact unwind for _decres2: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for _checkevent: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for decpar: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for decsib: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for _lundput: registers 21 and 22 not saved contiguously in frame ld: warning: could not create compact unwind for _porndgam: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for _poselsx2: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for valences: registers 21 and 22 not saved contiguously in frame ld: warning: could not create compact unwind for ulangl: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for ulmass: registers 72 and 73 not saved contiguously in frame ld: warning: could not create compact unwind for plu: register 22 saved somewhere other than in frame ld: warning: could not create compact unwind for _lundget: registers 25 and 26 not saved contiguously in frame ld: warning: could not create compact unwind for luerrm: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for master.0.lurobo: registers 76 and 77 not saved contiguously in frame ld: warning: could not create compact unwind for luedit: registers 19 and 20 not saved contiguously in frame ld: warning: could not create compact unwind for lujoin: register 24 saved somewhere other than in frame ld: warning: could not create compact unwind for luboei: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for lukfdi: registers 27 and 28 not saved contiguously in frame ld: warning: could not create compact unwind for luzdis: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for luptdi: register 73 saved somewhere other than in frame ld: warning: could not create compact unwind for luindf: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for lustrf: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for luprep: registers 76 and 77 not saved contiguously in frame ld: warning: could not create compact unwind for lushow: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for ludecy: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for luexec: register 79 saved somewhere other than in frame ld: warning: could not create compact unwind for _lundfrag: register 22 saved somewhere other than in frame ld: warning: could not create compact unwind for _gammah: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for lutaud: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for _decinter3: register 28 saved somewhere other than in frame ld: warning: could not create compact unwind for eventgen: registers 78 and 79 not saved contiguously in frame ld: warning: could not create compact unwind for sophiaevent: register 28 saved somewhere other than in frame ld: warning: could not create compact unwind for _emutls_getaddress: registers 23 and 24 not saved contiguously in frame ld: warning: could not create compact unwind for multc3: registers 19 and 20 not saved contiguously in frame ld: warning: could not create compact unwind for divtc3: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for eprintf: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for floattisf: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for floattidf: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixtfsi: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixunstfsi: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixtfdi: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixunstfdi: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixtfti: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for fixunstfti: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for trunctfsf2: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for trunctfdf2: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for _trunctfhf2: register 20 saved somewhere other than in frame ld: warning: could not create compact unwind for _allocate_tramp_ctrl: register 22 saved somewhere other than in frame ld: warning: could not create compact unwind for ___builtin_nested_func_ptrcreated: register 26 saved somewhere other than in frame ld: warning: could not create compact unwind for builtin_nested_func_ptr_deleted: register 22 saved somewhere other than in frame ld: warning: could not create compact unwind for ___enable_execute_stack: registers 19 and 20 not saved contiguously in frame [ 74%] Built target crpropa Deprecated command line option: -py3. Ignored, this option is no longer supported. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/Random.h:95: Warning 560: Unknown Doxygen command: writeme. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:86: Warning 560: Unknown Doxygen command: f$l. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:86: Warning 560: Unknown Doxygen command: rm. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:86: Warning 560: Unknown Doxygen command: int. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:86: Warning 560: Unknown Doxygen command: infty. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:87: Warning 560: Unknown Doxygen command: langleB. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/magneticField/turbulentField/TurbulentField.h:87: Warning 560: Unknown Doxygen command: rangle$. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Observer.h:294: Warning 564: Error parsing Doxygen command param: No word followed the command. Command ignored. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Observer.h:302: Warning 564: Error parsing Doxygen command param: No word followed the command. Command ignored. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Acceleration.h:126: Warning 560: Unknown Doxygen command: f$E. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Acceleration.h:131: Warning 560: Unknown Doxygen command: f$R. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Acceleration.h:131: Warning 560: Unknown Doxygen command: frac{E}{B. /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/include/crpropa/module/Acceleration.h:140: Warning 562: Expected Doxygen command: f$. [ 74%] Built target crpropa-swig-wrapper [ 75%] Building CXX object CMakeFiles/crpropa-swig.dir/crpropa_wrap.cxx.o /Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/crpropa_wrap.cxx:171:11: fatal error: 'Python.h' file not found

include

      ^~~~~~~~~~

1 error generated. make[2]: [CMakeFiles/crpropa-swig.dir/crpropa_wrap.cxx.o] Error 1 make[1]: [CMakeFiles/crpropa-swig.dir/all] Error 2 make: *** [all] Error 2

Thank you kindly for your time, Berenika

reichherzerp commented 1 year ago

Could you please type ccmake .. in your build folder and press t and check that the paths are set correctly?

I can share some of my paths so that you can compare: CMAKE_C_COMPILER /opt/homebrew/Cellar/llvm/15.0.7_1/bin/clang CMAKE_C_COMPILER_AR /opt/homebrew/Cellar/llvm/15.0.7_1/bin/llvm-ar
CMAKE_C_COMPILER_RANLIB /opt/homebrew/Cellar/llvm/15.0.7_1/bin/llvm-ranlib CMAKE_Fortran_COMPILER /opt/homebrew/bin/gfortran
CMAKE_Fortran_COMPILER_AR /opt/homebrew/bin/gcc-ar-12
CMAKE_Fortran_COMPILER_RANLIB /opt/homebrew/bin/gcc-ranlib-12 PYTHON_EXECUTABLE /opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/bin/python3.10
PYTHON_H_FOUND /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Headers/Python.h
PYTHON_INCLUDE_DIR /opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/include/python3.10
PYTHON_LIBRARY /opt/homebrew/Cellar/python@3.10/3.10.9/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib

BerenikaCermak commented 1 year ago

the paths seem to be ok:

CMAKE_C_COMPILER /Library/Developer/CommandLineTools/usr/bin/cc
CMAKE_Fortran_COMPILER /opt/homebrew/bin/gfortran
CMAKE_Fortran_COMPILER_AR /opt/homebrew/bin/gcc-ar-12
CMAKE_Fortran_COMPILER_RANLIB /opt/homebrew/bin/gcc-ranlib-12
PYTHON_EXECUTABLE /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10
PYTHON_H_FOUND /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Headers/Python.h
PYTHON_INCLUDE_DIR /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10
PYTHON_LIBRARY /Library/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib

but for some reason, I'm missing the CMAKE_C_COMPILER_AR and CMAKE_C_COMPILER_RANLIB

I also tried the installation with ubuntu, but the problem is still the same. The installation at virtualenv stops at the "make" step after ./configure --prefix=$CRPROPA_DIR

BerenikaCermak commented 1 year ago

Here are there errors I'm getting on ubuntu:

(crpropa) berenika@ubuntuonmac:~/.virtualenvs/crpropa/CRPropa3/build$ CMAKE_PREFIX_PATH=$CRPROPA_DIR cmake -DCMAKE_INSTALL_PREFIX=$CRPROPA_DIR .. CMake Deprecation Warning at CMakeLists.txt:7 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Use --as-needed linker flags! With SIMD_EXTENSIONS "none" tricubic interpolation of vector grids is not possible. You should set SIMD_EXTENSION to a compatible value ("avx", "avx+fma", or -- depending on the build CPU -- "native"). Trilinear interpolation is still possible. -- Build Type: Release -- CRPropa version: 3.2-92-g9ce9fc9a 9ce9fc9a4541a9cc9723d053c02a96ede1476af9 refs/heads/master CMake Deprecation Warning at libs/gtest/CMakeLists.txt:20 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at libs/kiss/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at libs/HepPID/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at libs/sophia/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at libs/dint/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at libs/EleCa/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

Using provided EIGEN CMake Deprecation Warning at libs/healpix_base/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Google perftools: NOT Found! -- Include: GOOGLE_PERFTOOLS_INCLUDE_DIR-NOTFOUND -- FFTW3 with single precision (FFTW3F): NOT Found! -- Include: FFTW3F_INCLUDE_DIR-NOTFOUND -- Library: FFTW3F_LIBRARY-NOTFOUND -- Quimby: NOT Found! -- Include: QUIMBY_INCLUDE_DIR-NOTFOUND -- Library: QUIMBY_LIBRARY-NOTFOUND -- SAGA: NOT Found! -- Include: SAGA_INCLUDE_DIR-NOTFOUND -- Library: SAGA_LIBRARY-NOTFOUND -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- muParser: Found! -- Include: /usr/include -- Library: /usr/lib/aarch64-linux-gnu/libmuparser.so -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C) (found version "") -- Use absolute RPATH /home/berenika/.virtualenvs/crpropa/lib -- Downloading data file from crpropa.desy.de ~ 65 MB -- Extracting data file Error copying directory from "/home/berenika/.virtualenvs/crpropa/CRPropa3/build/data-2022-07-06/data" to "/home/berenika/.virtualenvs/crpropa/CRPropa3/build/data/". -- Build of documentation disabeled. Enable with BUILD_DOC=On CMake Error at python/Python.cmake:19 (MESSAGE): Python.h not found Call Stack (most recent call first): CMakeLists.txt:480 (include)

-- Python: Found! -- Version: ./ -- Executeable: /usr/local/Cellar/python/3.7.4/bin/python3 -- Include:
-- Library: /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib -- Site-package directory: -- Numpy not found. -- Configuring incomplete, errors occurred! See also "/home/berenika/.virtualenvs/crpropa/CRPropa3/build/CMakeFiles/CMakeOutput.log".

I don't understand why numpy is not found, because it's installed, same for all the prerequisites. Probably some beginner's mistake, but do you have any idea what is wrong? Thank you!

lukasmerten commented 1 year ago

If you installed numpy but it is not found by CRPropa, it is likely due to different python versions. Make sure numpy is installed in that python version, which is found by CRPropa.

Same goes for the other prerequisits: If they are not found automatically, you can provide their paths manually during the configuration step.

BerenikaCermak commented 1 year ago

@lukasmerten thank you, I'll try to reinstall that. But do you have any idea what might cause the error on Mac? @reichherzerp (https://github.com/CRPropa/CRPropa3/issues/423#issuecomment-1449776551) The paths seem to be alright. Thanks a lot!

lukasmerten commented 1 year ago

I have no access to a MacOS. Maybe @reichherzerp, @LeanderSchlegel, or @sophieaerdker can help.

reichherzerp commented 1 year ago

I just tested if it may be related to the missing parameters CMAKE_C_COMPILER_AR and CMAKE_C_COMPILER_RANLIB, but even with empty entries, it works for me on mac. You check if there are some packages missing by going to your build folder and input ccmake .. followed by c (configure). I remember that I had some issues, when Goolge perftools was not installed. So you want to find the message "Google perftools: Found!" in the configure output.

BerenikaCermak commented 1 year ago

@reichherzerp thank you for the quick response. I followed your instruction and I got this:

Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) (found version "4.5") Google perftools: Found! Include: /opt/homebrew/include FFTW3 with single precision (FFTW3F): Found! Include: /usr/local/include Library: /opt/homebrew/lib/libfftw3f.dylib Quimby: NOT Found! Include: QUIMBY_INCLUDE_DIR-NOTFOUND Library: QUIMBY_LIBRARY-NOTFOUND SAGA: NOT Found! Include: SAGA_INCLUDE_DIR-NOTFOUND Library: SAGA_LIBRARY-NOTFOUND muParser: Found! Include: /usr/local/include Library: /usr/local/lib/libmuparser.dylib Use absolute RPATH /Users/berenikacermakova/.virtualenvs/crpropa/lib -- Downloading data file from crpropa.desy.de ~ 65 MB -- Extracting data file Error copying directory from "/Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/data-2022-07-06/data" to "/Users/berenikacermakova/.virtualenvs/crpropa/CRPropa3/build/data/". Build of documentation disabeled. Enable with BUILD_DOC=On Using user provided Python library: /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib Python: Found! Version: ./ Executeable: /usr/local/Cellar/python/3.7.4/bin/python3 Include: Library: /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib Site-package directory: Numpy not found. Configuring done

So it seems the problem shouldn't be the google perftools... I also don't understand why it cannot find numpy. The version should be ok (I have python 3.10.1 and numpy 1.24.0)

reichherzerp commented 1 year ago

Okay, that looks good, except for the missing numpy package. However, the output says that you are currently using Python 3.7.4 and not 3.10.1, where numpy is installed. So you either you switch the used version to python 3.10.1 or install numpy to the version 3.7.4 that you currently use.

BerenikaCermak commented 1 year ago

I installed numpy 1.21.4, which should work with python 3.7, but I'm still getting "Numpy not found". I'm also a bit confused why am I using python 3.7 (based on the output) if after python3 --version I get 3.10.1

reichherzerp commented 1 year ago

When you do the installation and check the python version etc., you are in the virtual environment, right? As far as I understand, you use the python version that you specify via the Python-related parameters in cmake. To check which one you select, you can check all parameters by typing ccmake .. in the build folder and press t (Toggle advanced mode). There you should have then your 3.10.1 python version listed (this is the case as you report in your above comment). Not sure about the mismatch when you then press configure. Maybe @JulienDoerner you know how to resolve this issue?

BerenikaCermak commented 1 year ago

The problem was in the paths. After switching to python 3.10, it works :) thank you!