Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 872344 - sys-libs/libcxxabi-15.0.1 - clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
Summary: sys-libs/libcxxabi-15.0.1 - clang-15: error: linker command failed with exit ...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2022-09-22 09:56 UTC by Toralf Förster
Modified: 2022-09-22 20:13 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.24 KB, text/plain)
2022-09-22 09:56 UTC, Toralf Förster
Details
CMakeError.log (CMakeError.log,7.24 KB, text/plain)
2022-09-22 09:56 UTC, Toralf Förster
Details
CMakeOutput.log (CMakeOutput.log,1.28 KB, text/plain)
2022-09-22 09:56 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,97.47 KB, text/plain)
2022-09-22 09:56 UTC, Toralf Förster
Details
environment (environment,156.35 KB, text/plain)
2022-09-22 09:56 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,12.99 KB, application/x-bzip)
2022-09-22 09:56 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,2.55 KB, application/x-bzip)
2022-09-22 09:56 UTC, Toralf Förster
Details
sys-libs:libcxxabi-15.0.1:20220922-002043.log (sys-libs:libcxxabi-15.0.1:20220922-002043.log,5.86 KB, text/plain)
2022-09-22 09:56 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,36.29 KB, application/x-bzip)
2022-09-22 09:56 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-09-22 09:56:10 UTC
    FAILED: cmTC_fceb4 
    : && /usr/lib/llvm/15/bin/i686-pc-linux-gnu-clang -pipe -march=native -fno-diagnostics-color -O2  CMakeFiles/cmTC_fceb4.dir/testCCompiler.c.o -o cmTC_fceb4   && :
    ld.lld: error: unable to find library -lunwind
    ld.lld: error: unable to find library -lunwind
    clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-j4-20220921-110005

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-12.2.1 *
clang/llvm (if any):
clang version 15.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
/usr/lib/llvm/15
15.0.1
Python 3.10.7
Available Rust versions:
  [1]   rust-bin-1.63.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.16.1_p1 [openjdk-bin-11]
*)	Eclipse Temurin JDK 17.0.4.1_p1 [openjdk-bin-17]
3)	Eclipse Temurin JDK 8.345_p01 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
GNU Make 4.3

  HEAD of ::gentoo
commit 2d5d30da1bd4281cedf9a8af2aeca54b3d054c20
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu Sep 22 00:02:01 2022 +0000

    2022-09-22 00:02:01 UTC

emerge -qpvO sys-libs/libcxxabi
[ebuild  N    ] sys-libs/libcxxabi-15.0.1  USE="clang -static-libs -test -verify-sig" ABI_X86="32 (64) (-x32)"
Comment 1 Toralf Förster gentoo-dev 2022-09-22 09:56:11 UTC
Created attachment 813526 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-09-22 09:56:12 UTC
Created attachment 813529 [details]
CMakeError.log
Comment 3 Toralf Förster gentoo-dev 2022-09-22 09:56:13 UTC
Created attachment 813532 [details]
CMakeOutput.log
Comment 4 Toralf Förster gentoo-dev 2022-09-22 09:56:14 UTC
Created attachment 813535 [details]
emerge-history.txt
Comment 5 Toralf Förster gentoo-dev 2022-09-22 09:56:16 UTC
Created attachment 813538 [details]
environment
Comment 6 Toralf Förster gentoo-dev 2022-09-22 09:56:17 UTC
Created attachment 813541 [details]
etc.portage.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-09-22 09:56:18 UTC
Created attachment 813544 [details]
logs.tar.bz2
Comment 8 Toralf Förster gentoo-dev 2022-09-22 09:56:19 UTC
Created attachment 813547 [details]
sys-libs:libcxxabi-15.0.1:20220922-002043.log
Comment 9 Toralf Förster gentoo-dev 2022-09-22 09:56:20 UTC
Created attachment 813550 [details]
temp.tar.bz2
Comment 10 Jimmy.Jazz 2022-09-22 12:11:35 UTC
RUSTFLAGS="${RUSTFLAGS} -C link-arg=-lunwind" resolved the issue for me
Comment 11 Jimmy.Jazz 2022-09-22 12:15:33 UTC
(In reply to Jimmy.Jazz from comment #10)
> RUSTFLAGS="${RUSTFLAGS} -C link-arg=-lunwind" resolved the issue for me

oops ignore the noise, wrong patch (works for icecat)
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-22 15:39:16 UTC
Was sys-devel/clang built with USE="default-compiler-rt"?
Comment 13 Toralf Förster gentoo-dev 2022-09-22 16:20:53 UTC
(In reply to Michał Górny from comment #12)
> Was sys-devel/clang built with USE="default-compiler-rt"?

# emerge -qpvO sys-devel/clang
[ebuild   R   ] sys-devel/clang-15.0.1  USE="default-compiler-rt default-libcxx default-lld (pie) static-analyzer xml -debug -doc -llvm-libunwind -test -verify-sig" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (MSP430) (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86) (XCore) (-ARC) (-CSKY) (-DirectX) (-LoongArch) (-M68k) (-SPIRV)" PYTHON_SINGLE_TARGET="python3_10 -python3_8 -python3_9 -python3_11"
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-22 16:24:01 UTC
Essentially the problem seems to be that you're trying to build libcxxabi with abi_x86_32 but you've built libunwind without.  Unfortunately clang can't properly depend on the right set of ABI_X86 flags on its runtime dependencies.