clawpack / doc

General Clawpack documentation and main wiki pages
Other
13 stars 23 forks source link

pip install fails on debian 12 #229

Open Trophime opened 2 months ago

Trophime commented 2 months ago

Hi, I run into an error trying to install clawpack with pip:

  cc -Ipyclaw/src/pyclaw/reconstruct.cpython-311-x86_64-linux-gnu.so.p -Ipyclaw/src/pyclaw -I../pyclaw/src/pyclaw -I/tmp/pip-build-env-93op_qul/overlay/lib/python3.11/site-packages/numpy/_core/include -I/tmp/pip-build-env-93op_qul/overlay/lib/python3.11/site-packages/numpy/f2py/src -I/usr/include/python3.11 -I/usr/include/x86_64-linux-gnu/python3.11 -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -Wno-unused-but-set-variable -fPIC -MD -MQ pyclaw/src/pyclaw/reconstruct.cpython-311-x86_64-linux-gnu.so.p/limiters_weno_reconstruct.c.o -MF pyclaw/src/pyclaw/reconstruct.cpython-311-x86_64-linux-gnu.so.p/limiters_weno_reconstruct.c.o.d -o pyclaw/src/pyclaw/reconstruct.cpython-311-x86_64-linux-gnu.so.p/limiters_weno_reconstruct.c.o -c ../pyclaw/src/pyclaw/limiters/weno/reconstruct.c
      In file included from /tmp/pip-build-env-93op_qul/overlay/lib/python3.11/site-packages/numpy/_core/include/numpy/ndarraytypes.h:1909,
                       from /tmp/pip-build-env-93op_qul/overlay/lib/python3.11/site-packages/numpy/_core/include/numpy/ndarrayobject.h:12,
                       from ../pyclaw/src/pyclaw/limiters/weno/reconstruct.c:7:
      /tmp/pip-build-env-93op_qul/overlay/lib/python3.11/site-packages/numpy/_core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      ../pyclaw/src/pyclaw/limiters/weno/reconstruct.c: In function ‘py_smoothness_k3’:
      ../pyclaw/src/pyclaw/limiters/weno/reconstruct.c:59:57: error: ‘PyArray_DOUBLE’ undeclared (first use in this function); did you mean ‘PyArray_DTYPE’?
         59 |   if (sigma_py->nd != 2 || sigma_py->descr->type_num != PyArray_DOUBLE)
            |                                                         ^~~~~~~~~~~~~~
            |                                                         PyArray_DTYPE

My config is the following: python is: 3.11.2 The Meson build system Version: 1.4.1 Source dir: /tmp/pip-install-4ejbjaaw/clawpack_a4706f3b61f548cf81084b2e6d71d1bf Build dir: /tmp/pip-install-4ejbjaaw/clawpack_a4706f3b61f548cf81084b2e6d71d1bf/.mesonpy-uxfj1bep Build type: native build Program python3 found: YES (/home/LNCMI-G/christophe.trophime/clawpack-env/bin/python3) Project name: clawpack Project version: 5.10.0 Fortran compiler for the host machine: gfortran (gcc 12.2.0 "GNU Fortran (Debian 12.2.0-14) 12.2.0") Fortran linker for the host machine: gfortran ld.bfd 2.40 C compiler for the host machine: cc (gcc 12.2.0 "cc (Debian 12.2.0-14) 12.2.0") C linker for the host machine: cc ld.bfd 2.40 Host machine cpu family: x86_64 Host machine cpu: x86_64 Program python3 found: YES (/home/LNCMI-G/christophe.trophime/clawpack-env/bin/python3) Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1 Run-time dependency python found: YES 3.11 Compiler for Fortran supports arguments -Wno-unused-dummy-argument: YES Compiler for Fortran supports arguments -Wno-unused-variable: YES Compiler for Fortran supports arguments -Wno-unused-label: YES Compiler for C supports arguments -Wno-unused-but-set-variable: YES Build targets in project: 115

  clawpack 5.10.0

Any idea on how to fix this? Best