From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,cd922e43161a3f1d X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-28 00:38:07 PST Newsgroups: comp.unix.osf.osf1 Path: bga.com!news.sprintlink.net!uunet!MathWorks.Com!yeshua.marcam.com!charnel.ecst.csuchico.edu!olivea!decwrl!pa.dec.com!datum.nyo.dec.com!niagara.nyo.dec.com!frank From: frank@niagara.nyo.dec.com (Frank Wortner) Subject: Re: Problem with shared libraries Message-ID: <1994Jul27.190528.29931@datum.nyo.dec.com> Sender: usenet@datum.nyo.dec.com (USENET News System) Reply-To: frank@nyo.dec.com Organization: Digital Equipment Corporation X-Newsreader: mxrn 6.18-16 References: <1994Jul25.141001.26281@datum.nyo.dec.com> Date: Wed, 27 Jul 1994 19:05:28 GMT In article , rwp@nmti.com (roland pringle) writes: |>I get no link errors. Only upon execution of the Fortran program do I get an |>error that says it is unable to map libxxx.so. Libxxx.so will vary depending |>upon the order of the shared libraries entered on the link command, i.e., |>f77 -called_shared xthreads main.o -L/path/to -lxxx -lyyy -lzzz |> Here's a couple of tests you could try: 1) DBX the executable and type the command listobj That will tell you where the executable is looking for libraries. 2) Set the environmental variable _RLD_ARGS to "-trace" or "-v". That will make the loader trace it's actions. Try "-v" first: it produces less output. 3) Is your program running setuid or setgid? The loader then restricts the library search path to the default directories (/usr/shlib /usr/ccs/lib /usr/cmplrs/cc /usr/lib /usr/local/lib). 4) Have you tried setting the library's SONAME when you build it? Use the -soname option to do this: ld -shared -soname /path/to/libxxx.so -o libxxx.so *.o This will force the loader to load "/path/to/libxxx.so" at runtime. Frank