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

nodejs-22.yaml: Add openssf-options #31754

Conversation

justinvreeland
Copy link
Member

No description provided.

@justinvreeland justinvreeland added the openssf-compiler-options Track adding openssf-compiler-options label Oct 23, 2024
@justinvreeland
Copy link
Member Author

justinvreeland commented Oct 25, 2024

gcc not our options looks like abseil/abseil-cpp#1634

@xnox xnox added the approved-to-run A repo member has approved this external contribution label Nov 12, 2024
Copy link
Contributor

octo-sts bot commented Nov 12, 2024

Gen AI suggestions to solve the build error:

Based on the build error, this appears to be a C++20 compatibility issue with Node.js v22.10.0's V8 engine code. The specific errors are related to template-id constructor syntax that was deprecated in C++20.

Here are a few approaches to resolve this:

  1. Add compiler flags to force C++17 mode:
  - name: Configure and build
    runs: |
      # Add C++17 flag
      export CXXFLAGS="${CXXFLAGS} -std=c++17"
      # Rest of the configuration...
  1. Add the following environment variable to disable C++20 features:
environment:
  contents:
    packages:
      # Existing packages...
    environment:
      DISABLE_CXX20: "1"
  1. If those don't work, you could try adding these configure flags:
      python3 configure.py --prefix=/usr \
        --shared-brotli \
        --shared-zlib \
        --shared-openssl \
        --shared-cares \
        --shared-nghttp2 \
        --shared-libuv \
        --ninja \
        --openssl-use-def-ca-store \
        --with-icu-default-data-dir=$(icu-config --icudatadir) \
        --with-intl=system-icu \
        --openssl-conf-name=openssl_conf \
        --without-corepack \
        --gdb=no \
        --v8-enable-handle-zapping=no

Try option 1 first as it's the most straightforward solution for C++20 compatibility issues. The error messages specifically indicate template-id constructor syntax issues that were valid in C++17 but not in C++20.

@justinvreeland
Copy link
Member Author

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 openssf-compiler-options Track adding openssf-compiler-options
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants