Thread
-
Shared library search paths
Peter Eisentraut <peter_e@gmx.net> — 2000-07-18T18:18:14Z
Some platforms (OSF/cc, HPUX) are already using -rpath or equivalent, so you don't have to specify a shared library search path at runtime. I think that a lot more platforms could use this. Can people comment on whether and how it works on their platform? Essentially, LDFLAGS+=-rpath '$(libdir)' might do the trick for most. -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
-
Re: Shared library search paths
Mark Dalphin <mdalphin@amgen.com> — 2000-07-18T21:55:35Z
For the SGI Irix 6.5, "man ld" gives: .... -rpath library_path Adds the library_path to the search path for DSOs. Each library path is appended to the list of directories at the time the executable or DSO is loaded. This option directs rld(5) to look in the named directories, but to look only for DSOs, and to stop looking when the correct one is found. This option can be specified only when the -shared or -call_shared options are also in effect. For more information, see the rld(5) man page. (C, C++, F77, F90) .... -shared Produces a DSO, creates all of the tables for run-time linking, and resolves references to other specified shared objects. The object created can be used by the linker to make dynamic executables. (C, C++, F77, F90) .... Hope this helps. Mark Peter Eisentraut wrote: > Some platforms (OSF/cc, HPUX) are already using -rpath or equivalent, so > you don't have to specify a shared library search path at runtime. I think > that a lot more platforms could use this. Can people comment on whether > and how it works on their platform? Essentially, > > LDFLAGS+=-rpath '$(libdir)' > > might do the trick for most. > > -- > Peter Eisentraut Sernanders väg 10:115 > peter_e@gmx.net 75262 Uppsala > http://yi.org/peter-e/ Sweden -- Mark Dalphin email: mdalphin@amgen.com Mail Stop: 29-2-A phone: +1-805-447-4951 (work) One Amgen Center Drive +1-805-375-0680 (home) Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work) -
Re: [PORTS] Shared library search paths
Marc G. Fournier <scrappy@hub.org> — 2000-07-19T01:48:33Z
for all the stuff I'm doign lately, I just do: setenv LDFLAGS "-R/usr/local/pgsql/lib -R/usr/local/lib" and let configure handle the rest ... On Tue, 18 Jul 2000, Mark Dalphin wrote: > For the SGI Irix 6.5, "man ld" gives: > > .... > > -rpath library_path > Adds the library_path to the search path for DSOs. Each > library path is appended to the list of directories at the > time the executable or DSO is loaded. This option directs > rld(5) to look in the named directories, but to look only > for DSOs, and to stop looking when the correct one is found. > > This option can be specified only when the -shared or > -call_shared options are also in effect. For more > information, see the rld(5) man page. (C, C++, F77, F90) > > .... > > -shared Produces a DSO, creates all of the tables for run-time > linking, and resolves references to other specified shared > objects. The object created can be used by the linker to > make dynamic executables. (C, C++, F77, F90) > > .... > > Hope this helps. > Mark > > Peter Eisentraut wrote: > > > Some platforms (OSF/cc, HPUX) are already using -rpath or equivalent, so > > you don't have to specify a shared library search path at runtime. I think > > that a lot more platforms could use this. Can people comment on whether > > and how it works on their platform? Essentially, > > > > LDFLAGS+=-rpath '$(libdir)' > > > > might do the trick for most. > > > > -- > > Peter Eisentraut Sernanders vg 10:115 > > peter_e@gmx.net 75262 Uppsala > > http://yi.org/peter-e/ Sweden > > -- > Mark Dalphin email: mdalphin@amgen.com > Mail Stop: 29-2-A phone: +1-805-447-4951 (work) > One Amgen Center Drive +1-805-375-0680 (home) > Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work) > > > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org -
Re: [PORTS] Shared library search paths
Thomas Lockhart <lockhart@alumni.caltech.edu> — 2000-07-19T01:52:10Z
> Some platforms (OSF/cc, HPUX) are already using -rpath or equivalent, so > you don't have to specify a shared library search path at runtime. I think > that a lot more platforms could use this. Can people comment on whether > and how it works on their platform? Essentially, > LDFLAGS+=-rpath '$(libdir)' For linux (at least gcc 2.7.x and 2.95.2 systems): if specified in the compilation step, -Wl,-rpath $(libdir) or if specified directly to the linker -rpath $(libdir) - Thomas