-
Notifications
You must be signed in to change notification settings - Fork 148
Fix idraw from PyPI wheel that fails with "invalid ELF header". #3771
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
base: master
Are you sure you want to change the base?
Changes from all commits
fa96b13
c6e37fa
d15a3a1
f0bdff0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,27 @@ project( | |
| LANGUAGES C CXX | ||
| HOMEPAGE_URL "https://nrn.readthedocs.io/") | ||
|
|
||
| # ============================================================================= | ||
| # Fixes for Linux wheels | ||
| # ============================================================================= | ||
|
|
||
| # Force PIE for all executables (idraw, nrniv, etc.) This was the root cause of the original | ||
| # "invalid ELF header: RTLD_GLOBAL" error. | ||
| cmake_policy(SET CMP0083 NEW) | ||
| set(CMAKE_POSITION_INDEPENDENT_CODE | ||
| ON | ||
| CACHE BOOL "Force PIE for NEURON + InterViews" FORCE) | ||
|
|
||
| # Disable fragile dynamic X11 loading *only* for Linux wheels. This was triggering the (null) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there a way we could add a test for this, so we aren't bitten by it again?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe so. I'll look into adding a instead of Ironically, I need to investigate this PR more thoroughly as, on the surface, 100% of the fix is the "Disable fragile dynamic X11 loading". (I.e. a wheel created by still shows wheras one created by shows |
||
| # RTLD_GLOBAL error. macOS wheels and normal/local Linux builds keep the original default (ON). | ||
| if(SKBUILD | ||
| AND UNIX | ||
| AND NOT APPLE) | ||
| set(IV_ENABLE_X11_DYNAMIC | ||
| OFF | ||
| CACHE BOOL "Disable on Linux wheels" FORCE) | ||
| endif() | ||
|
|
||
| # ============================================================================= | ||
| # CMake common project settings | ||
| # ============================================================================= | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this implied by
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)? I think it's only 3.13 and earlier that use the old behavior?