Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 829033

Summary: www-client/firefox-91.4.0: firefox_build/dist/system_wrappers/new:3:15: fatal error: 'new' file not found
Product: Gentoo Linux Reporter: Felix Janda <felix.janda>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: normal CC: musl, orbea
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build.log

Description Felix Janda 2021-12-13 02:45:22 UTC
Building firefox on amd64 musl based system with rust-1.56.1::musl yields the error:

firefox_build/dist/system_wrappers/new:3:15: fatal error: 'new' file not found
#include_next <new>

Reproducible: Always
Comment 1 Felix Janda 2021-12-13 02:46:17 UTC
Created attachment 758731 [details]
emerge --info
Comment 2 Felix Janda 2021-12-13 02:47:53 UTC
Created attachment 758732 [details]
build.log
Comment 3 Felix Janda 2022-01-05 15:19:57 UTC
Doing some more digging, the problem in the failing clang command seems to be the "--target=x86_64-unknown-linux-musl", which should be "--target=x86_64-gentoo-linux-musl".
Comment 4 Felix Janda 2022-01-05 15:50:51 UTC
clang++ --target=x86_64-unknown-linux-musl test.cpp for test.cpp containing only "#include_next <new>" reproduces the error (for both clang-13.0.0 and clang-12.0.1).
Comment 5 Jory A. Pratt gentoo-dev 2022-01-05 23:20:05 UTC
enable default_libcxx will workaround your issue at the moment, we have diagnosed this several times on #gentoo-hardened.
Comment 6 Felix Janda 2022-01-06 22:46:12 UTC
Enabling default-libcxx for sys-devel/clang allowed firefox to compile, thanks.
Comment 7 Larry the Git Cow gentoo-dev 2022-08-21 04:53:32 UTC
The bug has been referenced in the following commit(s):

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

commit c2987a324e7f3cb20bbeff6d2a83c69f3d1a2dc1
Author:     Alfred Persson Forsberg <cat@catcream.org>
AuthorDate: 2022-07-27 20:54:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-21 04:53:03 +0000

    profiles/*/musl/package.mask: unmask www-client/firefox
    
    This unmasks Firefox and use.mask's clang and pgo.
    
    Bug: https://bugs.gentoo.org/829033
    Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
    Closes: https://github.com/gentoo/gentoo/pull/24663
    Closes: https://github.com/gentoo/gentoo/pull/26629
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/default/linux/musl/package.mask | 6 ------
 profiles/features/musl/package.mask      | 6 ------
 profiles/features/musl/package.use.mask  | 5 +++++
 3 files changed, 5 insertions(+), 12 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2022-10-15 23:26:29 UTC
The bug has been referenced in the following commit(s):

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

commit e66a4f8582fc9c34e41b428a6f6a1270493f00fe
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-15 23:21:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-15 23:26:19 +0000

    profiles/default/linux: unmask www-client/firefox[clang] on LLVM profiles
    
    We end up crashing when building gecko-profiler otherwise but
    the mask doesn't make sense on these profiles anyway, as the issue
    that led to them being masked was wrt libcxx - and on these profiles,
    we always have libcxx.
    
    Bug: https://bugs.gentoo.org/829033
    Bug: https://bugs.gentoo.org/877021
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/default/linux/amd64/17.0/musl/clang/package.use.mask | 6 ++++++
 profiles/default/linux/arm64/17.0/musl/llvm/package.use.mask  | 6 ++++++
 2 files changed, 12 insertions(+)
Comment 9 orbea 2023-01-29 22:20:46 UTC
With sys-libs/musl-1.2.3, sys-devel/llvm-15.0.7, sys-devel/clang-15.0.7-r1 and www-client/firefox-109.0 this now builds using USE=clang where llvm is entirely self-hosted.

I am unsure about stable versions or llvm built with gcc.
Comment 10 orbea 2023-01-29 22:33:03 UTC
> where llvm is entirely self-hosted.

Correction, its self-hosted except for libcxx where I have USE=-default-libcxx.