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

Add abseil-cpp spec to workaround GCC issue w/ openssf-compiler-options #34201

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

dannf
Copy link
Contributor

@dannf dannf commented Nov 15, 2024

Fixes: #34075

Also merges a few automated package update PRs that were blocked by this.

Blocked by chainguard-dev/melange#1651

justinvreeland
justinvreeland previously approved these changes Nov 15, 2024
@dannf
Copy link
Contributor Author

dannf commented Nov 15, 2024

The elastic build of libreoffice failed because it didn't actually have a build-dep on abseil-cpp-dev, and therefore couldn't find the spec file. I had pre-installed a locally built abseil-cpp-dev when I tested locally, so it worked for me. libreoffice vendors a copy of abseil-cpp, but does support a --use-system-abseil configure flag. I've turned that on and force pushed.

@dannf dannf added the blocked indicates there are blocking issues that need to be addressed before progress can be made label Nov 17, 2024
@dannf
Copy link
Contributor Author

dannf commented Nov 17, 2024

I've pushed a new version that puts the spec files in a new abseil-cpp-compiler-options package instead of bundling them with abseil-cpp-dev. This reduces the dependency chain on packages that vendor in their own abseil-cpp source.

wolfi-bot and others added 13 commits November 18, 2024 13:58
…C bug

abseil-cpp and packages that use it began to FTBFS after the introduction of
openssf-compiler-options, specifically its addition of the
-fno-delete-null-pointer-checks flag. This is believed to be a GCC bug:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962

Unfortunately it isn't possible to "undo" this flag by appending the
inverse flag (-fdelete-null-pointer-checks). So here we introduce a
new package that provides a spec file that will filter out the
problematic flag from the openssf spec file. Fixes wolfi-dev#34075.

This commit uses the spec file to build abseil-cpp itself, and
ships it in the abseil-cpp-compiler-options apk so abseil-cpp's reverse
dependencies, as well as packages that vendor their own abseil-cpp source,
can be updated to use it.

Signed-off-by: dann frazier <[email protected]>
`python3` is explicitly called in the pipeline so we should have an
explicit dependency on it. This was causing us to FTBFS until recently,
when we inherited `python3` as a transitive dependency of `cython-0`.

Fixes: bb98184 ("make grpc-1.67 multi-version python. (wolfi-dev#31676)")
Without py3.13-cython, the build will fail once we add python3.13
support with errors like:

  src/python/grpcio/grpc/_cython/cygrpc.cpp: In function 'void __Pyx_init_assertions_enabled()':
  src/python/grpcio/grpc/_cython/cygrpc.cpp:6399:39: error: '_PyInterpreterState_GetConfig' was not declared in this scope; did you mean 'PyInterpreterState_GetID'?
   6399 |     __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
        |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        |                                       PyInterpreterState_GetID

cython-0 and py3.12-cython currently contain overlapping files, so
we can't have both installed. grpc-1.67 builds fine w/o cython-0,
so let's just drop it.

Signed-off-by: dann frazier <[email protected]>
Signed-off-by: dann frazier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved-to-run A repo member has approved this external contribution blocked indicates there are blocking issues that need to be addressed before progress can be made
Projects
None yet
Development

Successfully merging this pull request may close these issues.

abseil-cpp and rdeps FTBFS
4 participants