Skip to content

Commit e5f4e7c

Browse files
d-w-mooreSwooshyCueb
authored andcommitted
[#122] kludge for bionic: load Python3 symbols before importing core
Co-authored-by: Markus Kitsinger (SwooshyCueb) <root@swooshalicio.us>
1 parent dff2042 commit e5f4e7c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

irods_rule_engine_plugin-python.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,14 @@ irods::error start(irods::default_re_ctx&, const std::string& _instance_name)
344344
{
345345
// TODO Enable config-selectable Python version
346346
#if PY_VERSION_HEX < 0x03000000
347-
dlopen("libpython2.7.so", RTLD_LAZY | RTLD_GLOBAL); // https://mail.python.org/pipermail/new-bugs-announce/2008-November/003322.html
347+
void *p = dlopen("libpython2.7.so", RTLD_LAZY | RTLD_GLOBAL); // https://mail.python.org/pipermail/new-bugs-announce/2008-November/003322.html
348+
#else
349+
void *p = dlopen("libpython3.6m.so.1.0", RTLD_LAZY | RTLD_GLOBAL); // Kludge for bionic; proper solution forthcoming.
348350
#endif
351+
rodsLog(LOG_DEBUG, "dlopen returned: [%p]", p);
352+
if (!p) {
353+
rodsLog(LOG_DEBUG, "dlerror gives : [%s]", dlerror());
354+
}
349355

350356
try {
351357
#if PY_VERSION_HEX < 0x03000000

0 commit comments

Comments
 (0)