This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients barry, doko, eric.smith, koobs, martin.panter, mdk, nascheme, pitrou, twouters, vstinner, xdegaye, yan12125
Date 2018-09-27.10:52:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538045541.38.0.545547206417.issue34814@psf.upfronthosting.co.za>
In-reply-to
Content
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".
History
Date User Action Args
2018-09-27 10:52:21vstinnersetrecipients: + vstinner, twouters, barry, nascheme, doko, pitrou, eric.smith, xdegaye, martin.panter, koobs, yan12125, mdk
2018-09-27 10:52:21vstinnersetmessageid: <1538045541.38.0.545547206417.issue34814@psf.upfronthosting.co.za>
2018-09-27 10:52:21vstinnerlinkissue34814 messages
2018-09-27 10:52:21vstinnercreate