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 build fails on Fedora 32 with GCC 10 / binutils 2.34 #36984
Comments
|
Builds ran fine on Fedora 30, 31 and RHEL 8. Here's the Fedora 31 build logs for comparison: https://kojipkgs.fedoraproject.org//packages/godot/3.2.1/1.fc31/data/logs/x86_64/build.log https://kojipkgs.fedoraproject.org//packages/godot/3.2.1/1.fc31/data/logs/x86_64/root.log gcc-9.2.1-1.fc31.x86_64 |
|
On Mageia 8 with binutils 2.34 and gcc 9.3.0.RC1, it works fine. So I guess it's related to GCC 10, or specific flags that Fedora 32+ would have enabled. |
|
dnf install make gcc-c++ Welcome to fedora modular age! |
https://kojipkgs.fedoraproject.org//work/tasks/2482/42402482/root.log |
|
and libstdc++? Fedora is now extreemly modular. I build godot 2 days ago on vm, but i do not remember all packages needed. |
It's all in the log, ctrl+f can answer :) https://kojipkgs.fedoraproject.org//work/tasks/2482/42402482/root.log Yes, libstdc++ is installed. |
|
Ok it just finished linking. It builds fine on regular fedora 32 workstation image in gnome boxes vm. With lazy homeuser build options scons p=x11 tools=yes target=release_debug use_lto=yes -j6 verbose=yes. |
|
Thanks for checking, I'll look into it. I suspect that might be linked to the default packaging I just finished upgrading my VM to F32, so I'll be able to experiment too. |
|
Using the same command as on the official package (see OP), I could reproduce the But I didn't reproduce the final linking error yet because my VM doesn't have enough RAM to link, even with Here are the contents of the |
|
After increasing my VM's RAM I could reproduce the same issue as in the OP, so I'm fairly confident it's due to one of the build or linking flags. |
|
No it,s not flags. LTO is unstable somehow. I did 3 builds on VM with Nothing was changed between builds. |
|
That's puzzling... what's surprising also is that it always fails on the same two references, so if it's only those, it might well be something that we do in those constructors that GCC 10 doesn't like, and which we could workaround. I opened a bug report upstream: https://bugzilla.redhat.com/show_bug.cgi?id=1812783 |
|
This may be 2 different problems.
|
|
It doesn't even need |
|
Thanks a lot for testing! That's very useful findings. I'll see if I can reproduce it too, without slow LTO it should be easier :) |
|
@YRTV How much RAM do you have on your VM? Mine has 10 GiB and I just did 3 successful builds with |
|
12 GB of RAM for vm. Host has 16gb total. I hope this will be fixed in GCC 10.1, or i will just distrohop to ubuntu 20.04. |
|
My final bet will be: Node constructors never called until user adds node to the scene (with exeption of some UI nodes used for editor) considered dead code during compilation ,and got eliminated by optimizer. LTO indeed increase chance of that (optimizer has full call graph and function bodies). Try mark nodes classes to not be optimized. |
|
I was unable to reproduce crash with non-LTO buid by running builds all night. As result i do not trust I wanted to try use |
|
That's actually my usual build command locally: |
|
@marxin Did you see any similar LTO issues on the GCC bug tracker for 10+? |
|
I've just build the 3.2.1 version with: and it works fine. I used today's master. |
|
@marxin What OS and binutils versions are you on? |
|
openSUSE Tumbleweed and |
|
@marxin was binaries actually optimized? LTO can fail silently. https://gcc.gnu.org/onlinedocs/gccint/LTO-Overview.html#LTO-Overview https://wiki.debian.org/LTO You can build on fedora 32 by killing optimizer with |
|
It builds with gcc 10 on OpenSUSE and binaries are smaller with LTO. But on SUSE where is 2 versions of binutils LTO plugin. I don't know how to check which one is loaded during build. Can scons still load gcc 9 version of plugin in binutils when CC and CXX set to gcc-10 g++-10. |
Yes. I'm GCC developer working on LTO a lot, so I'm sure. |
Note that plugin are compatible and do not play role here. You can load gcc-9 LTO plugin for GCC 10 LTO bytecode and it will work fine! |
|
I'll check if Fedora 32's pending update to |
Still failing on Fedora 32 with that update. |
|
Do you have a Fedora package somewhere? If so, I would create an issue at RedHat bugzilla. I know about a Fedora guy who can debug that. |
This is from the official I opened a rhbz bug report already: https://bugzilla.redhat.com/show_bug.cgi?id=1812783 |
|
For the reference, I'm running Mageia 8 now with binutils 2.34 and GCC 10.1 and I don't have this LTO issue. Last time I tried to reproduce the bug on Fedora I ran into another breakage with their LTO wrapper, so it's a bit confusing. I'll throw a new build on Koji eventually to see how it behaves on current Rawhide. |
|
@akien-mga Have you managed to build it on Fedora system? |
|
On Fedora 32 in a podman container it works fine, which is what we use for official builds. The problem that led to this issue was only seen when updating the Fedora package on Koji - which is why Fedora still doesn't have Godot 3.2.1-stable packaged. I'm waiting to release 3.2.2-stable to try again. |
|
Ah, ok. Anyway, we would be pleased as openSUSE if you use for official builds ;) |
|
For the reference, it builds fine on F33 and later, while there's still a problem on F32. As F32 will soon be EOL, I consider this fixed. |
Godot version:
3.2.1-stable,
masterbranch possibly affected too.OS/device including version:
Linux, Fedora 32 and 33 with GCC 10
Issue description:
LTO build for the official
godotpackage on Fedora 32 and 33 fails when linking:Full build log: https://kojipkgs.fedoraproject.org//work/tasks/2482/42402482/build.log
Build environment: https://kojipkgs.fedoraproject.org//work/tasks/2482/42402482/root.log
gcc-10.0.1-0.8.fc32.x86_64
binutils-2.34-2.fc32.x86_64
The text was updated successfully, but these errors were encountered: