Message349255
In the What's New section of 3.8 (https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-the-c-api) it indicates that:
> On Unix, C extensions are no longer linked to libpython except on Android and Cygwin. When Python is embedded, libpython must not be loaded with RTLD_LOCAL, but RTLD_GLOBAL instead. Previously, using RTLD_LOCAL, it was already not possible to load C extensions which were not linked to libpython, like C extensions of the standard library built by the *shared* section of Modules/Setup. (Contributed by Victor Stinner in bpo-21536.)
So if you are embedding python by dlopen'ing libpython.so you should use RTLD_GLOBAL to make sure everyone is using the same symbols. You have more information on the rationale and decisions in bpo-21536.
Is your use-case not cover by the arguments in bpo-21536? What is the problem of embedding by dlopening libpython using RTLD_GLOBAL? |
|
| Date |
User |
Action |
Args |
| 2019-08-08 21:11:08 | pablogsal | set | recipients:
+ pablogsal, doko, vstinner, ericvw, reimar, MrAnno |
| 2019-08-08 21:11:08 | pablogsal | set | messageid: <1565298668.08.0.510512061394.issue36753@roundup.psfhosted.org> |
| 2019-08-08 21:11:08 | pablogsal | link | issue36753 messages |
| 2019-08-08 21:11:07 | pablogsal | create | |
|