[Bug 1133254] New: LTO: llvm[67] build fails
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 Bug ID: 1133254 Summary: LTO: llvm[67] build fails Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: martin.liska@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Fails due to: clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation) I would expect the package should use a LTO bootstrap configuration. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 Martin Liška <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1133084 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 http://bugzilla.opensuse.org/show_bug.cgi?id=1133254#c2 --- Comment #2 from Martin Liška <martin.liska@suse.com> --- @Petr: Can you please accept me: https://build.opensuse.org/request/show/697612 https://build.opensuse.org/request/show/697613 ? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 Martin Liška <martin.liska@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|ptesarik@suse.com |martin.liska@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 http://bugzilla.opensuse.org/show_bug.cgi?id=1133254#c3 Aaron Puchert <aaronpuchert@alice-dsl.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aaronpuchert@alice-dsl.net --- Comment #3 from Aaron Puchert <aaronpuchert@alice-dsl.net> --- LLVM is built in two stages: the first stage builds only Clang using GCC, the second stage uses that Clang to compile the entire package. Clang has its own form of LTO, but do you want to use that? Then you'd have to build llvm-ar, llvm-ranlib, LLVMgold in addition to clang in the first stage, and pass them into the second stage. I'm trying this out with llvm7 in my home repo right now. However, I think there is probably not much benefit to be gained, because LLVM has a lot of inline code in headers. In addition, LLVM builds already take very long, and even just ThinLTO is going to make that worse. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 http://bugzilla.opensuse.org/show_bug.cgi?id=1133254#c4 --- Comment #4 from Martin Liška <martin.liska@suse.com> --- (In reply to Aaron Puchert from comment #3)
LLVM is built in two stages: the first stage builds only Clang using GCC, the second stage uses that Clang to compile the entire package. Clang has its own form of LTO, but do you want to use that?
Then you'd have to build llvm-ar, llvm-ranlib, LLVMgold in addition to clang in the first stage, and pass them into the second stage. I'm trying this out with llvm7 in my home repo right now. However, I think there is probably not much benefit to be gained, because LLVM has a lot of inline code in headers.
That's not true, LTO creates a faster binaries with LTO.
In addition, LLVM builds already take very long, and even just ThinLTO is going to make that worse.
For now, I would not make the build even longer. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 http://bugzilla.opensuse.org/show_bug.cgi?id=1133254#c5 --- Comment #5 from Aaron Puchert <aaronpuchert@alice-dsl.net> --- (In reply to Martin Liška from comment #4)
That's not true, LTO creates a faster binaries with LTO. Of course it does, I'm just suspecting it won't be much faster. I'm not doubting the merits of LTO, although I personally prefer Clang's ThinLTO because of the smaller resource usage, and I hope that GCC will offer something similar sometime in the future.
In addition, LLVM builds already take very long, and even just ThinLTO is going to make that worse.
For now, I would not make the build even longer.
I'm not sure if the "lamb" machines all have the same hardware, but the current build in devel:tools:compiler takes ~10000s, while with ThinLTO it takes ~15000s. I should compare the build times on the same machine though to be sure. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 http://bugzilla.opensuse.org/show_bug.cgi?id=1133254#c6 --- Comment #6 from Aaron Puchert <aaronpuchert@alice-dsl.net> --- Created attachment 804931 --> http://bugzilla.opensuse.org/attachment.cgi?id=804931&action=edit Changes needed to enable (Thin)LTO in llvm7 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 http://bugzilla.opensuse.org/show_bug.cgi?id=1133254#c7 --- Comment #7 from Martin Liška <martin.liska@suse.com> --- (In reply to Aaron Puchert from comment #5)
(In reply to Martin Liška from comment #4)
That's not true, LTO creates a faster binaries with LTO. Of course it does, I'm just suspecting it won't be much faster. I'm not doubting the merits of LTO, although I personally prefer Clang's ThinLTO because of the smaller resource usage, and I hope that GCC will offer something similar sometime in the future.
We're not planning to do that. We believe LTO is the right way and we've significantly reduced memory footprint in GCC9 release. Details can be seen here: http://hubicka.blogspot.com/2018/12/firefox-64-built-with-gcc-and-clang.html
In addition, LLVM builds already take very long, and even just ThinLTO is going to make that worse.
For now, I would not make the build even longer.
I'm not sure if the "lamb" machines all have the same hardware, but the current build in devel:tools:compiler takes ~10000s, while with ThinLTO it takes ~15000s. I should compare the build times on the same machine though to be sure.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 http://bugzilla.opensuse.org/show_bug.cgi?id=1133254#c10 Aaron Puchert <aaronpuchert@alice-dsl.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #10 from Aaron Puchert <aaronpuchert@alice-dsl.net> --- We're actually using ThinLTO now for the second stage on most architectures, so I think we can close this. (In reply to Aaron Puchert from comment #5)
I'm not sure if the "lamb" machines all have the same hardware, but the current build in devel:tools:compiler takes ~10000s, while with ThinLTO it takes ~15000s. I should compare the build times on the same machine though to be sure.
As it turns out, the problem is that we enable malloc-checking for builds, which introduces a global lock for allocations. That is a problem for ThinLTO which works by having multiple threads in the same linker process. When turning that off via "unset MALLOC_CHECK_", the ThinLTO-enabled build is not significantly slower than a regular build. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1133254 http://bugzilla.opensuse.org/show_bug.cgi?id=1133254#c11 --- Comment #11 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1133254) was mentioned in https://build.opensuse.org/request/show/932377 Backports:SLE-15-SP3 / llvm12 -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com