libtool
[Top][All Lists]
Advanced

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

Cannot find depency lib when cross building with sysroot


From: Hector Oron
Subject: Cannot find depency lib when cross building with sysroot
Date: Wed, 25 May 2016 20:14:18 +0200

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  -.. . -... .. .- -.   -.. . ...- . .-.. --- .--. . .-.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]