Package: libboost-numpy1.67.0
Version: 1.67.0-13
Severity: important
Tags: upstream

Dear Maintainer,

Python modules built with libboost-numpy cannot be imported in python3, because 
they fail to initialize. The following
module can be used to reproduce the behaviour

$ cat segfault.cpp
#include <boost/python.hpp>
#include <boost/python/numpy.hpp>
BOOST_PYTHON_MODULE(segfault) {
    Py_Initialize();
    boost::python::numpy::initialize();
}

I compiled this and linked against python3

$ g++ -fPIC -shared -I/usr/include/python3.7m -lboost_numpy37 -lboost_python37 
segfault.cpp -o segfault.cpython-37m-
x86_64-linux-gnu.so

The result of importing this module is

$ python3 -c "import segfault"
RuntimeError: FATAL: module compiled as little endian, but detected different 
endianness at runtime
ImportError: numpy.core._multiarray_umath failed to import
Traceback (most recent call last):
  File "<string>", line 1, in <module>
SystemError: initialization of segfault raised unreported exception

The issue only affects the python3 version, python2 works as expected.

This issue was repored upstream here: 
https://github.com/boostorg/python/issues/214
There is already a fix applied upstream: 
https://github.com/boostorg/python/pull/218/commits/0fce0e589353d772ceda4d493b147138406b22fd
It is included in boost release 1.68, but would need a backport for buster.

Would it be possible to include the patch into Debian stable?
Thank you in advance
Moritz

-- System Information:
Debian Release: 10.2
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.12-200.fc30.x86_64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages libboost-numpy1.67.0 depends on:
ii  libboost-python1.67.0  1.67.0-13
ii  libc6                  2.28-10
ii  libgcc1                1:8.3.0-6
ii  libstdc++6             8.3.0-6

libboost-numpy1.67.0 recommends no packages.

Versions of packages libboost-numpy1.67.0 suggests:
ii  python   2.7.16-1
ii  python3  3.7.3-1

Reply via email to