Hard-coded RPATH in libraries
See original GitHub issueWhen I run pip install cocotb==1.4.0rc1
in one conda environment, it builds and installs a wheel and saves the wheel in a cache. Now, when I run the same command in a new conda environment, it reuses the wheel. The problem is that the .so
files have a hard-coded RPATH to the first environment, so when that env is deleted, cocotb breaks in the other env.
From what I can tell, conda solves this problem for its packages: https://docs.conda.io/projects/conda-build/en/latest/resources/make-relocatable.html
Issue Analytics
- State:
- Created 3 years ago
- Comments:50 (50 by maintainers)
Top Results From Across the Web
Remove hardcoded rpath from c executable in Makefile
When I build the executable, the linker(LD) sets the executable RPATH to the path of local shared libraries in the compilation environment.
Read more >RPATH - run-time search path hard-coded in native library
RPATH - run-time search path hard-coded in native library - hpAndro Vulnerable Application Challenge ; CTF Link : http://ctf.hpandro.
Read more >rpath - Wikipedia
In computing, rpath designates the run-time search path hard-coded in an executable file or library. Dynamic linking loaders use the rpath to find...
Read more >Creating relocatable Linux executables by setting RPATH with ...
RPATH stands for run-time search path. According to Wikipedia, “rpath designates the run-time search path hard-coded in an executable file or library.
Read more >Hardcoded shared library locations: How can I override them?
You could try chrpath, seems to fit the bill. Else you can add an LD_PRELOAD entry for every library that is rpath'd. This...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, all extension modules built with setuptools/distutils will have this rpath. The difference is that they are being loaded by
python
which has already loadedlibpython
. So these extension modules don’t really care for having the right rpath.You can check by building some simple extension modules like https://github.com/starnight/python-c-extension. This is the compile command it runs:
You can see the
-Wl,-rpath
but no-lpython
.For cocotb,
libcocotb
is loaded by the simulator which then has to loadlibpython
. That is source of the problem here.I opened a discussion on pypa’s discourse to maybe get some more experienced eyes on the problem.