38 lines
1.5 KiB
Plaintext
38 lines
1.5 KiB
Plaintext
From: aa8vb at vislab.epa.gov (Randall Hopper)
|
|
Date: Tue, 27 Apr 1999 08:11:09 -0400
|
|
Subject: Cross-references between dynamically loaded modules under AIX
|
|
In-Reply-To: <7g42o5$d8u$1@nnrp1.dejanews.com>; from Jakob Schiotz on Tue, Apr 27, 1999 at 10:15:35AM +0000
|
|
References: <7g42o5$d8u$1@nnrp1.dejanews.com>
|
|
Message-ID: <19990427081109.C579158@vislab.epa.gov>
|
|
Content-Length: 1060
|
|
X-UID: 614
|
|
|
|
Jakob Schiotz:
|
|
|I wrote a small function to convert a C pointer to a NumPy array (I am
|
|
|using SWIG), ... it coredumps under AIX ... the dynamical loader under
|
|
|AIX cannot resolve symbols in one module that refers to another module.
|
|
|
|
Not knowing NumPy, my assumption is you are failing on a .so-to-.so module
|
|
dynamic link. If so...
|
|
|
|
I did something like this with SWIG recently myself, albeit on IRIX. Does
|
|
AIX have the equivalent of an RPATH (check the ld man page, and search for
|
|
rpath)? If so, just augment RPATH for the wraper module (.so) to point to
|
|
the directory where your wrapped C shared libraries (.so's) live.
|
|
|
|
FWIW, here is what I use to build my SWIG wrapper libraries. Note that the
|
|
core C libraries they wrap live (or rather, are linked) to the current
|
|
directory, so adding the current directory ($PWD) to the rpath is
|
|
sufficient for my case:
|
|
|
|
LINK_SO = ld -shared -rdata_shared -w -o32 -KPIC -rpath $(PWD) -L $(PWD)
|
|
|
|
You can also use LD_LIBRARY_PATH, but for a number of reasons, it's better
|
|
to use RPATH when you can.
|
|
|
|
Randall
|
|
|
|
|
|
|
|
|