-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
triageNew bug, unverifiedNew bug, unverified
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
3.0.1
Problem description
I get these errors:
*** Building project with Ninja...
[0/2] Re-checking globbed directories...
[3/108] Building CXX object tests/test_cross_module_rtti/CMakeFiles/test_cross_module_rtti_bindings.dir/bindings.cpp.o
FAILED: [code=1] tests/test_cross_module_rtti/CMakeFiles/test_cross_module_rtti_bindings.dir/bindings.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -Dtest_cross_module_rtti_bindings_EXPORTS -I/build/source/include -I/build/source/build/tests/test_cross_module_rtti -I/build/source/tests/test_cross_module_rtti -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/test_cross_module_rtti/CMakeFiles/test_cross_module_rtti_bindings.dir/bindings.cpp.o -MF tests/test_cross_module_rtti/CMakeFiles/test_cross_module_rtti_bindings.dir/bindings.cpp.o.d -o tests/test_cross_module_rtti/CMakeFiles/test_cross_module_rtti_bindings.dir/bindings.cpp.o -c /build/source/tests/test_cross_module_rtti/bindings.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/tests/test_cross_module_rtti/bindings.cpp:1:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[4/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/pybind11_tests.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/pybind11_tests.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/pybind11_tests.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/pybind11_tests.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/pybind11_tests.cpp.o -c /build/source/tests/pybind11_tests.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/include/pybind11/eval.h:14,
from /build/source/tests/pybind11_tests.h:3,
from /build/source/tests/pybind11_tests.cpp:10:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[5/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_async.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/test_async.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_async.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/test_async.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/test_async.cpp.o -c /build/source/tests/test_async.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/include/pybind11/eval.h:14,
from /build/source/tests/pybind11_tests.h:3,
from /build/source/tests/test_async.cpp:10:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[6/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_call_policies.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/test_call_policies.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_call_policies.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/test_call_policies.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/test_call_policies.cpp.o -c /build/source/tests/test_call_policies.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/include/pybind11/eval.h:14,
from /build/source/tests/pybind11_tests.h:3,
from /build/source/tests/test_call_policies.cpp:10:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[7/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_chrono.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/test_chrono.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_chrono.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/test_chrono.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/test_chrono.cpp.o -c /build/source/tests/test_chrono.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/include/pybind11/chrono.h:13,
from /build/source/tests/test_chrono.cpp:11:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[8/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_callbacks.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/test_callbacks.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_callbacks.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/test_callbacks.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/test_callbacks.cpp.o -c /build/source/tests/test_callbacks.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/include/pybind11/functional.h:12,
from /build/source/tests/test_callbacks.cpp:10:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[9/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_class_release_gil_before_calling_cpp_dtor.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/test_class_release_gil_before_calling_cpp_dtor.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_class_release_gil_before_calling_cpp_dtor.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/test_class_release_gil_before_calling_cpp_dtor.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/test_class_release_gil_before_calling_cpp_dtor.cpp.o -c /build/source/tests/test_class_release_gil_before_calling_cpp_dtor.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/tests/test_class_release_gil_before_calling_cpp_dtor.cpp:1:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[10/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_builtin_casters.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/test_builtin_casters.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_builtin_casters.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/test_builtin_casters.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/test_builtin_casters.cpp.o -c /build/source/tests/test_builtin_casters.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/include/pybind11/complex.h:12,
from /build/source/tests/test_builtin_casters.cpp:10:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[11/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_buffers.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/test_buffers.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_buffers.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/test_buffers.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/test_buffers.cpp.o -c /build/source/tests/test_buffers.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/include/pybind11/complex.h:12,
from /build/source/tests/test_buffers.cpp:10:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
[12/108] Building CXX object tests/CMakeFiles/pybind11_tests.dir/test_class.cpp.o
FAILED: [code=1] tests/CMakeFiles/pybind11_tests.dir/test_class.cpp.o
/nix/store/br8a01761nsa7kpr42i6dd9sdmk78xi1-armv7l-unknown-linux-gnueabihf-gcc-wrapper-14.3.0/bin/armv7l-unknown-linux-gnueabihf-g++ -DPYBIND11_TEST_BOOST -DPYBIND11_TEST_EIGEN -Dpybind11_tests_EXPORTS -I/build/source/include -isystem /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13 -isystem /nix/store/m20sxgg1xyxjwy5df9b1gajwspzhjpzz-eigen-armv7l-unknown-linux-gnueabihf-3.4.1/include/eigen3 -O3 -DNDEBUG -fPIC -fvisibility=hidden -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -flto=auto -fno-fat-lto-objects -MD -MT tests/CMakeFiles/pybind11_tests.dir/test_class.cpp.o -MF tests/CMakeFiles/pybind11_tests.dir/test_class.cpp.o.d -o tests/CMakeFiles/pybind11_tests.dir/test_class.cpp.o -c /build/source/tests/test_class.cpp
In file included from /nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/Python.h:64,
from /build/source/include/pybind11/conduit/wrap_include_python_h.h:44,
from /build/source/include/pybind11/detail/common.h:12,
from /build/source/include/pybind11/attr.h:13,
from /build/source/include/pybind11/detail/class.h:12,
from /build/source/include/pybind11/pybind11.h:12,
from /build/source/include/pybind11/stl.h:12,
from /build/source/tests/test_class.cpp:17:
/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/include/python3.13/pyport.h:399:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
399 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
ninja: build stopped: subcommand failed.
*** CMake build failed
Reproducible example code
With a basic installation of Nix, you can reproduce the error with:
nix build -L nixpkgs#pkgsCross.armv7l-hf-multiplatform.python3.pkgs.pybind11
Is this a regression? Put the last known working version here if it is.
I remember I managed to cross compile pybind11 2.x a few months ago.
Metadata
Metadata
Assignees
Labels
triageNew bug, unverifiedNew bug, unverified