Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907485 - www-client/firefox-113.0.2: build fails when using sys-devel/mold
Summary: www-client/firefox-113.0.2: build fails when using sys-devel/mold
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-31 12:53 UTC by Kai-Chun Ning
Modified: 2023-06-06 19:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tarball with build log (build.log.tar.gz,832.89 KB, application/gzip)
2023-05-31 12:56 UTC, Kai-Chun Ning
Details
emerge --info (emerge.log,3.67 KB, text/x-log)
2023-06-01 12:55 UTC, Kai-Chun Ning
Details
build.log compressed (build.log.bz2,826.48 KB, application/x-bzip2)
2023-06-01 12:56 UTC, Kai-Chun Ning
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai-Chun Ning 2023-05-31 12:53:13 UTC
Building Firefox failed with error message:

[builtins-static 0.1.0] Failed to run rustfmt: No such file or directory (os error 2) (non-fatal, continuing)

Please see build.log for the USE flags for firefox.

dev-lang/rust was built without USE=rustfmt, and the linker used is sys-devel/mold instead of sys-devel/lld, which might be related to the issue.
Comment 1 Kai-Chun Ning 2023-05-31 12:56:35 UTC
Created attachment 862968 [details]
tarball with build log
Comment 2 Mike Gilbert gentoo-dev 2023-05-31 14:44:45 UTC
Comment on attachment 862968 [details]
tarball with build log

Please do not use tar when compressing single files.
Comment 3 Mike Gilbert gentoo-dev 2023-05-31 14:45:38 UTC
Please provide emerge --info and change the status to UNCONFIRMED.
Comment 4 Kai-Chun Ning 2023-06-01 12:55:39 UTC
Created attachment 863004 [details]
emerge --info
Comment 5 Kai-Chun Ning 2023-06-01 12:56:57 UTC
Created attachment 863005 [details]
build.log compressed
Comment 6 Kai-Chun Ning 2023-06-01 13:07:30 UTC
I emerged dev-lang/rust with USE=rustfmt and tested again. The compilation still failed. The build log suggests that the issue is related to mold:

^[7^[8^[[1G^[[K^[[34m98:24.40^[(B^[[m mold: fatal: /var/tmp/portage/www-client/firefox-113.0.2/work/firefox_build/toolkit/library/build/libxul_so.list:1022: INPUT("../../../gfx/cairo/cairo/src/cairo-polygon-intersect.o")^[(B^[[m^[(B^[[m
^[7^[8^[[1G^[[K^[[34m98:24.40^[(B^[[m                                                                                                                       ^ library not found: ../../../gfx/cairo/cairo/src/cairo-polygon-intersect.o^[(B^[[m^[(B^[[m
^[7^[8^[[1G^[[K^[[34m98:24.40^[(B^[[m clang-15: error: linker command failed with exit code 1 (use -v to see invocation)^[(B^[[m^[(B^[[m
^[7^[8^[[1G^[[K^[[34m98:24.40^[(B^[[m gmake[4]: *** [/var/tmp/portage/www-client/firefox-113.0.2/work/firefox-113.0.2/config/rules.mk:535: libxul.so] Error 1^[(B^[[m^[(B^[[m
^[7^[8^[[1G^[[K^[[34m98:24.40^[(B^[[m gmake[4]: Leaving directory '/var/tmp/portage/www-client/firefox-113.0.2/work/firefox_build/toolkit/library/build'^[(B^[[m^[(B^[[m
^[7^[8^[[1G^[[K^[[34m98:24.40^[(B^[[m gmake[3]: *** [/var/tmp/portage/www-client/firefox-113.0.2/work/firefox-113.0.2/config/recurse.mk:72: toolkit/library/build/target] Error 2^[(B^[[m^[(B^[[m
Comment 7 Kai-Chun Ning 2023-06-01 15:18:20 UTC
possible cause: https://github.com/rui314/mold/issues/851
Comment 8 Joonas Niilola gentoo-dev 2023-06-02 10:17:00 UTC
Yeah, this should be fixed on next mold's release. I'm a bit reluctant adding hacky workarounds in the ebuild meanwhile. 

Just increase your ulimit meanwhile for a temporary workaround. I'll leave the bug open until mold upstream makes a new release.

See also bug #892641
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-02 13:18:27 UTC
(In reply to Joonas Niilola from comment #8)
> Yeah, this should be fixed on next mold's release. I'm a bit reluctant
> adding hacky workarounds in the ebuild meanwhile. 
> 
> Just increase your ulimit meanwhile for a temporary workaround. I'll leave
> the bug open until mold upstream makes a new release.
> 
> See also bug #892641

It's not clear to me that it's really fixed in mold, rather just better error handling so you get a proper error rather than something vague here.

I think we still need people to increase their ulimit.
Comment 10 Kai-Chun Ning 2023-06-03 09:11:31 UTC
with -clang +jumbo-build +lto +pgo and mold, 113.0.2 builds. There was no need to increase ulimit.
Comment 11 Joonas Niilola gentoo-dev 2023-06-03 11:45:04 UTC
(In reply to Kai-Chun Ning from comment #10)
> with -clang +jumbo-build +lto +pgo and mold, 113.0.2 builds. There was no
> need to increase ulimit.

With this combination bfd is forced, regardless of user settings. So mold wasn't used there.

I'll increase the ulimit for 114 when mold is being used with lto.
Comment 12 Larry the Git Cow gentoo-dev 2023-06-06 19:21:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39cfe283ccf6455b9781e4ac8ac15c9cf9937ed6

commit 39cfe283ccf6455b9781e4ac8ac15c9cf9937ed6
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2023-06-06 19:12:21 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-06-06 19:15:33 +0000

    www-client/firefox: add 114.0
    
     - enable 'valgrind' use flag,
     - include couple upstream skia patches from the upcoming 115 release,
     - increase ulimit in the ebuild when using mold linker and 'lto' use flag so
       the build does not fail.
    
    Bug: https://bugs.gentoo.org/838373
    Closes: https://bugs.gentoo.org/700934
    Closes: https://bugs.gentoo.org/905780
    Closes: https://bugs.gentoo.org/906509
    Closes: https://bugs.gentoo.org/907485
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-client/firefox/Manifest             |  101 +++
 www-client/firefox/firefox-114.0.ebuild | 1445 +++++++++++++++++++++++++++++++
 2 files changed, 1546 insertions(+)