[Distutils] I load entry point ".so", then it only loads 60 / 63 ".so" files (3 fail?) :-(

Mowry, Peter peter.mowry at amd.com
Thu Jun 7 01:28:38 CEST 2007


I am using ctypes to control a computer hardware simulation via a single
shared library entry point, but having trouble getting it to fully load
all the .so files on Linux :-(

ctypes directly loads my entry point ".so" shared library:
self.mainentrylib = ctypes.CDLL(strPathAbs, mode=ctypes.RTLD_GLOBAL) #
load main entry point
# I don't know why I have to use RTLD_GLOBAL, but when I do 60 / 63 work

Then I call an exported function on self.mainentrylib, which causes the
entry point shared library to load a bunch of model pieces (from the C++
code) (from a "libs" dir).  On Windows, all 63 pieces (".dll" files)
load without problem.  On Linux, only 60 of the 63 pieces (".so" files)
load, and 3 of them give me an error trying to load.

I modified the C++ code (of the main entry point shared library) to
print GetLastError(), which reported 2, which translates via strerror(2)
to "No such file or directory".  But this error message can't be true
b/c the file does exist (and it's in the same dir as the other 60).

I didn't think anything was special about these 3 shared libraries, but
something must be.  Anyone run into something similar or have any ideas?

Any responses appreciated; thanks!





More information about the Distutils-SIG mailing list