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 during make #430

Closed leigui closed 1 year ago

leigui commented 1 year ago

Dear developers,

I have problems installing CRPropa on my system System Information: (Please fill out the following information)

**Did you install CRPropa from git or download a release? I installed version 3-3.2 from the releases.

Things that I tried before asking for help: 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 receive the following output:

Scanning dependencies of target crpropa-swig [ 86%] Building CXX object CMakeFiles/crpropa-swig.dir/crpropa_wrap.cxx.o /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx: In function ‘PyObject crpropa_Vector3_Sl_double_Sg__array(crpropa::Vector3)’: /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5600:5: error: ‘npy_intp’ was not declared in this scope npy_intp shape[1]; ^~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5600:5: note: suggested alternative: ‘wprintf’ npy_intp shape[1]; ^~~~ wprintf /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5601:5: error: ‘shape’ was not declared in this scope shape[0] = 3; ^~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5601:5: note: suggested alternative: ‘unshare’ shape[0] = 3; ^~~~~ unshare /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5603:34: error: ‘NPY_SIZEOF_FLOAT’ was not declared in this scope if (sizeof(self->data[0]) == NPY_SIZEOF_FLOAT) ^~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5603:34: note: suggested alternative: ‘H5_SIZEOF_FLOAT’ if (sizeof(self->data[0]) == NPY_SIZEOF_FLOAT) ^~~~ H5_SIZEOF_FLOAT /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5605:48: error: ‘NPY_FLOAT’ was not declared in this scope ro = PyArray_SimpleNewFromData(1, shape, NPY_FLOAT, self->data); ^~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5605:48: note: suggested alternative: ‘MAXFLOAT’ ro = PyArray_SimpleNewFromData(1, shape, NPY_FLOAT, self->data); ^~~~~ MAXFLOAT /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5605:12: error: ‘PyArray_SimpleNewFromData’ was not declared in this scope ro = PyArray_SimpleNewFromData(1, shape, NPY_FLOAT, self->data); ^~~~~~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5607:39: error: ‘NPY_SIZEOF_DOUBLE’ was not declared in this scope else if (sizeof(self->data[0]) == NPY_SIZEOF_DOUBLE) ^~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5607:39: note: suggested alternative: ‘H5_SIZEOF_DOUBLE’ else if (sizeof(self->data[0]) == NPY_SIZEOF_DOUBLE) ^~~~~ H5_SIZEOF_DOUBLE /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5609:48: error: ‘NPY_DOUBLE’ was not declared in this scope ro = PyArray_SimpleNewFromData(1, shape, NPY_DOUBLE, self->data); ^~~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5609:48: note: suggested alternative: ‘_PC_VDISABLE’ ro = PyArray_SimpleNewFromData(1, shape, NPY_DOUBLE, self->data); ^~~~~~ _PC_VDISABLE /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5609:12: error: ‘PyArray_SimpleNewFromData’ was not declared in this scope ro = PyArray_SimpleNewFromData(1, shape, NPY_DOUBLE, self->data); ^~~~~~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx: In function ‘PyObject crpropa_Vector3_Sl_float_Sg__array(crpropa::Vector3)’: /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5656:5: error: ‘npy_intp’ was not declared in this scope npy_intp shape[1]; ^~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5656:5: note: suggested alternative: ‘wprintf’ npy_intp shape[1]; ^~~~ wprintf /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5657:5: error: ‘shape’ was not declared in this scope shape[0] = 3; ^~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5657:5: note: suggested alternative: ‘unshare’ shape[0] = 3; ^~~~~ unshare /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5659:34: error: ‘NPY_SIZEOF_FLOAT’ was not declared in this scope if (sizeof(self->data[0]) == NPY_SIZEOF_FLOAT) ^~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5659:34: note: suggested alternative: ‘H5_SIZEOF_FLOAT’ if (sizeof(self->data[0]) == NPY_SIZEOF_FLOAT) ^~~~ H5_SIZEOF_FLOAT /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5661:48: error: ‘NPY_FLOAT’ was not declared in this scope ro = PyArray_SimpleNewFromData(1, shape, NPY_FLOAT, self->data); ^~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5661:48: note: suggested alternative: ‘MAXFLOAT’ ro = PyArray_SimpleNewFromData(1, shape, NPY_FLOAT, self->data); ^~~~~ MAXFLOAT /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5661:12: error: ‘PyArray_SimpleNewFromData’ was not declared in this scope ro = PyArray_SimpleNewFromData(1, shape, NPY_FLOAT, self->data); ^~~~~~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5663:39: error: ‘NPY_SIZEOF_DOUBLE’ was not declared in this scope else if (sizeof(self->data[0]) == NPY_SIZEOF_DOUBLE) ^~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5663:39: note: suggested alternative: ‘H5_SIZEOF_DOUBLE’ else if (sizeof(self->data[0]) == NPY_SIZEOF_DOUBLE) ^~~~~ H5_SIZEOF_DOUBLE /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5665:48: error: ‘NPY_DOUBLE’ was not declared in this scope ro = PyArray_SimpleNewFromData(1, shape, NPY_DOUBLE, self->data); ^~~~~~ /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5665:48: note: suggested alternative: ‘_PC_VDISABLE’ ro = PyArray_SimpleNewFromData(1, shape, NPY_DOUBLE, self->data); ^~~~~~ _PC_VDISABLE /home/leigui/CRPropa3-3.2/build/crpropa_wrap.cxx:5665:12: error: ‘PyArray_SimpleNewFromData’ was not declared in this scope ro = PyArray_SimpleNewFromData(1, shape, NPY_DOUBLE, self->data); ^~~~~~~~~ CMakeFiles/crpropa-swig.dir/build.make:62: recipe for target 'CMakeFiles/crpropa-swig.dir/crpropa_wrap.cxx.o' failed make[2]: [CMakeFiles/crpropa-swig.dir/crpropa_wrap.cxx.o] Error 1 CMakeFiles/Makefile2:431: recipe for target 'CMakeFiles/crpropa-swig.dir/all' failed make[1]: [CMakeFiles/crpropa-swig.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

lukasmerten commented 1 year ago

I guess numpy is not installed in the python version you are using.

Please also note that we do not test anymore on Ubuntu-18 and python-2. Try to upgrade to a later version.