Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917263 - app-arch/xz-utils-5.4.5[pgo] - ld.lld: error: cannot open /usr/lib/llvm/16/bin/../../../../lib/clang/16/lib/linux/libclang_rt.profile-x86_64.a: No such file or directory clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
Summary: app-arch/xz-utils-5.4.5[pgo] - ld.lld: error: cannot open /usr/lib/llvm/16/bi...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: LD-is-lld, systemwide-lld
  Show dependency tree
 
Reported: 2023-11-12 20:48 UTC by ernsteiswuerfel
Modified: 2023-11-26 00:41 UTC (History)
1 user (show)

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


Attachments
build.log (xz-utils-5.4.5:20231112-130834.log,331.98 KB, text/plain)
2023-11-12 20:48 UTC, ernsteiswuerfel
Details
emerge --info (file_917263.txt,7.80 KB, text/plain)
2023-11-12 20:49 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2023-11-12 20:48:16 UTC
Created attachment 874608 [details]
build.log

Happens on a musl/clang system when building with USE +pgo:

[...]
libtool: link: clang -shared  -fPIC -DPIC  .libs/liblzma_la-tuklib_physmem.o .libs/liblzma_la-tuklib_cpucores.o .libs/liblzma_la-common.o .libs/liblzma_la-block_util.o .libs/liblzma_la-easy_preset.o .libs/liblzma_la-filter_common.o .libs/liblzma_la-hardware_physmem.o .libs/liblzma_la-index.o .libs/liblzma_la-stream_flags_common.o .libs/liblzma_la-string_conversion.o .libs/liblzma_la-vli_size.o .libs/liblzma_la-hardware_cputhreads.o .libs/liblzma_la-outqueue.o .libs/liblzma_la-alone_encoder.o .libs/liblzma_la-block_buffer_encoder.o .libs/liblzma_la-block_encoder.o .libs/liblzma_la-block_header_encoder.o .libs/liblzma_la-easy_buffer_encoder.o .libs/liblzma_la-easy_encoder.o .libs/liblzma_la-easy_encoder_memusage.o .libs/liblzma_la-filter_buffer_encoder.o .libs/liblzma_la-filter_encoder.o .libs/liblzma_la-filter_flags_encoder.o .libs/liblzma_la-index_encoder.o .libs/liblzma_la-stream_buffer_encoder.o .libs/liblzma_la-stream_encoder.o .libs/liblzma_la-stream_flags_encoder.o .libs/liblzma_la-vli_encoder.o .libs/liblzma_la-stream_encoder_mt.o .libs/liblzma_la-microlzma_encoder.o .libs/liblzma_la-alone_decoder.o .libs/liblzma_la-auto_decoder.o .libs/liblzma_la-block_buffer_decoder.o .libs/liblzma_la-block_decoder.o .libs/liblzma_la-block_header_decoder.o .libs/liblzma_la-easy_decoder_memusage.o .libs/liblzma_la-file_info.o .libs/liblzma_la-filter_buffer_decoder.o .libs/liblzma_la-filter_decoder.o .libs/liblzma_la-filter_flags_decoder.o .libs/liblzma_la-index_decoder.o .libs/liblzma_la-index_hash.o .libs/liblzma_la-stream_buffer_decoder.o .libs/liblzma_la-stream_decoder.o .libs/liblzma_la-stream_flags_decoder.o .libs/liblzma_la-vli_decoder.o .libs/liblzma_la-stream_decoder_mt.o .libs/liblzma_la-microlzma_decoder.o .libs/liblzma_la-lzip_decoder.o .libs/liblzma_la-check.o .libs/liblzma_la-crc32_table.o .libs/liblzma_la-crc32_fast.o .libs/liblzma_la-crc64_table.o .libs/liblzma_la-crc64_fast.o .libs/liblzma_la-sha256.o .libs/liblzma_la-lz_encoder.o .libs/liblzma_la-lz_encoder_mf.o .libs/liblzma_la-lz_decoder.o .libs/liblzma_la-lzma_encoder_presets.o .libs/liblzma_la-lzma_encoder.o .libs/liblzma_la-lzma_encoder_optimum_fast.o .libs/liblzma_la-lzma_encoder_optimum_normal.o .libs/liblzma_la-fastpos_table.o .libs/liblzma_la-lzma_decoder.o .libs/liblzma_la-lzma2_encoder.o .libs/liblzma_la-lzma2_decoder.o .libs/liblzma_la-price_table.o .libs/liblzma_la-delta_common.o .libs/liblzma_la-delta_encoder.o .libs/liblzma_la-delta_decoder.o .libs/liblzma_la-simple_coder.o .libs/liblzma_la-simple_encoder.o .libs/liblzma_la-simple_decoder.o .libs/liblzma_la-x86.o .libs/liblzma_la-powerpc.o .libs/liblzma_la-ia64.o .libs/liblzma_la-arm.o .libs/liblzma_la-armthumb.o .libs/liblzma_la-arm64.o .libs/liblzma_la-sparc.o   -Wl,--as-needed -lpthread  -O2 -march=bdver3 -mtune=bdver3 -fprofile-update=atomic -fprofile-dir=/var/tmp/portage/app-arch/xz-utils-5.4.5/temp/amd64-pgo -fprofile-generate=/var/tmp/portage/app-arch/xz-utils-5.4.5/temp/amd64-pgo -Wl,-O1 -Wl,-z -Wl,pack-relative-relocs   -pthread -Wl,-soname -Wl,liblzma.so.5 -o .libs/liblzma.so.5.4.5
ld.lld: error: cannot open /usr/lib/llvm/16/bin/../../../../lib/clang/16/lib/linux/libclang_rt.profile-x86_64.a: No such file or directory
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [Makefile:960: liblzma.la] Error 1
make[4]: Leaving directory '/var/tmp/portage/app-arch/xz-utils-5.4.5/work/xz-5.4.5-abi_x86_64.amd64/src/liblzma'
make[3]: *** [Makefile:1744: all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/app-arch/xz-utils-5.4.5/work/xz-5.4.5-abi_x86_64.amd64/src/liblzma'
make[2]: *** [Makefile:426: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-arch/xz-utils-5.4.5/work/xz-5.4.5-abi_x86_64.amd64/src'
make[1]: *** [Makefile:621: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-arch/xz-utils-5.4.5/work/xz-5.4.5-abi_x86_64.amd64'
make: *** [Makefile:490: all] Error 2
 * ERROR: app-arch/xz-utils-5.4.5::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2023-11-12 20:49:04 UTC
Created attachment 874609 [details]
emerge --info
Comment 2 Chris Pritchard 2023-11-25 11:28:47 UTC
Try installing sys-libs/compiler-rt-sanitizers (use=profile must be enabled) and re-emerging. I've seen this error a few times and they tend to work with this. Probably worth adding as a dependency if clang/lld is being used and use=pgo
Comment 3 ernsteiswuerfel archtester 2023-11-25 22:29:28 UTC
(In reply to Chris Pritchard from comment #2)
> Try installing sys-libs/compiler-rt-sanitizers (use=profile must be enabled)
> and re-emerging.
Yes, that did the trick. Many thanks for the hint!

I had sys-devel/clang-runtime built with USE="-sanitize" for whatever reason I forgot and as a consequence sys-libs/compiler-rt-sanitizers had not been built at all.

So I second it could be a good idea to add compiler-rt-sanitizers as dep for +pgo builds for clang-based systems.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-26 00:41:18 UTC
(In reply to ernsteiswuerfel from comment #3)
> So I second it could be a good idea to add compiler-rt-sanitizers as dep for
> +pgo builds for clang-based systems.

How could the ebuild check that? It can't really without us just adding it to @system on such profiles (which might be ok).