Hi, I am encountering problems using libtool-1.5.24 in a cross-build environment (build system x86_64-pc-linux-gnu, target mips-linux-gnu). I am trying to build the Linux-PAM-0.99.8.1 package. Building works fine, but --mode=install fails.
Because I am cross-building, my CFLAGS and LDFLAGS variables contain the --sysroot switch. When 'libtool --mode=install' is invoked, the following happens: libtool: install: warning: relinking `libpam_misc.la' (cd /home/thomas/excite-userland/build/Linux-PAM-0.99.8.1/libpam_misc; /bin/sh ../libtool --tag=CC --mode=relink /opt/cross-gcc/mips-linux-gnu/4.2.1/bin/mips-linux-gnu-gcc -I/home/thomas/excite-userland/src/Linux-PAM-0.99.8.1/libpam/include -I/home/thomas/excite-userland/src/Linux-PAM-0.99.8.1/libpamc/include -I/home/thomas/excite-userland/src/Linux-PAM-0.99.8.1/libpam_misc/include -march=rm9000 -Os -fomit-frame-pointer --sysroot=/home/thomas/excite-userland/sys-root -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wwrite-strings -Winline -Wshadow --sysroot=/home/thomas/excite-userland/sys-root -Wl,--as-needed -Wl,-O1 -o libpam_misc.la -rpath /usr/lib -no-undefined -version-info 81:2:81 -Wl,--version-script=/home/thomas/excite-userland/src/Linux-PAM-0.99.8.1/libpam_misc/libpam_misc.map help_env.lo misc_conv.lo ../libpam/libpam.la -inst-prefix-dir /home/thomas/excite-userland/sys-root) /opt/cross-gcc/mips-linux-gnu/4.2.1/bin/mips-linux-gnu-gcc -shared .libs/help_env.o .libs/misc_conv.o -L/home/thomas/excite-userland/sys-root/usr/lib -L/usr/lib -lpam -march=rm9000 -Wl,--as-needed -Wl,-O1 -Wl,--version-script=/home/thomas/excite-userland/src/Linux-PAM-0.99.8.1/libpam_misc/libpam_misc.map -Wl,-soname -Wl,libpam_misc.so.0 -o .libs/libpam_misc.so.0.81.2 /opt/cross-gcc/mips-linux-gnu/4.2.1/lib/gcc/mips-linux-gnu/4.2.1/../../../../mips-linux-gnu/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6 /opt/cross-gcc/mips-linux-gnu/4.2.1/lib/gcc/mips-linux-gnu/4.2.1/../../../../mips-linux-gnu/bin/ld: cannot find /lib/libc.so.6 collect2: ld returned 1 exit status libtool: install: error: relink `libpam_misc.la' with the above command before installing it As can be seen, the 'libtool --mode=relink' contains the '--sysroot' switch, but the linker command line generated by libtool does not, which leads to the well-known problem of the cross linker accessing libc.so.6 on the build system. If I edit the linker command line and manually add the '--sysroot' argument, it executes without problems. I am not sufficiently familiar with libtool to be able to tell whether this is a problem of libtool itself or the package I am building. Thomas -- Thomas Koeller thomas at koeller dot dyndns dot org _______________________________________________ Bug-libtool mailing list Bug-libtool@gnu.org http://lists.gnu.org/mailman/listinfo/bug-libtool