Properly setting RPATH in Python extensions #663
Unanswered
voidtrance
asked this question in
Q&A
Replies: 2 comments 7 replies
-
|
@voidtrance isn't this essentially the same question as gh-662? Or is it a follow-up question for the same package (that discussion did touch on Also, it would be good to put the example in a standalone GitHub repo, that's a lot easier to look at and discuss than a tarball. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Can anyone help with this? Is this a |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an application which includes a Python extension. The extension links against a shared library that is part of the application. Both the extension and shared library get installed in the
site-packagesdirectory.I am trying to figure out how to properly set
RPATHin the meson build so the extension can find the shared library. I have a small example that illustrates the issue:rpath_test.tar.gz
The following are the steps to setup, build, and run the example.
venv setup commands:
Build command:
Wheel install command:
# /tmp/py-venv/bin/pip install ./dist/test-0.0.1-cp311-cp311-linux_x86_64.whlTest execution command:
# /tmp/py-venv/bin/python /tmp/py-venv/bin/test_app.pyWhen executing from the editable build, I get:
# ./test_app.py This is a debug printWhen executing from the virtual environment, I get:
When looking at the extension binary,
RPATHis not even set. All I can see is:Not only is
RPATHnot set butRUNPATHis also incorrect.What is the correct way to link the extension so
RPATHis set correctly?Beta Was this translation helpful? Give feedback.
All reactions