Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 951143 - dev-lang/zig-0.14.0: fails to build with llvm
Summary: dev-lang/zig-0.14.0: fails to build with llvm
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Eric Joldasov
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-03-10 22:03 UTC by robertgzr
Modified: 2025-04-18 18:00 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,30.83 KB, text/x-log)
2025-03-10 22:04 UTC, robertgzr
Details
test patch to revert changes (zig-0.14.0-revert-linker-script-check.patch,19.39 KB, patch)
2025-03-12 12:27 UTC, Eric Joldasov
Details | Diff
another try fix (zig-0.14.0-libcxx-link-fix.patch,628 bytes, patch)
2025-03-27 20:46 UTC, Eric Joldasov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description robertgzr 2025-03-10 22:03:14 UTC
this is the relevant line from the build.log:

/var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0_build/zig2 build-exe -fallow-so-scripts --stack 48234496 /var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0_build/zigcpp/libzigcpp.a /usr/lib/llvm/19/lib64/libclang-cpp.so /usr/lib/llvm/19/lib64/liblldMinGW.so /usr/lib/llvm/19/lib64/liblldELF.so /usr/lib/llvm/19/lib64/liblldCOFF.so /usr/lib/llvm/19/lib64/liblldWasm.so /usr/lib/llvm/19/lib64/liblldMachO.so /usr/lib/llvm/19/lib64/liblldCommon.so /usr/lib/llvm/19/lib64/libLLVM-19+libcxx.so /usr/lib64/libc++.so -lunwind -fno-sanitize-thread -OReleaseFast -target native-native -mcpu alderlake -I /usr/lib/llvm/19/include -I /usr/lib/llvm/19/include -L /usr/lib/llvm/19/lib64 --dep aro --dep aro_translate_c --dep build_options -Mroot=/var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0/src/main.zig -Maro=/var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0/lib/compiler/aro/aro.zig --dep aro -Maro_translate_c=/var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0/lib/compiler/aro_translate_c.zig -Mbuild_options=/var/tmp/portage/dev-lang/zig-0.14.0/temp/zig-cache/local/c/cb4b9e3c9e9c40f15cfb35a7cb39a35c/options.zig -lc --libc /var/tmp/portage/dev-lang/zig-0.14.0/temp/zig_libc.txt --cache-dir /var/tmp/portage/dev-lang/zig-0.14.0/temp/zig-cache/local/ --global-cache-dir /var/tmp/portage/dev-lang/zig-0.14.0/temp/zig-cache/global/ --name zig --zig-lib-dir /var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0/lib// --listen=- 
[2minstall
(0mq(B install zig
   (0mq(B zig build-exe zig ReleaseFast native-native[31m failure
[0m[0m[31merror: [0merror: libc++abi.so: file listed in linker script not found

[31merror: [0mthe following command exited with error code 1:

Reproducible: Always
Comment 1 robertgzr 2025-03-10 22:04:40 UTC
Created attachment 920549 [details]
build.log
Comment 2 Eric Joldasov 2025-03-12 12:24:59 UTC
This is on LLVM profile right?

Please check if this patch fixes it.
Comment 3 Eric Joldasov 2025-03-12 12:27:13 UTC
Created attachment 920611 [details, diff]
test patch to revert changes
Comment 4 robertgzr 2025-03-12 21:54:56 UTC
it doesn't look like that helped, the error is different now though:

/var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0_build/zig2 build-exe -fallow-so-scripts --stack 48234496 /var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0_build/zigcpp/libzigcpp.a /usr/lib/llvm/19/lib64/libclang-cpp.so /usr/lib/llvm/19/lib64/liblldMinGW.so /usr/lib/llvm/19/lib64/liblldELF.so /usr/lib/llvm/19/lib64/liblldCOFF.so /usr/lib/llvm/19/lib64/liblldWasm.so /usr/lib/llvm/19/lib64/liblldMachO.so /usr/lib/llvm/19/lib64/liblldCommon.so /usr/lib/llvm/19/lib64/libLLVM-19+libcxx.so /usr/lib64/libc++.so -lunwind -fno-sanitize-thread -OReleaseFast -target native-native -mcpu alderlake -I /usr/lib/llvm/19/include -I /usr/lib/llvm/19/include -L /usr/lib/llvm/19/lib64 --dep aro --dep aro_translate_c --dep build_options -Mroot=/var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0/src/main.zig -Maro=/var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0/lib/compiler/aro/aro.zig --dep aro -Maro_translate_c=/var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0/lib/compiler/aro_translate_c.zig -Mbuild_options=/var/tmp/portage/dev-lang/zig-0.14.0/temp/zig-cache/local/c/cb4b9e3c9e9c40f15cfb35a7cb39a35c/options.zig -lc --libc /var/tmp/portage/dev-lang/zig-0.14.0/temp/zig_libc.txt --cache-dir /var/tmp/portage/dev-lang/zig-0.14.0/temp/zig-cache/local/ --global-cache-dir /var/tmp/portage/dev-lang/zig-0.14.0/temp/zig-cache/global/ --name zig --zig-lib-dir /var/tmp/portage/dev-lang/zig-0.14.0/work/zig-0.14.0/lib// --listen=- 
[2minstall
(0mq(B install zig
   (0mq(B zig build-exe zig ReleaseFast native-native[31m failure
[0m[0m[31merror: [0merror: unable to find dynamic system library 'c++abi' using strategy 'no_fallback'. searched paths:
  /usr/lib/llvm/19/lib64/libc++abi.so
error: unable to find dynamic system library 'c++_shared' using strategy 'no_fallback'. searched paths:
  /usr/lib/llvm/19/lib64/libc++_shared.so
Comment 5 robertgzr 2025-03-12 21:55:25 UTC
(In reply to Eric Joldasov from comment #2)
> This is on LLVM profile right?

yes
Comment 6 Eric Joldasov 2025-03-27 20:46:20 UTC
Created attachment 923136 [details, diff]
another try fix

What about this patch? I have tested on separate partition llvm/libcxx profile and it seems to fix things, although it was a little bit counter-intuitive at start...
Comment 7 robertgzr 2025-03-28 12:57:47 UTC
(In reply to Eric Joldasov from comment #6)
> Created attachment 923136 [details, diff] [details, diff]
> another try fix
> 
> What about this patch?
this one worked, thanks :)