Closed nareshv closed 6 years ago
Yes, you can dlopen()
from a Python XAR. However, in the bootstrapping script we set the $LD_LIBRARY_PATH
(and the $PYTHONPATH
) to the mounted XAR directory, and will execute from the mounted XAR directory, meaning that Python ctypes
will search in the XAR first. If the library isn't present in the mounted XAR root directory, the system libraries will be searched.
Ideally all the shared libraries will be packaged into the XAR so it is independent of the packages installed on the system. If needed the xar.utils.get_runtime_path() function can be used to find the root directory of the XAR.
Note that you can modify the bootstrapping script to suit your needs, since it is just a file that is written into the XAR.
Closing the issue since the question is answered, feel free to reopen if you have follow up questions.
was wondering if this allows dlopen from python code thats xar'd