-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LTO Problems with sys-devel/llvm-10, and PGO problems with www-client/firefox #526
Comments
I've had some problems with LLVM and for me the solution was to also remove |
@leandrolnh I've rebuild LLVM 10 without Yup, Firefox was able to build. |
@TheGreatMcPain to be clear, removing |
@InBetweenNames I removed it from sys-devel/llvm-10. Although, if I'm compiling LLVM using clang I have to disable LTO. |
I experienced same issue with Steam client. Rebuilding llvm without optimizations fixed it. I didn't try rebuilding it with only removing -fipa-pta, but i'll give it a try. |
Has anyone enountered/been able to fix profileserver.py hanging when using Same as these: |
Unfortunately I haven't ran into that problem yet. |
@telans you can't build firefox with PGO enabled under GCC, atm, there was note somewhere about that. It works with clang. |
@telans I remember it happening to me at some point, don't remember what fixed that. Possibly new ebuild version. Do you have custom cflags enabled? The profiling server is python based maybe it's related? |
@barolo I haven't seen pg_overlay's version of it before, thanks |
@telans ah, yeah, I've made that mistake when trying to build it via ssh once. PG build has lto enabled for rust parts too, it applies tons of privacy patches though, disabling things like ff accounts/sync. Which might not be for everyone |
BorisCarvajal , your hint works great for me. My box recently tried to update to clang 10, and I got the error "Two passes with the same argument (-amdgpu-argument-reg-usage-info)" when building some tools like compiler-rt. Your tip fixed it:
Then rebuild llvm and after that the other packages like compiler-rt. |
I've never been unable to build Firefox with USE="clang lto pgo". All of my LLVM/clang tools have been built with -O2 at most. Unsure why...I think it has to do with rust? LLVM build flags
Firefox compile error
LTO/PGO with GCC 10.2.0 is fine, however.
I didn't append that last bit in my CXXFLAGS myself, that's from the package itself. 1 |
@jiblime Not sure if I can help with your LLVM/CLANG issue, but I'm glad to see GCC working again. Maybe you could send a The only reason I was using clang for firefox is because the |
@jiblime I'm building firefox with lto, cross-lto, pgo and O3 successfully for a couple of versions now, I'm using firefox from pg_overlay [ llvm 10 ] |
It's alright as long as it works, it must be my system if everyone else's fine. What's cross-lto? Always fails here:
|
@jiblime cross-lto allows for LTO between rust and C++ if I'm recalling correctly. No idea about that stack though |
Is there a performance improvement with compiling firefox with clang over gcc? |
I not sure, but the only reason I was using clang at the time, was because gcc wouldn't compile it at the time I opened this issue. Also, Mozilla uses clang in their pre-built packages of Firefox. |
@Titaniumtown @TheGreatMcPain It depends, there was point where skia rendering library used by FF was significantly slower under gcc than clang due to clanfg specific optimizations, it was fixed some time ago in gcc afaik. On the javascript side gcc usually produced faster results in benches. There's crossLTO for rust parts under clang now too... |
This is more of a continuation of #490 regarding an issue with Firefox and LLVM 10.
If sys-devel/llvm-10 is compiled using GCC, and LTO, clang will segfault with this error that contains.
(I haven't tried GCC 10 yet, but I know this happens with GCC 9)
You can either disable LLVM_TARGETS="AMDGPU", or compile llvm without LTO to fix that segfault.
If LLVM is compiled using clang the segfault will clear up as well, but the problem with Firefox happens if LLVM is compiled with clang, and LTO. Here's the
package.env
that I use to compile packages with clang, and LTO.When I attempt to emerge Firefox with the useflags clang, pgo, and lto while LLVM has been compiled with LTO. Firefox will fail with an error that I think relates to PGO: [build.log.tar.gz(https://github.com/InBetweenNames/gentooLTO/files/4639143/build.log.tar.gz)
Now if I rebuild LLVM without
-flto=thin
and-Wl,--lto-O2
Firefox will successfully build.I am currently using the default GentooLTO CFLAGS, but with -falign-functions=32, and with pie disabled on sys-devel/gcc.
The text was updated successfully, but these errors were encountered: