FS#58881 - [boost] numpy shipped with boost produce python modules with apparently wrong endianness
Attached to Project:
Arch Linux
Opened by luca penasa (luke_penn) - Tuesday, 05 June 2018, 15:23 GMT
Last edited by Evangelos Foutras (foutrelis) - Thursday, 12 July 2018, 00:08 GMT
Opened by luca penasa (luke_penn) - Tuesday, 05 June 2018, 15:23 GMT
Last edited by Evangelos Foutras (foutrelis) - Thursday, 12 July 2018, 00:08 GMT
|
Details
Description:
This is to report the same problem originally reported here https://github.com/boostorg/python/issues/209 The same problem affect e.g. ubuntu the same way as arch (tested in a container), thus it might be related with the boost library itself Additional info: * package version(s) ANY I've been tried with many different versions of boost compiling them with makepkg. all of them suffer of the same problem when compiling a python module calling np::initialize(); the following error is obtained: RuntimeError: FATAL: module compiled as little endian, but detected different endianness at runtime ImportError: numpy.core.umath failed to import Traceback (most recent call last): File "<string>", line 1, in <module> SystemError: initialization of hello raised unreported exception In [2]: Steps to reproduce: this can be reproduced following these steps (dev tools, boost, cmake and git must be installed): git clone https://github.com/luca-penasa/boost-numpy-minimal-bug.git bnmb.git cd bnmb.git mkdir build cd build cmake .. make python3 -c "import hello" I can confirm this code produce a valid result when linking directly to boost python and boost numpy compiled from scratch from https://github.com/boostorg/python I can provide steps to reproduce this in a docker if needed. |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Thursday, 12 July 2018, 00:08 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed upstream and the patch has been added to boost 1.67.0-5.
Thursday, 12 July 2018, 00:08 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed upstream and the patch has been added to boost 1.67.0-5.
Edit: or actually reading better, there's a problem with their detection. x86_64 is little endian, so unless you're on a different architecture...
have you tries the same code? can you confirm this is not only my problem?
I'll try to report to boost if that is the case.
Thanks
luca
Regarding reproducing the same issue on Ubuntu [1], I believe it would have worked after installing python3-numpy. (So it's not the same problem.)
[1] https://github.com/boostorg/python/issues/209#issuecomment-394721776
To be investigated further...
pacman -U https://archive.archlinux.org/packages/b/boost/boost-1.66.0-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/b/boost-libs/boost-libs-1.66.0-2-x86_64.pkg.tar.xz