[CentOS] dlopen RTD_LAZY and RTLD_GLOBAL

Fri Dec 13 04:19:28 UTC 2019
Philippe Piot <piot at nicadd.niu.edu>

All,
   I use a code which has a python (I use python36) wrapper loading shared 
libraries. The code worked fine in RHEL 7 but as I was testing it on 
Centos 8, python cannot import the shared library (the import is done via 
dlopen with flags set as

>    sys.setdlopenflags(os.RTLD_LAZY | os.RTLD_GLOBAL)

python then does a bunch of imports and most results in a shared library 
with indefined symbols. Somthing like:

>    from .w3dpy import *
>    ImportError:
>  /usr/local/lib64/python3.6/site-packages/warp/w3dpy.cpython-36m-x86_64-linux-gnu.so: 
undefined symbol: multigridxyf2_

    The codes works fine on Scientific Linux 7 but had the same problem as 
above on fedora 31. I suspect something changed in the way dlopen is 
handled on newer linux version but cannot figure out how the code should 
be modified...

    Thank you for any help. All the best,  -- Philippe.