Bug 2304756
| Summary: | gcc fails to build mozjs128 where clang succeeds | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | František Zatloukal <fzatlouk> | ||||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||||
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | rawhide | CC: | david.abdurachmanov, dmalcolm, fweimer, jakub, jlaw, josmyers, jwakely, mcermak, mpolacek, msebor, nickc, nixuser, sipoyare, xry111 | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | Type: | Bug | |||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
František Zatloukal
2024-08-13 23:40:15 UTC
Created attachment 2044180 [details]
build log
Created attachment 2044181 [details]
dist-git tarball
FYI, I've left commented out '%global toolchain clang' to experiment with, the clang build fails too at a later point (due to packaging in progress, on brp-mangle-shebangs ). As for the steps how to reproduce, the first one should be with git add mozjs128.spec & git commit, sorry. This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle. Changing version to 42. When I work on another distro I found the same symptom is triggered by "-fexception" in the default CXXFLAGS setting of that distro. The mozjs build system appends the CXXFLAGS from environment after the flags set on its own, and this -fexception overrides the -fno-exception set by the mozjs build system then things can go wrong. But I've not figured out the full event of chain how this leads to the cryptic "error: ‘static void js::gc::Cell::operator delete(void*)’ is private within this context." I can confirm that adding:
%global optflags %(echo %{optflags} | sed -e 's/-fexceptions//g')
Resolves compilation error with toolchain is GCC.
|