Cannot find depency lib when cross building with sysroot

Hector Oron <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <CAODfWeFk3wcN7HQ7Thq6TAUjSAPqoUGLM6bck+VZF6Z19TzP7A@mail.gmail.com>
Hello,

  I am cross building an application using libtool and sysroot
support. The build generates 3 local shared libraries, which 2 of them
are relevant (libxA, libxB), and one of those depends on the other one
(libxc). [libxA, libxB->libxc].

  When I build native, it does work fine; when I add a sysroot prefix
the issue shows:
   [pid  6435] stat("/opt/sysroot/home/user/prog/src/libxc/.libs/libxc.so.1",
0x7ffe24a574c0) = -1 ENOENT (No such file or directory)
   [pid  6435] open("/opt/sysroot/home/user/prog/src/libxc/.libs/libxc.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)

  However, the files are in the source tree at:
   /home/user/prog/src/libxc/.libs/libxc.so.1

  If I explicitly add libxc.la to LDADD, then it resolves the symbols and works.

  Is there a way to not have to explicitly have to add those files to
the LDADD and be resolved in the correct path when cross building as
libxc is a depency of libxB?

  Note, that dependency_libs information in libxB for static linking lists:
   dependency_libs=' -ldl -L/opt/sysroot/usr/lib/cross-arch-triplet
-lfoo -lbar /home/user/prog/src/libxc/libxc.la -lbaz'

  This is using libtool version 2.4.6

Best regards,
-- 
 Héctor Orón  -.. . -... .. .- -.   -.. . ...- . .-.. --- .--. . .-.

_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.