Re: s6-svscan can't find shared libraries

From: Guillermo <gdiazhartusch_at_gmail.com>
Date: Thu, 5 Dec 2019 08:50:36 -0300

El mié., 4 dic. 2019 a las 2:30, J. Lewis Muir escribió:
>
> Lastly, pkgsrc seems to use rpath based on
>
> https://www.netbsd.org/docs/pkgsrc/fixes.html#fixes.libtool
>
> which suggests using libtool with the '-rpath' option for linking.

Note that this talks about using -rpath *when invoking libtool*, where
it has a different meaning. GNU Libtool (which skarnet.org software
does not use) needs -rpath when invoked in link mode to create a
library. Without it, it creates what it calls "a convenience library"
(a static library that is generally not going to be installed).

$ ./libtool --mode=link gcc -shared -o libtest.la libtest.lo
-version-info 1:0 # "Convenience library" with position-independent
code
libtool: warning: '-version-info/-version-number' is ignored for
convenience libraries
libtool: link: rm -fr .libs/libtest.a .libs/libtest.la
libtool: link: ar cru .libs/libtest.a .libs/libtest.o
libtool: link: ranlib .libs/libtest.a
libtool: link: ( cd ".libs" && rm -f "libtest.la" && ln -s
"../libtest.la" "libtest.la" )

$ ./libtool --mode=link gcc -shared -o libtest.la libtest.lo
-version-info 1:0 -rpath /lib # Actual shared library
libtool: link: rm -fr .libs/libtest.a .libs/libtest.la
libtool: link: gcc -shared -fPIC -DPIC .libs/libtest.o
-Wl,-soname -Wl,libtest.so.1 -o .libs/libtest.so.1.0.0
libtool: link: (cd ".libs" && rm -f "libtest.so.1" && ln -s
"libtest.so.1.0.0" "libtest.so.1")
libtool: link: (cd ".libs" && rm -f "libtest.so" && ln -s
"libtest.so.1.0.0" "libtest.so")
libtool: link: ( cd ".libs" && rm -f "libtest.la" && ln -s
"../libtest.la" "libtest.la" )

The resulting commands are different.

G.
Received on Thu Dec 05 2019 - 11:50:36 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC