Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssf-compiler-options: allow -fdelete-null-pointer-checks to workaround abseil-cpp-related FTBFS #38781

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

dannf
Copy link
Contributor

@dannf dannf commented Jan 4, 2025

abseil-cpp and its reverse dependencies (including those that vendor their own copy) FTBFS with an option from openssf-compiler-options (-fno-delete-null-pointer-checks). A GCC bug means this can't be undone by just adding the inverse flag to CXXFLAGS or similar. This adds logic to openssf-compiler-options to not pass the breaking flag at all iff the inverse flag is provided.

This also adds the inverse flag to the subset of impacted packages that do not also require a rebuild of abseil-cpp itself, because doing so would trigger an unrelated bug in melange, which I've described in a comment within.

Fixes: #34075

@dannf dannf added the approved-to-run A repo member has approved this external contribution label Jan 4, 2025
@dannf dannf enabled auto-merge January 4, 2025 15:16
@dannf dannf added the service:ftbfs Failed to Build From Source label Jan 4, 2025
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Jan 4, 2025
@dannf dannf force-pushed the openssf-allow-fno-delete-null-pointer branch from 3caf110 to 1bf66d6 Compare January 4, 2025 15:20

This comment was marked as resolved.

@dannf dannf added the ai/skip-comment Stop AI from commenting on PR label Jan 4, 2025
@dannf dannf force-pushed the openssf-allow-fno-delete-null-pointer branch 5 times, most recently from 9a54119 to e1ecd09 Compare January 5, 2025 17:12
@dannf dannf changed the title openssf-compiler-options: allow -fno-delete-null-pointer to workaround abseil-cpp FTBFS openssf-compiler-options: allow -fdelete-null-pointer to workaround abseil-cpp-related FTBFS Jan 5, 2025
@dannf dannf changed the title openssf-compiler-options: allow -fdelete-null-pointer to workaround abseil-cpp-related FTBFS openssf-compiler-options: allow -fdelete-null-pointer-checks to workaround abseil-cpp-related FTBFS Jan 5, 2025
@dannf dannf disabled auto-merge January 5, 2025 17:28
@dannf dannf enabled auto-merge January 5, 2025 17:29
dannf added 4 commits January 5, 2025 11:07
Using -fdelete-null-pointer to "undo" this flag is not sufficient
due to a GCC bug[*]. So let's tell the spec file to just omit
-fno-delete-null-pointer if -fdelete-null-pointer was explicitly
passed. This will give us a path to workaround build failures
in software that is incompatible with this flag (notably
abseil-cpp).

Generated with this command:
  sed -i 's/-fno-delete-null-pointer-checks/%{!fdelete-null-pointer-checks:-fno-delete-null-pointer-checks}/' openssf-compiler-options/usr/lib/gcc/*/*/openssf.spec

Fixes: wolfi-dev#34075

[*] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962

Signed-off-by: dann frazier <[email protected]>
Add explicit build-dep on openssf-compiler-options so that CI
orders the builds correctly.

While this fixes a FTBFS, allowing a new abseil-cpp into the
archive would trigger an issue in current versions of melange[*],
so I'm avoiding bumping the epoch at this time.

Fixes: wolfi-dev#34075

[*] chainguard-dev/melange#1651

Signed-off-by: dann frazier <[email protected]>
… OS team

Updates may cause build problems until this issue is resolved:
   chainguard-dev/melange#1651

Signed-off-by: dann frazier <[email protected]>
…ackages

We only need to override -fno-delete-null-pointer-checks
for these packages to build. Add explicit build-deps on
openssf-compiler-options so that CI orders the builds correctly.
Also fix some incorrect issue links.

This is the subset of abseil-cpp dependent packages that can benefit
from this without also requiring a rebuild of abseil-cpp.

Signed-off-by: dann frazier <[email protected]>
@dannf dannf force-pushed the openssf-allow-fno-delete-null-pointer branch from e1ecd09 to 98f77b1 Compare January 5, 2025 18:10
@dannf dannf requested review from justinvreeland and xnox January 5, 2025 23:56
@dannf dannf merged commit f04e5e4 into wolfi-dev:main Jan 6, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/skip-comment Stop AI from commenting on PR approved-to-run A repo member has approved this external contribution bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. service:ftbfs Failed to Build From Source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

abseil-cpp and rdeps FTBFS
2 participants