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

Fix native_libs.txt #16

Merged
merged 1 commit into from
Mar 31, 2020
Merged

Fix native_libs.txt #16

merged 1 commit into from
Mar 31, 2020

Conversation

ax3l
Copy link
Contributor

@ax3l ax3l commented Sep 25, 2018

When building additional, auxiliary libraries they should receive proper handling in "native_libs.txt". Surprisingly, this only happens when a trailing / is added.

Also, together with the primary module the (shared) libs will then go into the package directory instead of lying somewhere in the base path.

native_libs.txt also takes care, that these auxiliary, non-python, "native" libs are properly deinstalled as well.

Additional RPATH/RUNPATH handling for auxiliary, "native" libs is likely needed. E.g. on Linux when placing them all in the same base path ($ORIGIN is not a bash variable) of the package:

            '-DCMAKE_INSTALL_RPATH=$ORIGIN',
            '-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON',
            '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF',

while on Windows one can just keep a flat structure in the package, which will be in %PATH% for the primary module and its helper .dlls.

Larger project example: openPMD/openPMD-api#240

When building additional, auxiliary libraries they should receive
proper handling in "native_libs.txt". Surprisingly, this only
happens when a trailing `/` is added.

Also, the primary module will then go into the package directory.

Additional `RPATH`/`RUNPATH` handling for auxiliary, "native" libs
is likely needed. E.g. on Linux/OSX:

```
            '-DCMAKE_INSTALL_RPATH=$ORIGIN',
            '-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON',
            '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF',
```

while on Windows one can just keep a flat structure in the package,
which will be in `%PATH%`.
@leimao
Copy link

leimao commented Feb 20, 2020

This pull request got no responses?

@ax3l
Copy link
Contributor Author

ax3l commented Feb 22, 2020

I know, right? :)

ping @dean0x7d and @SylvainCorlay

@ax3l
Copy link
Contributor Author

ax3l commented Mar 31, 2020

@dean0x7d @wjakob who can merge this PR? Fixes #18 among other linked issues :)

@wjakob
Copy link
Member

wjakob commented Mar 31, 2020

Sure, sorry about the delay.

@wjakob wjakob merged commit 70f17a8 into pybind:master Mar 31, 2020
@ax3l ax3l deleted the fix-extDirNativeLibs branch March 31, 2020 15:59
@ax3l
Copy link
Contributor Author

ax3l commented Mar 31, 2020

No problem, thanks!

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.

3 participants