Description of problem: I made a python module with boost/python.hpp and boost/numpy.hpp. Compiling its c++ source succeeded, but, in Python3, importing it failed. The error message was 'RuntimeError: FATAL: module compiled as little endian, but detected different endianness at runtime.' It was fully successful without boost/numpy.hpp. I was tried building boost and numpy from source and made the same module but it was failed and show the same error message. The similar issue reports were found in boost, Ubuntu, and Arch communities. Boost community says it is the packager's fault, because endian is automatically decided by compiler. Boost does't change it. For Ubuntu and Arch, they were able to do with downgrading boost and numpy. But I was not in Fedora. Version-Release number of selected component (if applicable): Fedora 28, boost from 1.65.1 to 1.67.0 numpy from 1.12.1 to 1.14.5 How reproducible: I don't know, because there is just one Fedora machine. Steps to Reproduce: ## mod.cpp -------- #include <boost/python.hpp> #include <boost/python/numpy.hpp> BOOST_PYTHON_MODULE(mod) { Py_Initialize(); boost::python::numpy::initialize(); } -------- ## main.py -------- import mod -------- step1. g++ -shared -fpic -o mod.so -lboost_python3 -lboost_numpy3 step2. python3 main.py Actual results: RuntimeError: FATAL: module compiled as little endian, but detected different endianness at runtime. Expected results: do nothing Additional info:
(In reply to dolgorbie.kirby19 from comment #0) > I was tried building boost and numpy from source and > made the same module but it was failed and show the same error message. > > The similar issue reports were found in boost, Ubuntu, and Arch communities. > Boost community says it is the packager's fault, because endian is > automatically decided by compiler. > Boost does't change it. And neither does the Fedora package (nor the Arch package, nor the Ubuntu package, and neither did you when you built it from source). This seems like an upstream bug to me.
I've hit this bug too. I think I have found the upstream issue and fixed it. The patch has already been accepted upstream, see https://github.com/boostorg/python/pull/218 - I guess it will be included in the next release. It would be nice to have the package in working order. The patch itself should be quite easy to backport to boost 1.66
Fixed for rawhide and f28
boost-1.64.0-7.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-01441e6ea8
boost-1.66.0-8.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-031ea94959
boost-1.64.0-7.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-01441e6ea8
boost-1.66.0-8.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-031ea94959
boost-1.66.0-8.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
boost-1.64.0-7.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.