NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: default search path for shared libraries



On Mon, Mar 23, 2020 at 5:41 AM Martin Husemann <martin%duskware.de@localhost> wrote:
>
> On Mon, Mar 23, 2020 at 01:41:52AM -0400, Jeffrey Walton wrote:
> >
> > Under LD_LIBRARY_PATH, the man page says:
> >
> >     A colon separated list of directories, overriding the
> >     default search path for shared libraries.
> >
> > What is the default search path?
>
> That is RPATH from the binary (or RUNPATH, they are the same on newer NetBSD,
> older NetBSD does not support RUNPATH at all).

Something looks off with NetBSD. It is the only platform I have problems with:

gcc   -g2 -O2 -fPIC -pthread  -L/opt/local/lib -Wl,-R,/../lib -Wl,-R,/opt/local/
lib -Wl,--enable-new-dtags -o src/bison src/bison-AnnotationList.o src/bison-Ina
dequacyList.o src/bison-Sbitset.o src/bison-assoc.o src/bison-closure.o src/biso
n-complain.o src/bison-conflicts.o src/bison-derives.o src/bison-files.o src/bis
on-fixits.o src/bison-getargs.o src/bison-gram.o src/bison-graphviz.o src/bison-
ielr.o src/bison-lalr.o src/bison-location.o src/bison-lr0.o src/bison-main.o sr
c/bison-muscle-tab.o src/bison-named-ref.o src/bison-nullable.o src/bison-output
.o src/bison-parse-gram.o src/bison-print-graph.o src/bison-print-xml.o src/biso
n-print.o src/bison-reader.o src/bison-reduce.o src/bison-relation.o src/bison-s
can-code-c.o src/bison-scan-gram-c.o src/bison-scan-skel-c.o src/bison-state.o s
rc/bison-symlist.o src/bison-symtab.o src/bison-tables.o src/bison-uniqstr.o
-lm  /opt/local/lib/libintl.so -Wl,-rpath -Wl,/opt/local/lib    /opt/local/lib/l
ibtextstyle.so -lm -ltermcap -lpthread -Wl,-rpath -Wl,/opt/local/lib lib/libbiso
n.a -lpthread
LC_ALL=C tests/bison --version >doc/bison.help.tmp
Shared object "libintl.so.9" not found

And:

$ ls -Al /opt/local/lib/libintl*
-rw-r--r--  1 root  wheel  317172 Mar 27 02:05 /opt/local/lib/libintl.a
lrwxr-xr-x  1 root  wheel      14 Mar 27 02:05
/opt/local/lib/libintl.so -> libintl.so.9.6
lrwxr-xr-x  1 root  wheel      14 Mar 27 02:05
/opt/local/lib/libintl.so.9 -> libintl.so.9.6
-rw-r--r--  1 root  wheel  158400 Mar 27 02:05 /opt/local/lib/libintl.so.9.6

I really don't understand why the loader cannot find these libraries.
They are exactly where they should be.

Jeff


Home | Main Index | Thread Index | Old Index