Package: python-numpy
Version: 1:1.13.3-2
Severity: normal

I guess it is a rare usecase since I haven't spotted another bugreport, and we
have managed to miss it for a while I guess.

dh_python2 installs built .so extensions with a arch specific suffix, e.g.:

        neurodebian@smaug ~/deb/builds/pymvpa2/2.6.3-1 % grep dh_python2.*so 
pymvpa2_2.6.3-1_amd64.build
        I: dh_python2 fs:322: renaming _svmc.so to _svmc.x86_64-linux-gnu.so
        I: dh_python2 fs:322: renaming smlrc.so to smlrc.x86_64-linux-gnu.so

and in pymvpa2 we have been using numpy.ctypeslib.load_library to load
them afterwards, but apparently [1,2] it failed to load them for a while,
and that is due to following code in load_library:

  so_ext3 = '.%s-%s.so' % (sysconfig.get_config_var('SOABI'),
                           sysconfig.get_config_var('MULTIARCH'))

which is correct for python3, but wouldn't work in python2 since SOABI is not
defined, so we end up looking for .None-x86_64-linux-gnu.so :

        $> strace -f python -c 'from numpy.ctypeslib import load_library; 
print(load_library("libXXX", "/"))' 2>&1 | grep libXXX 
        [pid  7542] stat("/libXXX.None-x86_64-linux-gnu.so", 0x7fffe43276b0) = 
-1 ENOENT (No such file or directory)
        [pid  7542] stat("/libXXX.so", 0x7fffe43276b0) = -1 ENOENT (No such 
file or directory)

I am not sure about "correct" way to address it, but a quick workaround would be

in python2, do not prepend SOABI.  Or alternatively, do not prepend if
sysconfig.get_config_var('SOABI') is not defined altogether

[1] https://github.com/PyMVPA/PyMVPA/issues/564
[2] https://github.com/PyMVPA/PyMVPA/issues/568

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (600, 'unstable'), (300, 'experimental'), (100, 
'unstable-debug'), (100, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python-numpy depends on:
ii  libatlas3-base [liblapack.so.3]    3.10.3-5
ii  libblas3 [libblas.so.3]            3.7.1-4
ii  libc6                              2.26-2
ii  liblapack3 [liblapack.so.3]        3.7.1-4
ii  libopenblas-base [liblapack.so.3]  0.2.20+ds-4
ii  python                             2.7.14-4
ii  python2.7                          2.7.14-4

python-numpy recommends no packages.

Versions of packages python-numpy suggests:
ii  gcc               4:7.2.0-1d1
ii  gfortran          4:7.2.0-1d1
ii  python-dev        2.7.14-4
ii  python-nose       1.3.7-3
ii  python-numpy-dbg  1:1.13.3-2
pn  python-numpy-doc  <none>

-- no debconf information

Reply via email to