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

Bug 595106

Summary: app-forensics/afl fails to build with sys-devel/llvm-3.8.1-r2[default-compiler-rt default-libcxx]: unable to load plugin '../afl-llvm-pass.so': '../afl-llvm-pass.so: undefined symbol
Product: Gentoo Linux Reporter: jo77ah
Component: Current packagesAssignee: Hanno Böck <hanno>
Status: RESOLVED FIXED    
Severity: normal CC: ago, jaak, jstein, llvm, pageexec, quentin, toralf
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
afl-2.35b.ebuild-force-clang-rtlib-stdlib.patch

Description jo77ah 2016-09-25 14:52:22 UTC
If sys-devel/llvm-3.8.1-r2 is compiled with USE="default-libcxx default-compiler-rt", afl fails to compile llvm_mode.

I don't have the old build.log around, but i could recompile llvm and reproduce it, if needed.
Comment 1 Agostino Sarubbo gentoo-dev 2016-09-25 16:24:55 UTC
I'm checking.
Comment 2 Agostino Sarubbo gentoo-dev 2016-09-25 16:56:37 UTC
Created attachment 447868 [details]
build log
Comment 3 jo77ah 2016-09-26 15:51:19 UTC
that is the error i got.
Comment 4 Hanno Böck gentoo-dev 2016-09-26 17:41:54 UTC
CCing llvm team, maybe they have an idea.
I'm not familiar with these use flags.
Comment 5 Quentin Minster 2016-11-03 18:56:08 UTC
Created attachment 452282 [details, diff]
afl-2.35b.ebuild-force-clang-rtlib-stdlib.patch
Comment 6 Quentin Minster 2016-11-03 18:57:05 UTC
Same error here. This can be worked around by forcing clang to use the standard stdlib and rtlib, see attached ebuild patch.

But then that makes it deviate from the user's choice to default to compiler-rt and libc++. I'm not sure that qualifies as a proper, tree-worthy fix.
Comment 7 Hanno Böck gentoo-dev 2016-11-05 12:12:12 UTC
I must admit I'm unfamiliar how the different compilers and standard libraries interact. Anyone from the llvm team wants to comment?

If we commit something to support that useflag combination I'd appreciate if I could get confirmation from some Gentoo dev familiar with that stuff that it's a good solution.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-11-05 14:03:02 UTC
The whole issue looks weird. I don't know what AFL is supposed to do but it looks that the pass is missing libraries, and -stdlib/-rtlib exposing it is purely a coincidence.
Comment 9 Hanno Böck gentoo-dev 2018-12-06 10:15:29 UTC
*** Bug 663420 has been marked as a duplicate of this bug. ***
Comment 10 Jonas Stein gentoo-dev 2020-02-22 20:12:05 UTC
Does this bug still appear with current sys-devel/llvm versions, or can we close the ticket?
Comment 11 Toralf Förster gentoo-dev 2020-02-22 21:05:31 UTC
fixed IMO