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

Build with -Wl,-z,noexecstack to fix glibc 2.41 compatibility #355

Closed
wants to merge 3 commits into from

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Feb 10, 2025

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Explicitly pass -Wl,-z,noexecstack to the linker, to ensure that libpytorch_cpu.so is compiled without an executable stack. This is necessary because the raw assembly in oneDNN triggers:

$BUILD_PREFIX/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: warning: ittptmark64.S.o: missing .note.GNU-stack section implies executable stack

...and glibc 2.41 no longer permits loading libraries with executable stack.

Fixes #350

Explicitly pass `-Wl,-z,noexecstack` to the linker, to ensure that
`libpytorch_cpu.so` is compiled without an executable stack.  This is
necessary because the raw assembly in oneDNN triggers:

```
$BUILD_PREFIX/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: warning: ittptmark64.S.o: missing .note.GNU-stack section implies executable stack
```

...and glibc 2.41 no longer permits loading libraries with executable
stack.

Fixes conda-forge#350
@conda-forge-admin
Copy link
Contributor

conda-forge-admin commented Feb 10, 2025

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/meta.yaml:

  • ℹ️ The recipe is not parsable by parser conda-souschef (grayskull). This parser is not currently used by conda-forge, but may be in the future. We are collecting information to see which recipes are compatible with grayskull.
  • ℹ️ The recipe is not parsable by parser conda-recipe-manager. The recipe can only be automatically migrated to the new v1 format if it is parseable by conda-recipe-manager.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/13243950771. Examine the logs at this URL for more detail.

@h-vetinari
Copy link
Member

Thank you very much! 🙏

I'll pick this into #346 before merging

@h-vetinari
Copy link
Member

This was picked into #346 as 9f6f4db - closing

@h-vetinari h-vetinari closed this Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImportError: libtorch_cpu.so: cannot enable executable stack as shared object requires: Invalid argument
3 participants