Message326540
Ah, it seems like the bpo-832799 (reported in 2003) is similar to the RHEL bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1585201
Extract of the RHEL bug report:
---
pythontest.c:
#include <dlfcn.h>
int main(int argc, char *argv[])
{
void *pylib = dlopen("libpython2.7.so.1.0", RTLD_LOCAL | RTLD_NOW);
void (*Py_Initialize)(void) = dlsym(pylib, "Py_Initialize");
Py_Initialize();
int (*PyRun_SimpleStringFlags)(const char *, void *) = dlsym(pylib, "PyRun_SimpleStringFlags");
PyRun_SimpleStringFlags("import json\n", 0);
return 0;
}
2. Compile with "gcc -Wall -o pythontest pythontest.c -ldl -g"
3. Run ./pythontest -
Actual results:
it will fail with ImportError: /usr/lib64/python2.7/lib-dynload/_struct.so: undefined symbol: PyFloat_Type
---
The reporter is already aware of the fallback on RTLD_GLOBAL: "(optionally) change RTLD_LOCAL to RTLD_GLOBAL and see that it works". |
|
Date |
User |
Action |
Args |
2018-09-27 10:52:21 | vstinner | set | recipients:
+ vstinner, twouters, barry, nascheme, doko, pitrou, eric.smith, xdegaye, martin.panter, koobs, yan12125, mdk |
2018-09-27 10:52:21 | vstinner | set | messageid: <1538045541.38.0.545547206417.issue34814@psf.upfronthosting.co.za> |
2018-09-27 10:52:21 | vstinner | link | issue34814 messages |
2018-09-27 10:52:21 | vstinner | create | |
|