On 2015/09/04 19:48, Alexander Bluhm wrote: > Hi, > > In an environment without ld.so.hints, I had the problem that loading > libxml2.so failed because it did not find liblzma in /usr/local/lib. > Adding that directory to -rpath when linking libxml2.so helps. > > Is this approach correct?
I'm unsure. There are a couple of things in ports where rpath is set to /usr/local/lib, but it's quite rare (I'm not aware of anywhere that we do this on purpose, I think most are just build system artefacts e.g. samba - of course there are some that we explicitly set to directories other than /usr/local/lib). That's not necessarily an objection but it would be unusual, and at the moment I would expect almost all packages to fail unless ld.so.hints has been setup. Interested to know what you're thinking of using this for, when I've needed this in the past it's been for things where I've had to modify /etc/rc anyway, so I just moved the ldconfig up a bit earlier in those cases. > diff -u -p -r1.158 Makefile > --- textproc/libxml/Makefile 1 Jul 2015 11:26:55 -0000 1.158 > +++ textproc/libxml/Makefile 4 Sep 2015 16:07:20 -0000 > @@ -14,7 +14,7 @@ MASTER_SITES= http://gd.tuwien.ac.at/pu > > HOMEPAGE= http://xmlsoft.org/ > > -REVISION-main= 1 > +REVISION-main= 2 > REVISION-python= 0 > > # BSD-like > @@ -33,8 +33,9 @@ CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \ > --with-html-subdir="libxml2/html" \ > --with-iconv="${DEPBASE}" \ > --without-threads > +CONFIGURE_ENV= LDFLAGS="-Wl,-rpath ${LOCALBASE}/lib" > # only used to fetch data during regression test > -CONFIGURE_ENV= WGET=/usr/bin/ftp > +CONFIGURE_ENV+= WGET=/usr/bin/ftp > > PSEUDO_FLAVORS= no_python > FLAVOR?= >
