Summary: | www-client/firefox-52.1, mail-client/thunderbird-52.1 : LTO error: unrecognized command line option ‘--param lto-partitions=1’ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Petross404(Petros S) <petross404> |
Component: | Current packages | Assignee: | Mozilla Gentoo Team <mozilla> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bob.mt.wya, hojuruku, holger, jstein, petross404, sarnex, steffen |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: |
build.log
emerge --info moz.build patch to build with LTO |
Description
Petross404(Petros S)
2017-05-13 21:56:21 UTC
Created attachment 472514 [details]
build.log
Created attachment 472516 [details]
emerge --info
I forgot to mention about the shell issue, that the whole problem boils down to a missing "=".
Try : echo | g++ -c -x c++ "--param lto-partitions=1" -
then : echo | g++ -c -x c++ "--param=lto-partitions=1" -
If disabling the sandbox isn't safe or elegant solution, we should take care this issue after all.
Created attachment 472684 [details, diff]
moz.build patch to build with LTO
www-client/firefox is also affected. The last hunk of the attached patch (with adding "mozilla" after a/ and b) fixes this. No solution, just updating sumary to include firefox (In reply to Ian Stakenvicius from comment #5) > No solution, just updating sumary to include firefox Thats wrong, see #3 and #4. Yes you're right, that was bad wording on my part. What I meant was, I was not providing or commenting on any solution. :) I'll review this next week once my testing box is ready to go. It looks very straight-forward, so I expect after testing it'll be no problem to commit. Easy sed hack to "fix" it: + # fix lto flag, causes command line error + sed -i -e "s|--param lto-partitions=1|-flto-partition=one|" \ + "${S}"/security/sandbox/linux/moz.build \ + "${S}"/ipc/app/pie/moz.build \ + "${S}"/ipc/app/moz.build + + Put this in src_prepare after the usual patches. Takes a while to link but it does work... Just a heads-up to everyone on this bug -- all mozilla packages currently in the gentoo repo support building of a .mozconfig that accepts values that are specified in EXTRA_ECONF, so there's no need to try and patch or overlay ebuilds to add options to the configuration. Now back to this bug. Do all of the supplied solutions still require sandbox to be disabled? (In reply to Ian Stakenvicius from comment #9) > Just a heads-up to everyone on this bug -- all mozilla packages currently in > the gentoo repo support building of a .mozconfig that accepts values that > are specified in EXTRA_ECONF, so there's no need to try and patch or overlay > ebuilds to add options to the configuration. > > Now back to this bug. Do all of the supplied solutions still require > sandbox to be disabled? Hi Ian, I did not need to disable to sandbox to build with LTO, but I did need that patch above. Could you explain how to use EXTRA_ECONF to apply the settings in comment 8? Thanks. (In reply to Nick Sarnie from comment #10) > (In reply to Ian Stakenvicius from comment #9) > > Just a heads-up to everyone on this bug -- all mozilla packages currently in > > the gentoo repo support building of a .mozconfig that accepts values that > > are specified in EXTRA_ECONF, so there's no need to try and patch or overlay > > ebuilds to add options to the configuration. > > > > Now back to this bug. Do all of the supplied solutions still require > > sandbox to be disabled? > > Hi Ian, > > I did not need to disable to sandbox to build with LTO, but I did need that > patch above. Could you explain how to use EXTRA_ECONF to apply the settings > in comment 8? > > > Thanks. Interestingly, my google-fu has failed me in finding documentation on this. Anyhow, EXTRA_ECONF is an environment variable you can use to set any extra arguments you want a package's ./configure to take. You can set it on the commandline when you emerge a package or you can set it in /etc/portage/package.env. See the following for a few more details: https://wiki.gentoo.org/wiki/etc/portage/package.env http://gentoo.linuxhowtos.org/TipsTricks/configoptions.htm EXTRA_ECONF is an environment variable that you can set on the command line when you emerge something, or in /etc/portage/package.env Why not make the ebuild work out of the box with cflags detection and drop the tips and the workarounds? (In reply to Ian Stakenvicius from comment #11) > (In reply to Nick Sarnie from comment #10) > > (In reply to Ian Stakenvicius from comment #9) > > > Just a heads-up to everyone on this bug -- all mozilla packages currently in > > > the gentoo repo support building of a .mozconfig that accepts values that > > > are specified in EXTRA_ECONF, so there's no need to try and patch or overlay > > > ebuilds to add options to the configuration. > > > > > > Now back to this bug. Do all of the supplied solutions still require > > > sandbox to be disabled? > > > > Hi Ian, > > > > I did not need to disable to sandbox to build with LTO, but I did need that > > patch above. Could you explain how to use EXTRA_ECONF to apply the settings > > in comment 8? > > > > > > Thanks. > > Interestingly, my google-fu has failed me in finding documentation on this. > Anyhow, EXTRA_ECONF is an environment variable you can use to set any extra > arguments you want a package's ./configure to take. You can set it on the > commandline when you emerge a package or you can set it in > /etc/portage/package.env. See the following for a few more details: > > https://wiki.gentoo.org/wiki/etc/portage/package.env > http://gentoo.linuxhowtos.org/TipsTricks/configoptions.htm > > > > EXTRA_ECONF is an environment variable that you can set on the command line > when you emerge something, or in /etc/portage/package.env Thanks, but for this issue in particular, the compile fails because an incorrect parameter is in the mozconfig. EXTRA_CONF is not enough based on my first look. We would need to not generate the --param lto-partitions=1 and then use EXTRA_CONF to add the correct parameter. This does look like it requires an ebuild modification. Firefox-52.5.2 has been fixed in tree along with thunderbird-52.5.0 Thanks for the patience. Would you consider adding the patch for firefox-57.0.1 as well? *** Bug 644502 has been marked as a duplicate of this bug. *** https://bugs.gentoo.org/644502 bug #644502 Suggest fixing with a patch not using portage variables. mozbuild only want's to use these cflags in one module. *** Bug 644502 has been marked as a duplicate of this bug. *** |