Re: final link failed: memory exhausted on armv7l

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 10/13/2021 10:06 AM, Björn 'besser82' Esser wrote:
Building with lto disabled is a bad idea, as Fedora intentionally
enabled lto by default.
Yes, but there is nothing inherently wrong with not using LTO.  Many packages opt-out for various reasons.


What you describe as lto requires a lot of memory is caused by building
lto along with non-lto in the same object file requires significantly
more memory.  For that reason one can disable building non-lto along
with lto using the `-f-no-fat-lto-objects` compiler flags instead of
`-f-fat-lto-objects`, if and *only IF* the package in question does
*NOT* ship static libraries.
I doubt fat-lto-objects is the issue here.  The "fat" stuff is ignored at link time as the LTO bytecodes will take precedence.  It is far more likely that the parallel link with all those LTO bytecodes is what's sucking up all the memory.

Note that we build with fat-lto-objects for a reason.  If a package installs any static objects, then those objects must be compiled down to machine code as the LTO bytestreams are not compatible across GCC releases.  -ffat-lto-objects ensures this.

To remedy this situation you have to put in bits to redhat-rpm-config/brp-whatever to fail builds when they install .o/.a files into the buildroot that are purely LTO bytecode streams and identify every package that fails that test and fix them to turn on fat-lto-objects.  I actually wrote some code to do this and ran a Fedora build, but never had the time to act on the resultant data. I've since left Red Hat and haven't had time to come back to the issue.

Jeff
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux