[Pkg-rust-maintainers] Bug#1074448: corrosion: fails to build with rustc >= 1.79

Fabian Grünbichler debian at fabian.gruenbichler.email
Fri Jun 28 19:34:25 BST 2024


Source: corrosion
Version: 0.4.7-1
Severity: serious
Tags: ftbfs upstream patch
Justification: fails to build from source (but built successfully in the past)

hi!

rustc in version 1.79 and later doesn't allow dashes in lib names
anymore. corrosion's test cases executed as part of the build and later,
during autopkgtest, use such a now forbidden library name. the build and
autopkgtest run thus fail, which currently prevents rustc 1.79 from migrating
to testing (which is fine, and good that the test caught it :)).

upstream fixed this as part of 0.5:
https://github.com/corrosion-rs/corrosion/issues/501

with:

https://github.com/corrosion-rs/corrosion/commit/f85b2422d39fb2f7daca33aa6c2ee7647e9f9348

the linked commit applies cleanly to 0.4.7-1, so either cherry-picking
it or updating to 0.5 would be appreciated (ideally before end of July,
when I'll likely upload 1.80).

there seems to be one other issue related to cbindgen (and probably
related commits upstream):

>  4/69 Test #22: cbindgen_rust2cpp_build ..................................***Failed    2.42 sec
> CMake Warning:
>   Ignoring empty string ("") provided on the command line.
> 
> 
> CMake Warning:
>   Ignoring empty string ("") provided on the command line.
> 
> 
> CMake Warning:
>   Ignoring empty string ("") provided on the command line.
> 
> 
> CMake Warning:
>   Ignoring empty string ("") provided on the command line.
> 
> 
> CMake Warning:
>   Ignoring empty string ("") provided on the command line.
> 
> 
> -- TEST_BINARY_DIRECTORY: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp
> '/usr/bin/cmake' '-GUnix Makefiles' '-DRust_TOOLCHAIN=' '--log-level' 'Debug' '-DRust_CARGO_TARGET=x86_64-unknown-linux-gnu' '-DCMAKE_C_COMPILER=/usr/bin/cc' '-S' '/<<PKGBUILDDIR>>/test/cbindgen/rust2cpp' '-B' '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> -- The C compiler identification is GNU 13.3.0
> -- The CXX compiler identification is GNU 13.3.0
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working C compiler: /usr/bin/cc - skipped
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++ - skipped
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- Using Corrosion 0.4.7 with CMake 3.29.6 and the `Unix Makefiles` Generator
> CMake Warning at /<<PKGBUILDDIR>>/cmake/FindRust.cmake:197 (message):
>   CMake variable `Rust_TOOLCHAIN` specified, but `rustup` was not found.
>   Ignoring toolchain and looking for a Rust toolchain not managed by rustup.
> Call Stack (most recent call first):
>   /<<PKGBUILDDIR>>/cmake/Corrosion.cmake:63 (find_package)
>   /<<PKGBUILDDIR>>/CMakeLists.txt:73 (include)
> 
> 
> -- Parsed Target triple: arch: x86_64, vendor: unknown, OS: linux, env: gnu
> -- Parsed Target triple: arch: x86_64, vendor: unknown, OS: linux, env: gnu
> -- Determining required link libraries for target x86_64-unknown-linux-gnu
> -- Required static libs for target x86_64-unknown-linux-gnu: gcc_s;util;rt;pthread;m;dl;c
> -- Found Rust: /usr/bin/rustc (found version "1.79.0")
> -- Using Corrosion as a subdirectory
> -- Found 1 targets in package rust-lib
> -- TARGET rust_lib produces byproducts librust_lib.a;;
> -- Corrosion created the following CMake targets: rust_lib
> -- rust target is rust_lib
> -- Output directory property (target rust_lib): ARCHIVE_OUTPUT_DIRECTORY dir: output_directory-NOTFOUND
> -- Setting IMPORTED_LOCATION for target rust_lib-static to `/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp/librust_lib.a`.
> -- Adding command to copy byproducts `librust_lib.a` to /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp/librust_lib.a
> -- Configuring done (0.8s)
> -- Generating done (0.0s)
> -- Build files have been written to: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp
> '/usr/bin/cmake' '--build' '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[2]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[2]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
> gmake[3]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[4]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[4]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> [  0%] Built target cargo-prebuild_rust_lib
> gmake[4]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[4]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[4]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
>    Compiling rust-lib v0.1.0 (/<<PKGBUILDDIR>>/test/cbindgen/rust2cpp/rust)
>     Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.51s
> Copying byproducts `librust_lib.a` to /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp
> gmake[4]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> [  0%] Built target _cargo-build_rust_lib
> gmake[4]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[4]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> [  0%] Built target cargo-build_rust_lib
> gmake[4]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[4]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[4]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> [ 25%] Generate cbindgen bindings for crate rust_lib
> thread 'main' panicked at 'Unable to find rust_lib for "/<<PKGBUILDDIR>>/test/cbindgen/rust2cpp/rust/Cargo.toml"', src/bindgen/cargo/cargo.rs:92:21
> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
> gmake[4]: *** [CMakeFiles/_corrosion_cbindgen_rust_lib_bindings.dir/build.make:74: corrosion_generated/cbindgen/rust_lib/include/rust-lib.h] Error 101
> gmake[4]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[3]: *** [CMakeFiles/Makefile2:264: CMakeFiles/_corrosion_cbindgen_rust_lib_bindings.dir/all] Error 2
> gmake[2]: *** [Makefile:91: all] Error 2
> gmake[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> gmake[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/test/cbindgen/build-cbindgen_rust2cpp'
> CMake Error at /<<PKGBUILDDIR>>/test/ConfigureAndBuild.cmake:110 (message):
>   Build step failed.  Exit code: `2`
> 
> 
> 
> test 23
>       Start 23: cbindgen_rust2cpp_run_cpp-exe
> Failed test dependencies: cbindgen_rust2cpp_build
>  5/69 Test #23: cbindgen_rust2cpp_run_cpp-exe ............................***Not Run   0.00 sec

I'll try to keep an eye out for corrosion regressions in the future
before uploading to unstable!

thanks in advance,
Fabian

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)



More information about the Pkg-rust-maintainers mailing list