Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 907889

Summary: dev-util/include-what-you-use: linker error: multiple undefined reference with LLVM 16.0.5
Product: Gentoo Linux Reporter: foearb <stffn.mobil>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info include-what-you-use
build.log

Description foearb 2023-06-05 08:42:09 UTC
I get multiple underfined references when linking include-what-you-use with LLVM 16.0.5.

Reproducible: Always

Steps to Reproduce:
1. Emerge Clang and LLVM 16.0.5
2. Emerge include-what-you-use-0.20
Actual Results:  
Link fails.

Expected Results:  
Link succeeds
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-05 08:43:20 UTC
Please include the full build.log and emerge --info.
Comment 2 foearb 2023-06-05 08:47:30 UTC
Created attachment 863319 [details]
emerge --info include-what-you-use
Comment 3 foearb 2023-06-05 08:47:59 UTC
Compiles with Clang.
Comment 4 foearb 2023-06-05 08:48:48 UTC
Created attachment 863320 [details]
build.log
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-05 08:50:43 UTC
-- IWYU: configuring for LLVM 16.0.5+libcxx from /usr/lib/llvm/16/lib64/cmake/llvm

This makes it sound like you're mixing libstdc++ and libcxx which is invalid.
Comment 6 foearb 2023-06-05 08:53:42 UTC
Right, I have my LLVM stack compiled with Clang, but that linker error didn't happen before that...
I have linker issue with mesa[llvm] as well.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-05 08:56:45 UTC
(In reply to nobounce from comment #6)
> Right, I have my LLVM stack compiled with Clang, but that linker error
> didn't happen before that...

That doesn't matter, unfortunately. If something links with LLVM, it's going to get libcxx gunk.

It's okay to build LLVM with Clang, but if you're going to do it with libcxx *as well*, you can't mix it with libstdc++.