On Wed, Nov 20, 2024 at 06:57:11PM +0000, Gavin Smith wrote:
> Also, providing an extra flag when compiling adds to the RUNPATH in
> the .so file:
>
> cc -shared -fPIC -DPIC -o .libs/Parsetexi.so
> parsetexi/.libs/Parsetexi_la-Parsetexi.o
> -L/home/gavin/texinfo-7.1.91/build/tp/Texinfo/XS/.libs -L./.libs -ltexinfoxs
> -L/usr/local/lib -ltexinfo -lintl -lunistring -liconv
> -fstack-protector-strong -O2 -Wl,-R/usr/libdata/perl5/mips64-openbsd/CORE
> -Wl,-R /home/gavin/texinfo-7.1.91/build/tp/Texinfo/XS/.libs
>
> I added the final -Wl,-R option from what was output by automake/libtool.
Further to this, "ldd" works with the resulting file:
$ ldd .libs/Parsetexi.soc
.libs/Parsetexi.so:
Start End Type Open Ref GrpRef Name
00000010902b8000 00000010902e4000 dlib 1 0 0
/home/gavin/texinfo-7.1.91/build/tp/Texinfo/XS/.libs/Parsetexi.so
000000108c2e0000 000000108c360000 rlib 0 1 0
/home/gavin/texinfo-7.1.91/build/tp/Texinfo/XS/.libs/libtexinfoxs.so.0.0
000000106f17c000 000000106f2b4000 rlib 0 2 0
/home/gavin/texinfo-7.1.91/build/tp/Texinfo/XS/.libs/libtexinfo.so.0.0
00000010ecce8000 00000010ecd30000 rlib 0 3 0
/usr/local/lib/libintl.so.8.0
00000010ce7dc000 00000010ce9cc000 rlib 0 3 0
/usr/local/lib/libunistring.so.0.1
00000010fdf98000 00000010fe0e8000 rlib 0 5 0
/usr/local/lib/libiconv.so.7.1