Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935305 - sys-fs/bcachefs-tools-1.9.1 - error: linking with `clang-18` failed: exit status: 1, = note: ld.lld: error: undefined symbol: __cpu_model >>> referenced by tools-util.c >>> tools-util.o:(crc32c) in archive ./libbcachefs.a
Summary: sys-fs/bcachefs-tools-1.9.1 - error: linking with `clang-18` failed: exit sta...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matt Jolly
URL: https://github.com/koverstreet/bcache...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-01 21:43 UTC by ernsteiswuerfel
Modified: 2024-11-27 11:55 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (amd64, 1.9.1) (bcachefs-tools-1.9.1:20240701-211942.log,232.83 KB, text/plain)
2024-07-01 21:43 UTC, ernsteiswuerfel
Details
emerge --info (file_935305.txt,7.63 KB, text/plain)
2024-07-01 21:45 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-07-01 21:43:53 UTC
Created attachment 896737 [details]
build.log (amd64, 1.9.1)

https://github.com/koverstreet/bcachefs-tools/issues/213 is fixed and bcachefs-tools-1.9.1 (almost) builds on musl-1.2.5 with this issue left:

[...]
     Running `rustc --crate-name bcachefs --edition=2021 src/bcachefs.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=b50901a3765225fe -C extra-filename=-b50901a3765225fe --out-dir /var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps -C strip=debuginfo -L dependency=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps --extern anyhow=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libanyhow-9e31083891bd4549.rlib --extern bch_bindgen=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbch_bindgen-964cab78f36b6033.rlib --extern byteorder=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbyteorder-265fe4aec0896d2b.rlib --extern clap=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libclap-a4f679c624c865f5.rlib --extern clap_complete=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libclap_complete-f8afcb4ccb668f99.rlib --extern colored=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libcolored-f96a155423524568.rlib --extern either=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libeither-4f87be036e4ed6e6.rlib --extern errno=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liberrno-568ff7d64c3d9ad5.rlib --extern libc=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblibc-52f68a03b88e7d57.rlib --extern log=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblog-b97fb30593cc5eb5.rlib --extern rpassword=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/librpassword-bbf13e15e4ebe344.rlib --extern strum=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libstrum-028bf9870bc635a0.rlib --extern strum_macros=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libstrum_macros-63fe86a8ec39496b.so --extern udev=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libudev-46534f7ad8bb0e12.rlib --extern uuid=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libuuid-0097d70ce688700c.rlib --extern zeroize=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libzeroize-0a6c2b08ab5c2bf3.rlib -C opt-level=2 -C target-cpu=x86-64-v2 -C codegen-units=4 -L . -l 'static:+whole-archive=bcachefs' -l urcu -l zstd -l blkid -l uuid -l sodium -l z -l lz4 -l zstd -l udev -l keyutils -l aio -L native=/usr/lib -L native=/usr/lib -L native=/usr/lib`
error: linking with `clang-18` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/bin:/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/temp/python3.12/bin:/usr/lib/portage/python3.12/ebuild-helpers/xattr:/usr/lib/portage/python3.12/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/18/bin" VSLANG="1033" "clang-18" "-m64" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/temp/rustck0ACp5/symbols.o" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/bcachefs-b50901a3765225fe.bcachefs.4f24321039f24b0a-cgu.0.rcgu.o" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/bcachefs-b50901a3765225fe.bcachefs.4f24321039f24b0a-cgu.1.rcgu.o" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/bcachefs-b50901a3765225fe.bcachefs.4f24321039f24b0a-cgu.2.rcgu.o" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/bcachefs-b50901a3765225fe.bcachefs.4f24321039f24b0a-cgu.3.rcgu.o" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/bcachefs-b50901a3765225fe.1wpmd31zcur1mf80.rcgu.o" "-Wl,--as-needed" "-L" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps" "-L" "." "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib" "-L" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-lbcachefs" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "-lurcu" "-lblkid" "-luuid" "-lsodium" "-lz" "-llz4" "-lzstd" "-ludev" "-lkeyutils" "-laio" "-Wl,-Bstatic" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/librpassword-bbf13e15e4ebe344.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/librtoolbox-282068159219988d.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libudev-46534f7ad8bb0e12.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblibudev_sys-1e1ccf21224cb64d.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libstrum-028bf9870bc635a0.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liberrno-568ff7d64c3d9ad5.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblibc-52f68a03b88e7d57.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libzeroize-0a6c2b08ab5c2bf3.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libeither-4f87be036e4ed6e6.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libcolored-f96a155423524568.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblazy_static-47c2bc8343c03c6b.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblog-b97fb30593cc5eb5.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbch_bindgen-964cab78f36b6033.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libuuid-0097d70ce688700c.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libanyhow-9e31083891bd4549.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbitflags-054010b60f5665a5.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbyteorder-265fe4aec0896d2b.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libmemoffset-5d78ae11666648ba.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbitfield-deeb57517cf31868.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libclap_complete-f8afcb4ccb668f99.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libclap-a4f679c624c865f5.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libclap_builder-3537e637afd287dc.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libterminal_size-7e646be71f32b5ea.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/librustix-2651941186d5ed06.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbitflags-a2a4d60848da9441.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblinux_raw_sys-b0036ef5646c4c75.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libstrsim-c2f41c9d3dd23286.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libanstream-b84c5933c51aa813.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libanstyle_query-7b6392612db3b2c7.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libcolorchoice-ca1441dc4f93fae8.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libanstyle_parse-fe6aea7403760578.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libutf8parse-dcb6aaec7a65e2c3.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libclap_lex-c5d89e66c210dbe9.rlib" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libanstyle-68acc112685a96b9.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-3030366656dda628.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-0a54776be57b4285.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libobject-efd5eda1a09ec684.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libmemchr-83a334aaf25b6dce.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libaddr2line-e311e6072e99409c.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libgimli-6eaf30fd6e79d09e.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_demangle-58c77c307b61256e.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd_detect-d0dd1a63dcc91352.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libhashbrown-bc19cc6cf09ee3d5.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_alloc-5dc18f0b0b4d9730.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libminiz_oxide-24496d543445aa45.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libadler-49447664bab2bcec.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-65168e0ede086d81.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libcfg_if-cb940365c9a52f85.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-512f15422bbf1c0b.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-374d091f02965fae.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_std_workspace_core-44d2cff05e2c2841.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-2696c5f5042e3f70.rlib" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib/libcompiler_builtins-0fbb2f4ec9d6df0e.rlib" "-Wl,-Bdynamic" "-ludev" "-lurcu-common" "-lurcu" "-lkeyutils" "-lunwind" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/lib/rust/1.78.0/lib/rustlib/x86_64-unknown-linux-musl/lib" "-o" "/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/bcachefs-b50901a3765225fe" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs"
  = note: ld.lld: error: undefined symbol: __cpu_model
          >>> referenced by tools-util.c
          >>>               tools-util.o:(crc32c) in archive ./libbcachefs.a
          clang-18: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `bcachefs-tools` (bin "bcachefs") due to 1 previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name bcachefs --edition=2021 src/bcachefs.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=b50901a3765225fe -C extra-filename=-b50901a3765225fe --out-dir /var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps -C strip=debuginfo -L dependency=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps --extern anyhow=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libanyhow-9e31083891bd4549.rlib --extern bch_bindgen=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbch_bindgen-964cab78f36b6033.rlib --extern byteorder=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libbyteorder-265fe4aec0896d2b.rlib --extern clap=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libclap-a4f679c624c865f5.rlib --extern clap_complete=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libclap_complete-f8afcb4ccb668f99.rlib --extern colored=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libcolored-f96a155423524568.rlib --extern either=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libeither-4f87be036e4ed6e6.rlib --extern errno=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liberrno-568ff7d64c3d9ad5.rlib --extern libc=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblibc-52f68a03b88e7d57.rlib --extern log=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/liblog-b97fb30593cc5eb5.rlib --extern rpassword=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/librpassword-bbf13e15e4ebe344.rlib --extern strum=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libstrum-028bf9870bc635a0.rlib --extern strum_macros=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libstrum_macros-63fe86a8ec39496b.so --extern udev=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libudev-46534f7ad8bb0e12.rlib --extern uuid=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libuuid-0097d70ce688700c.rlib --extern zeroize=/var/tmp/portage/sys-fs/bcachefs-tools-1.9.1/work/bcachefs-tools-1.9.1/target/release/deps/libzeroize-0a6c2b08ab5c2bf3.rlib -C opt-level=2 -C target-cpu=x86-64-v2 -C codegen-units=4 -L . -l 'static:+whole-archive=bcachefs' -l urcu -l zstd -l blkid -l uuid -l sodium -l z -l lz4 -l zstd -l udev -l keyutils -l aio -L native=/usr/lib -L native=/usr/lib -L native=/usr/lib` (exit status: 1)
make: *** [Makefile:179: bcachefs] Error 101
 * ERROR: sys-fs/bcachefs-tools-1.9.1::gentoo failed (compile phase):
Comment 1 ernsteiswuerfel archtester 2024-07-01 21:45:00 UTC
Created attachment 896738 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2024-07-01 21:48:13 UTC
This is upstream issue: https://github.com/koverstreet/bcachefs-tools/issues/300

The upstream issue is marked as 'closed' but the issue not really fixed, only a workaround is described. ^^
Comment 3 Marco Rebhan 2024-11-14 21:27:02 UTC
Applying the patch at https://github.com/koverstreet/bcachefs-tools/commit/10dc29d5b9a44e7bb8aff657e73c0c68dccc32b9 from 2 days ago (linked in the above issue) finally fixed this for me.

(I guess the reason the workaround described in the issue doesn't work for me is that the Makefile overrides RUSTFLAGS, so setting it in /etc/portage/env did nothing.)