Created attachment 365796 [details] build.log.bz2 I was told my emerge that llvm now has an xml USE flag so I decided to try to compile it but for some reason it wont compile. Emerge just fails with this: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/Makefile.rules:841: recipe for target 'all' failed make: *** [all] Error 1 * ERROR: sys-devel/llvm-9999::gentoo failed (compile phase): * emake failed and the build log seems to be about the same. I had to compress the build log because it fails near what would have been the end of the compilation of llvm.
Created attachment 365798 [details] output of emerge --info
Created attachment 365800 [details] emerge -pqv output
Looks like llvm needs gcc with LTO support: x86_64-pc-linux-gnu-g++ -O3 -march=amdfam10 -ftracer -fweb -pipe -O3 -march=amdfam10 -ftracer -fweb -pipe -O3 -march=amdfam10 -ftracer -fweb -pipe -O3 -march=amdfam10 -ftracer -fweb -pipe -O3 -march=amdfam10 -ftracer -fweb -pipe -I/usr/include/ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -march=amdfam10 -ftracer -fweb -pipe -Wl,-R -Wl,'$ORIGIN' -rdynamic -L/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/lib -L/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/lib -Wl,-O1 -Wl,--sort-common -Wl,-z,combreloc -O3 -march=amdfam10 -ftracer -fweb -pipe -Wl,-O1 -Wl,--sort-common -Wl,-z,combreloc -O3 -march=amdfam10 -ftracer -fweb -pipe -Wl,-O1 -Wl,--sort-common -Wl,-z,combreloc -O3 -march=amdfam10 -ftracer -fweb -pipe -Wl,-O1 -Wl,--sort-common -Wl,-z,combreloc -O3 -march=amdfam10 -ftracer -fweb -pipe -Wl,-O1 -Wl,--sort-common -Wl,-z,combreloc -O3 -march=amdfam10 -ftracer -fweb -pipe -L/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/lib/lib -Wl,-O1 -Wl,--sort-common -Wl,-z,combreloc -O3 -march=amdfam10 -ftracer -fweb -pipe -shared -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/lib/LLVMgold.so /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/gold/Release/gold-plugin.o \ -lLLVM-3.5svn -Wl,--version-script,/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/gold/Release/gold.exports.map -ludis86 -lz -lpthread -lffi -lcurses -ldl -lm -lLTO /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find -lLTO collect2: error: ld returned 1 exit status /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/Makefile.rules:1157: recipe for target '/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/lib/LLVMgold.so' failed make[2]: *** [/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/Release/lib/LLVMgold.so] Error 1 make[2]: Leaving directory '/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-amd64/tools/gold' /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/Makefile.rules:900: recipe for target 'gold/.makeall' failed make[1]: *** [gold/.makeall] Error 2 make[1]: *** Waiting for unfinished jobs....
well I have compiled gcc with USE=lto since 4.5 at least. If this isn't enough to turn on LTO support please tell me what I have to do to get it turned on lol.
(In reply to Robert from comment #4) > well I have compiled gcc with USE=lto since 4.5 at least. If this isn't > enough to turn on LTO support please tell me what I have to do to get it > turned on lol. I was wrong about this. It's not the lto-support in gcc. I've made it work by disabling the gold-linker plugin of llvm (USE="-gold"). And this way I get the following message on install: >>> Installing (1 of 1) sys-devel/llvm-9999 * QA Notice: Symbolic link /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so points to /usr/lib64/LLVMgold.so which does not exist. >>> Auto-cleaning packages... /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so is a stale symlink, pointing to ls -l /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so lrwxrwxrwx 1 root root 29 Dec 24 03:30 /usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so -> ../../../../lib64/LLVMgold.so and belongs to sys-devel/llvm-9999 itself
It seems that it tries to link against system libLTO instead of built one. I will try to fix it later. The USE=-gold symlink bug fixed.
+ 24 Dec 2013; Michał Górny <mgorny@gentoo.org> llvm-9999.ebuild: + Fix libLTO linking parallel make issue, bug #494922.