Source: casacore
Version: 3.6.1-5
Severity: normal
Tags: ftbfs patch
User: debian-loonga...@lists.debian.org
Usertags: loong64
X-Debbugs-CC: debian-loonga...@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
>From bcbb86b867c45324610a73a0fda6cf9e305b44a3 Mon Sep 17 00:00:00 2001
From: Dandan Zhang <zhangdan...@loongson.cn>
Date: Mon, 10 Feb 2025 10:03:15 +0000
Subject: [PATCH] casacore add NumPy in CMakeLists-cmake3.14.txt
---
python3/CMakeLists-cmake3.14.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python3/CMakeLists-cmake3.14.txt b/python3/CMakeLists-cmake3.14.txt
index 2f7e39f..26d5ca5 100644
--- a/python3/CMakeLists-cmake3.14.txt
+++ b/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)
if (Python3_FOUND)
find_package(Boost REQUIRED)
--
2.47.1