Hi Robert,
For example weston needed wayland, wayland, in turn, needed libffi. This and all similar cases with a dependency chain were failing in similar way with libtool looking for .la in a wrong place.
I've configured all packages with './configure --prefix=/usr/local --host=arm-linux-gnueabihf' and than cross-compiled and installed with 'make install DESTDIR=/my/staging/dir'. I've also set PKG_CONFIG_SYSROOT_DIR, PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR to point to my staging area.
The problem I'm having is that libtool correctly finds the 1st-level dependency but fails on the 2nd level and tries to open .la files in ${prefix} rather than ${staging}/${prefix}.
I eventually managed to massage it into place by extending my configure arguments with "--with-sysroot=${staging} LDFLAGS=-Wl,-rpath-link=${staging}/${prefix}/lib" but that does seem a bit over the top. I had to do very careful configuration in order for that contraption to build. For example pixmap (dependency chain was weston-->cairo-->pixmap) wouldn't build unless tests were statically linked and so on. I've also noticed that some .so libraries were built with hard-coded rpath pointing to my staging area, (for example freetype) but they worked nonetheless.
What would be "The Right Way (TM)" of cross-compiling a subsystem with autoconf, libtool, pkg-config and friends?
Cheers,
Tomek
Tomek,
I don't think I could get very far with what you've provided so far. Can you post a simplified example that demonstrates the problem?
Thanks,
Robert Boehne