Closed Bug 1988166 Opened 10 months ago Closed 8 days ago

fatal error: sys/single_threaded.h: No such file or directory

Categories

(Firefox Build System :: General: Unsupported Platforms, defect, P3)

defect

Tracking

(firefox-esr115 unaffected, firefox-esr140 unaffected, firefox-esr153 affected, firefox152 wontfix, firefox153 fixed, firefox154 fixed)

RESOLVED FIXED
154 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox-esr153 --- affected
firefox152 --- wontfix
firefox153 --- fixed
firefox154 --- fixed

People

(Reporter: petr.sumbera, Assigned: conorboyle07, NeedInfo)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Steps to reproduce:

Solaris build fails with:

 3:04.95 In file included from /usr/gcc/13/include/c++/13.2.0/ext/atomicity.h:38,
 3:04.95                  from /usr/gcc/13/include/c++/13.2.0/bits/ios_base.h:39,
 3:04.96                  from /usr/gcc/13/include/c++/13.2.0/ios:44,
 3:04.96                  from /builds/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/system_wrappers/ios:3,
 3:04.96                  from /builds/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/stl_wrappers/ios:62,
 3:04.96                  from /usr/gcc/13/include/c++/13.2.0/istream:40,
 3:04.96                  from /builds/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/system_wrappers/istream:3,
 3:04.96                  from /builds/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/stl_wrappers/istream:62,
 3:04.96                  from /usr/gcc/13/include/c++/13.2.0/sstream:40,
 3:04.97                  from /builds/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/system_wrappers/sstream:3,
 3:04.97                  from /builds/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/include/mozilla/glue/Debug.h:14,
 3:04.97                  from /builds/psumbera/mozilla-central-build/mozglue/misc/Debug.cpp:7:
 3:04.97 /builds/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/system_wrappers/sys/single_threaded.h:3:15: fatal error: sys/single_threaded.h: No such file or directory
 3:04.97     3 | #include_next <sys/single_threaded.h>
 3:04.97       |               ^~~~~~~~~~~~~~~~~~~~~~~
 3:04.97 /builds/psumbera/mozilla-central-build/nsprpub/pr/src/misc/prnetdb.c: In function ?PR_GetIPNodeByName?:
 3:04.98 compilation terminated.
Keywords: regression

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → Firefox Build System
Regressed by: 1987546

:glandium, since you are the author of the regressor, bug 1987546, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(mh+mozilla)
Severity: -- → S3
Priority: -- → P3

I guess I just hit this when compiling spidermonkey-144.0_beta1

40:45.63 In file included from /var/tmp/portage/dev-lang/spidermonkey-144.0/work/firefox-144.0/intl/components/src/Bidi.cpp:5:
40:45.64 In file included from /var/tmp/portage/dev-lang/spidermonkey-144.0/work/spidermonkey_build/dist/include/mozilla/intl/Bidi.h:8:
40:45.64 In file included from /var/tmp/portage/dev-lang/spidermonkey-144.0/work/spidermonkey_build/dist/include/mozilla/intl/ICU4CGlue.h:8:
40:45.65 In file included from /var/tmp/portage/dev-lang/spidermonkey-144.0/work/spidermonkey_build/dist/system_wrappers/unicode/uenum.h:3:
40:45.66 In file included from /usr/include/unicode/uenum.h:25:
40:45.66 In file included from /usr/include/unicode/localpointer.h:45:
40:45.67 In file included from /var/tmp/portage/dev-lang/spidermonkey-144.0/work/spidermonkey_build/dist/system_wrappers/memory:3:
40:45.68 In file included from /usr/lib/gcc/armv7a-unknown-linux-musleabihf/14/include/g++-v14/memory:80:
40:45.68 In file included from /usr/lib/gcc/armv7a-unknown-linux-musleabihf/14/include/g++-v14/bits/shared_ptr.h:53:
40:45.69 In file included from /usr/lib/gcc/armv7a-unknown-linux-musleabihf/14/include/g++-v14/bits/shared_ptr_base.h:61:
40:45.70 In file included from /usr/lib/gcc/armv7a-unknown-linux-musleabihf/14/include/g++-v14/ext/atomicity.h:38:
40:45.71 /var/tmp/portage/dev-lang/spidermonkey-144.0/work/spidermonkey_build/dist/system_wrappers/sys/single_threaded.h:3:15: fatal error: 'sys/single_threaded.h' file not found
40:45.71 3 | #include_next <sys/single_threaded.h>
40:45.72 | ^~~~~~~~~~~~~~~~~~~~~~~
40:50.57 1 error generated.

Attached file build.log.gz β€”

full build log, using clang-20

For Solaris I use following workaround (not good for Linux):

diff -r a69500eb2373 -r 535aa421e6ef config/system-headers.mozbuild                                                  
--- a/config/system-headers.mozbuild    Thu Oct 05 00:56:26 2023 -0700
+++ b/config/system-headers.mozbuild    Thu Sep 11 23:11:19 2025 -0700                                               
@@ -864,7 +864,6 @@          
     "sys/shm.h",                                                                                                    
     "sys/siginfo.h",        
     "sys/signal.h",                                                                                                 
-    "sys/single_threaded.h",
     "sys/socket.h",                                                                                                 
     "sys/sockio.h",         
     "sys/sparc/frame.h",                                                                                            
@@ -1376,6 +1375,7 @@        
 if CONFIG["OS_TARGET"] in ("Android", "Linux", "FreeBSD"):
     system_headers += [
         "sys/auxv.h",
+        "sys/single_threaded.h",
     ]
 
 if CONFIG["OS_TARGET"] == "Linux" and CONFIG["TARGET_CPU"].startswith("mips"):

I can reproduce as well - sys/single_threaded.h does not exist on Musl, and simply removing it from system_headers seems to make the build go through.

Component: General → General: Unsupported Platforms

The component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit BugBot documentation.

Priority: P3 → --
Priority: -- → P3

don't hesitate to provide a patch :)

Flags: needinfo?(mh+mozilla)

sys/single_threaded.h is glibc/FreeBSD-specific and does not
exist on musl libc, breaking the build.

Follow the same approach as bug 1952657 (execinfo.h): move the
header out of the unconditional system_headers list and gate it
on a check_header() probe.

Assignee: nobody → conorboyle07
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

thanks for the patch, I've just tested it with spidermonkey-153.0_beta2, on a musl system, and it works perfectly fine.

if it sticks to nightly, please consider a backport for 152.0-esr branch, and 153.0_beta branch.

hey, the fix is working as intended.

can the process of merging this into nightly be triggered, please?

Flags: needinfo?(ahochheiden)

I've queued it to land.

Flags: needinfo?(ahochheiden)

[Tracking Requested - why for this release]:

this bug also affects firefox-153.0 beta branch, which will become firefox-153.0-esr branch soon.

please uplift to 153.0 beta branch if there is still time to do it, if not please uplift to firefox-153.0-esr branch

thank you

Status: ASSIGNED → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch

Hi @tt_1, would uplifting to 153.0 be something I have to do? Apologies as this is my first contribution and amn't too sure how it works haha, will be happy to help if you could let me know what I have to do!(In reply to tt_1 from comment #14)

[Tracking Requested - why for this release]:

this bug also affects firefox-153.0 beta branch, which will become firefox-153.0-esr branch soon.

please uplift to 153.0 beta branch if there is still time to do it, if not please uplift to firefox-153.0-esr branch

thank you

The patch landed in nightly and beta is affected.
:conorboyle07, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(conorboyle07)

sys/single_threaded.h is glibc/FreeBSD-specific and does not
exist on musl libc, breaking the build.

Follow the same approach as bug 1952657 (execinfo.h): move the
header out of the unconditional system_headers list and gate it
on a check_header() probe.

Original Revision: https://phabricator.services.mozilla.com/D308106

Attachment #9608668 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Tier 3 build failure
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: Very limited build-only change
  • String changes made/needed?: N/A
  • Is Android affected?: no
Attachment #9608668 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: