From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d835521e8c13fb69 X-Google-Attributes: gidfee84,public From: aa8vb@-nojunk-ipass.net (Randall Hopper) Subject: Re: DU 4.0D and shared objects Date: 1999/05/25 Message-ID: <5BC2883899E9012A.57B562A33FC6B627.DDB820FD6A105059@library-proxy.airnews.net>#1/1 X-Deja-AN: 482078490 References: X-Orig-Message-ID: NNTP-Posting-Time: Tue May 25 17:17:24 1999 Organization: Passport Internet Access (using Airnews.net!) NNTP-Proxy-Relay: library3 User-Agent: slrn/0.9.5.4 (UNIX) Abuse-Reports-To: abuse at ipass.net to report improper postings Newsgroups: comp.unix.osf.osf1 Gordon Burditt wrote: |I am attempting to create a shared object under DU 4.0D for use with |TCL. I'm not getting very far - it seems to link OK, possibly with |undefined symbol warnings, and then all I get out of dlopen() |and dlerror() is "cannot load ./sql.so". ... |Is there any way to get dlopen() to be a LOT more verbose ... |% ld -shared -expect_unresolved "*" ... -lmysqlclient \ | -rpath /usr/lib:/usr/local/lib:/usr/local/lib/mysql: -o sql.so I have a possible answer to your question, and a follow-up question for the group. To get the loader to be more verbose: setenv _RLD_ARGS -trace However, this may not help. It didn't tell me anything useful (resolving symX, resolving symY, mapping libA.so, then the same old dlopen failure error for libA.so). It turned out that OSF1 seems to be a bit broken in that it doesn't honor RPATH settings in shared libraries. In my case libA.so depends on libB.so. libA was compiled with an RPATH which includes libB's location. This resolves just fine on Solaris and IRIX. But no dice on OSF1. It appears this might be tripping up your build as well. Resorting to the old LD_LIBRARY_PATH hack (augmenting it at runtime to include the directory libA lives in) was the only reasonable way I could find to get the dynamic loader to load libB. Compiling a new RPATH into the executable, the Python language interpreter, isn't an option (libA is a Python module). Two questions for the OSF1 experts: 1) Is there a way to get dependent shared library resolution to work without LD_LIBRARY_PATH? 2) Why isn't an RPATH setting in a shared library used to find dependent shared libraries? -- Randall Hopper aa8vb@-nojunk-ipass.net