Message326539
I search if C extensions of the Python standard libraries are always linked or not to libpython... it's complicated. I tested _ctypes, _hashlib and _struct modules:
* Debian and Ubuntu: NOT linked to libpython
* Conda: LINKED to libpython
* Mageia 7: LINKED to libpython
* Fedora 28, RHEL 7: LINKED to libpython on Python 2.7 and 3.6, except _struct which is NOT linked to libpython on Python 2.7
It means that using dlopen("libpython2.7.so.1.0", RTLD_LOCAL | RTLD_NOW) may or may not work depending on the Linux distribution and depending on the imported C extensions...
If we use the example of Fedora: some C extensions are compiled using Makefile (the Fedora package modifies Modules/Setup, as I showed previously), but others are compiled by setup.py. For example, _ctypes and _hashlib are compiled by setup.py. |
|
| Date |
User |
Action |
Args |
| 2018-09-27 10:49:02 | vstinner | set | recipients:
+ vstinner, twouters, barry, nascheme, doko, pitrou, eric.smith, xdegaye, martin.panter, koobs, yan12125, mdk |
| 2018-09-27 10:49:02 | vstinner | set | messageid: <[email protected]> |
| 2018-09-27 10:49:02 | vstinner | link | issue34814 messages |
| 2018-09-27 10:49:02 | vstinner | create | |
|