[Pkg-rust-maintainers] Bug#1133624: rust-cbindgen: ftbfs with GCC-16
Emanuele Rocca
ema at debian.org
Mon Apr 13 14:10:44 BST 2026
Package: src:rust-cbindgen
Version: 0.29.2-3
Severity: important
Tags: sid forky ftbfs
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-16
Hi,
rust-cbindgen fails to build in a test rebuild on at least amd64 and arm64 with
gcc-16/g++-16, but builds properly with gcc-15/g++-15. The severity of this
report will be raised before the forky release.
The full build log can be found at:
https://people.debian.org/~ema/gcc-16-rebuilds/output-1/rust-cbindgen_arm64.build.xz
The last lines of the build log are at the end of this report.
To build with GCC 16, either set CC=gcc-16 CXX=g++-16 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.
apt-get -t=experimental install g++
Common build failures include unused (but set) variables, array subscripts
partly outside array bounds, and new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-16/porting_to.html
Please only close this issue after double-checking that the package can be
built correctly with GCC 16.
Please do not reassign this bug to another package. If a fix in another package
is required, then file a bug for the other package (or clone), and mark this
bug as blocked by the bug in the other package.
[...]
test test_sentinel ... ok
test test_simplify_option_ptr ... ok
test test_raw_ident ... ok
test test_nullable_attribute ... ok
test test_reserved ... ok
test test_transform_op ... ok
test test_struct ... ok
test test_prefix ... ok
test test_opaque ... ok
test test_prefixed_struct_literal_deep ... ok
test test_struct_self ... ok
test test_struct_literal ... ok
test test_pin ... ok
test test_rename ... ok
test test_rename_associated_constant ... ok
test test_struct_literal_order ... ok
test test_renaming_overrides_prefixing ... ok
test test_union ... ok
test test_unsafe_cell ... ok
test test_prefixed_struct_literal ... ok
test test_zst ... ok
test test_std_lib ... ok
test test_va_list ... ok
test test_static ... ok
test test_transparent ... ok
test test_union_self ... ok
test test_swift_name ... ok
test test_typedef ... ok
failures:
---- test_body stdout ----
Running: "/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/debug/cbindgen" "--output" "/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c" "--depfile" "/tmp/.tmpJovp5a" "--lang" "c" "--cpp-compat" "--style" "type" "--config" "/build/reproducible-path/rust-cbindgen-0.29.2/tests/rust/body.toml" "/build/reproducible-path/rust-cbindgen-0.29.2/tests/rust/body.rs"
Running: "gcc" "-D" "DEFINED" "-I" "/build/reproducible-path/rust-cbindgen-0.29.2/tests" "-Wall" "-Werror" "-Wno-attributes" "-Wno-unused-const-variable" "-Wno-return-type-c-linkage" "-Wno-deprecated-declarations" "-g" "-O2" "-Werror=implicit-function-declaration" "-ffile-prefix-map=/build/reproducible-path/rust-cbindgen-0.29.2=." "-fstack-protector-strong" "-fstack-clash-protection" "-Wformat" "-Werror=format-security" "-mbranch-protection=standard" "-D" "CBINDGEN_STYLE_TYPE" "-D" "CBINDGEN_CPP_COMPAT" "-o" "/tmp/cbindgen-test-outputLtOG42/body.compat.o" "-c" "/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c"
Running: "g++" "-D" "DEFINED" "-I" "/build/reproducible-path/rust-cbindgen-0.29.2/tests" "-Wall" "-Werror" "-Wno-attributes" "-Wno-unused-const-variable" "-Wno-return-type-c-linkage" "-Wno-deprecated-declarations" "-std=c++17" "-x" "c++" "-g" "-O2" "-ffile-prefix-map=/build/reproducible-path/rust-cbindgen-0.29.2=." "-fstack-protector-strong" "-fstack-clash-protection" "-Wformat" "-Werror=format-security" "-mbranch-protection=standard" "-D" "CBINDGEN_STYLE_TYPE" "-D" "CBINDGEN_CPP_COMPAT" "-o" "/tmp/cbindgen-test-outputLtOG42/body.compat.o" "-c" "/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c"
thread 'test_body' (1722) panicked at tests/tests.rs:214:5:
Output failed to compile: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c:18:16: error: anonymous non-C-compatible type given name for linkage purposes by ‘typedef’ declaration [-Werror=non-c-typedef-for-linkage]\n 18 | typedef struct {\n | ^\n | MyFancyStruct\n/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c:21:17: note: type is not C-compatible because it contains ‘void MyFancyStruct::foo()’ declaration\n 21 | inline void foo();\n | ^~~\n/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c:31:16: error: anonymous non-C-compatible type given name for linkage purposes by ‘typedef’ declaration [-Werror=non-c-typedef-for-linkage]\n 31 | typedef struct {\n | ^\n | MyFancyEnum\n/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c:42:17: note: type is not C-compatible because it contains ‘void MyFancyEnum::wohoo()’ declaration\n 42 | inline void wohoo();\n | ^~~~~\n/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c:52:16: error: anonymous non-C-compatible type given name for linkage purposes by ‘typedef’ declaration [-Werror=non-c-typedef-for-linkage]\n 52 | typedef struct {\n | ^\n | MyFancyStruct_Prepended\n/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c:54:17: note: type is not C-compatible because it contains ‘void MyFancyStruct_Prepended::prepended_wohoo()’ declaration\n 54 | inline void prepended_wohoo();\n | ^~~~~~~~~~~~~~~\n/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c:65:16: error: anonymous non-C-compatible type given name for linkage purposes by ‘typedef’ declaration [-Werror=non-c-typedef-for-linkage]\n 65 | typedef struct {\n | ^\n | MyFancyEnum_Prepended\n/build/reproducible-path/rust-cbindgen-0.29.2/target/aarch64-unknown-linux-gnu/tmp/expectations/body.compat.c:67:17: note: type is not C-compatible because it contains ‘void MyFancyEnum_Prepended::wohoo()’ declaration\n 67 | inline void wohoo();\n | ^~~~~\ncc1plus: note: unrecognized command-line option ‘-Wno-return-type-c-linkage’ may have been intended to silence earlier diagnostics\ncc1plus: all warnings being treated as errors\n" }
stack backtrace:
0: __rustc::rust_begin_unwind
at /usr/src/rustc-1.92.0/library/std/src/panicking.rs:698:5
1: core::panicking::panic_fmt
at /usr/src/rustc-1.92.0/library/core/src/panicking.rs:80:14
2: tests::compile
at /usr/share/cargo/registry/cbindgen-0.29.2/tests/tests.rs:214:5
3: tests::run_compile_test
at /usr/share/cargo/registry/cbindgen-0.29.2/tests/tests.rs:355:13
4: tests::test_file
at /usr/share/cargo/registry/cbindgen-0.29.2/tests/tests.rs:383:13
5: tests::test_body
at /usr/share/cargo/registry/cbindgen-0.29.2/tests/tests.rs:430:13
6: tests::test_body::{{closure}}
at /usr/share/cargo/registry/cbindgen-0.29.2/tests/tests.rs:429:33
7: core::ops::function::FnOnce::call_once
at /usr/src/rustc-1.92.0/library/core/src/ops/function.rs:250:5
8: core::ops::function::FnOnce::call_once
at /usr/src/rustc-1.92.0/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failures:
test_body
test result: FAILED. 135 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 10.76s
error: test failed, to rerun pass `--test tests`
dh_auto_test: error: /usr/share/cargo/bin/cargo test --all returned exit code 101
make[1]: *** [debian/rules:6: override_dh_auto_test] Error 25
make[1]: Leaving directory '/build/reproducible-path/rust-cbindgen-0.29.2'
make: *** [debian/rules:3: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
More information about the Pkg-rust-maintainers
mailing list