Created attachment 887021 [details] builld log Fails to compile for first python target (pypy3), error seems to be somehow related to bzip2. LTO is enabled on this machine. = note: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/dev-util/maturin-1.5.0/work/maturin-1.5.0/target/release/deps/libbzip2-50ca0657c73c9d6d.rlib(bzip2-50ca0657c73c9d6d.bzip2.f69e10ac6aa5a579-cgu.0.rcgu.o): in function `bzip2::mem::Compress::new': bzip2.f69e10ac6aa5a579-cgu.0:(.text._ZN5bzip23mem8Compress3new17h460ff06d84f12c85E+0x51): undefined reference to `BZ2_bzCompressInit' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/dev-util/maturin-1.5.0/work/maturin-1.5.0/target/release/deps/libbzip2-50ca0657c73c9d6d.rlib(bzip2-50ca0657c73c9d6d.bzip2.f69e10ac6aa5a579-cgu.0.rcgu.o): in function `bzip2::mem::Compress::compress_vec': bzip2.f69e10ac6aa5a579-cgu.0:(.text._ZN5bzip23mem8Compress12compress_vec17hf3820e3e466f2c52E+0x61): undefined reference to `BZ2_bzCompress' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/dev-util/maturin-1.5.0/work/maturin-1.5.0/target/release/deps/libbzip2-50ca0657c73c9d6d.rlib(bzip2-50ca0657c73c9d6d.bzip2.f69e10ac6aa5a579-cgu.0.rcgu.o): in function `bzip2::mem::Decompress::new': bzip2.f69e10ac6aa5a579-cgu.0:(.text._ZN5bzip23mem10Decompress3new17hd133ca1ea424cb3aE+0x4d): undefined reference to `BZ2_bzDecompressInit' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/dev-util/maturin-1.5.0/work/maturin-1.5.0/target/release/deps/libbzip2-50ca0657c73c9d6d.rlib(bzip2-50ca0657c73c9d6d.bzip2.f69e10ac6aa5a579-cgu.0.rcgu.o): in function `bzip2::mem::Decompress::decompress': bzip2.f69e10ac6aa5a579-cgu.0:(.text._ZN5bzip23mem10Decompress10decompress17h448f98c08da4ec9dE+0x29): undefined reference to `BZ2_bzDecompress' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/dev-util/maturin-1.5.0/work/maturin-1.5.0/target/release/deps/libbzip2-50ca0657c73c9d6d.rlib(bzip2-50ca0657c73c9d6d.bzip2.f69e10ac6aa5a579-cgu.0.rcgu.o): in function `<bzip2::mem::DirCompress as bzip2::mem::Direction>::destroy': bzip2.f69e10ac6aa5a579-cgu.0:(.text._ZN65_$LT$bzip2..mem..DirCompress$u20$as$u20$bzip2..mem..Direction$GT$7destroy17hb4e83fd574a46e34E+0x2): undefined reference to `BZ2_bzCompressEnd' /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/portage/dev-util/maturin-1.5.0/work/maturin-1.5.0/target/release/deps/libbzip2-50ca0657c73c9d6d.rlib(bzip2-50ca0657c73c9d6d.bzip2.f69e10ac6aa5a579-cgu.0.rcgu.o): in function `<bzip2::mem::DirDecompress as bzip2::mem::Direction>::destroy': bzip2.f69e10ac6aa5a579-cgu.0:(.text._ZN67_$LT$bzip2..mem..DirDecompress$u20$as$u20$bzip2..mem..Direction$GT$7destroy17h77c4de6139c586fcE+0x2): undefined reference to `BZ2_bzDecompressEnd' collect2: error: ld returned 1 exit status = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the `-l` flag to specify native libraries to link = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname) error: could not compile `maturin` (bin "maturin") due to previous error
Created attachment 887022 [details] emerge --info
Compiles successfully with LTO disabled.
I think this is due to: commit 2fd092b4457fae45cf155a1a0e2cad00ca112851 Author: Michał Górny <mgorny@gentoo.org> Date: Fri Mar 8 00:40:21 2024 distutils-r1.eclass: Move filter-lto into DISTUTILS_EXT block Signed-off-by: Michał Górny <mgorny@gentoo.org> This doesn't use build extensions (it builds /usr/bin/maturin) but still builds with distutils-r1 and setuptools-rust to install the pep517 backend on top. And then cargo.eclass' filter-lto doesn't work either due to not using cargo_src_compile. Suppose I could just re-add to the ebuild like it used to *if* the eclass is going to stay like that.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f168be10ba9df76f9d0b5c09e820959f273063b commit 3f168be10ba9df76f9d0b5c09e820959f273063b Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2024-03-08 15:55:04 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2024-03-08 16:00:00 +0000 dev-util/maturin: set DISTUTILS_EXT=1 At least for now anyway, have a bit of reserve given this has bit of a loaded meaning and this does not build extensions -- but in reality DISTUTILS_EXT is for "builds anything". Closes: https://bugs.gentoo.org/926507 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> dev-util/maturin/maturin-1.4.0.ebuild | 3 ++- dev-util/maturin/maturin-1.5.0.ebuild | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)