[Debian-astro-maintainers] Bug#1095644: casacore: FTBFS: fatal error: numpy/arrayobject.h: No such file or directory
zhangdandan
zhangdandan at loongson.cn
Mon Feb 10 10:09:08 GMT 2025
Source: casacore
Version: 3.6.1-5
Severity: normal
Tags: ftbfs patch
User: debian-loongarch at lists.debian.org
Usertags: loong64
X-Debbugs-CC: debian-loongarch at lists.debian.org
Dear maintainers,
Compiling the casacore failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
......
In file included from
/<<PKGBUILDDIR>>/casacore/python/Converters/PycArray.tcc:30,
from /<<PKGBUILDDIR>>/python/Converters/PycArray.cc:28:
/<<PKGBUILDDIR>>/casacore/python/Converters/PycArrayNP.h:35:10: fatal
error: numpy/arrayobject.h: No such file or directory
35 | #include <numpy/arrayobject.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
```
The full build log can be found at
https://buildd.debian.org/status/fetch.php?pkg=casacore&arch=loong64&ver=3.6.1-5&stamp=1738956862&raw=0.
After analysis, there are 3 findings as follows,
1. for casacore 3.6.1-5 version, built error on loong64.
'-- PYTHON3_NUMPY_INCLUDE_DIRS . =
/usr/lib/loongarch64-linux-gnu/python3-numpy/numpy/_core/include'
2. For casacore 3.6.1-4, built right on loong64.
'-- PYTHON3_NUMPY_INCLUDE_DIRS . =
/usr/lib/python3/dist-packages/numpy/core/include'
3. For loong64 or other architectures
numpy/arrayobject.h header file is provided in
/usr/lib/python3/dist-packages/numpy/core/include/.
There are 2 suggestions:
1. Could you add NumPy in python3/CMakeLists-cmake3.14.txt?
```
@@ -1,6 +1,6 @@
message(STATUS "Looking for python3 specific environment...")
-find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
+find_package(Python3 REQUIRED COMPONENTS Interpreter Development NumPy)
```
2. Or could you add /usr/lib/python3/dist-packages/numpy/core/include/
in d/rules's configure stage?
```
override_dh_auto_configure:
dh_auto_configure -- -Wno-dev \
......
-DPYTHON3_NUMPY_INCLUDE_DIRS=/usr/lib/python3/dist-packages/numpy/core/include/
```
Based on the first suggestion, there is a patch I attached.
Based on the attached patch, I have built casacore 3.6.1-5 successfully
on local ENV.
```
dh_md5sums -O--buildsystem=cmake
dh_builddeb -O--buildsystem=cmake
dpkg-deb: building package 'libcasa-casa8-dbgsym' in
'../libcasa-casa8-dbgsym_3.6.1-5_loong64.deb'.
dpkg-deb: building package 'casacore-dev' in
'../casacore-dev_3.6.1-5_loong64.deb'.
......
```
Your opinions are welcome.
Best regards,
Dandan Zhang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-casacore-add-NumPy-in-CMakeLists-cmake3.14.txt.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-astro-maintainers/attachments/20250210/b12ce2b6/attachment.bin>
More information about the Debian-astro-maintainers
mailing list