On 09/02/11 22:10, Simon Josefsson wrote:
This is from memory, as I also ran into the same problem. The problem is, if my memory serves me right, in the following scenario:
Cross build library A and install it with DESTDIR (obviously) to /tmp/otheroot
Try to cross build library B, that needs library A. Obviously, you're going to give it -L /tmp/otheroot/usr/lib. The problem is that the .la files in /tmp/otheroot/usr/lib point to /usr/lib as the place to find the library. This only becomes a problem when a native version of library A is installed on the real system, at which point the compiler prefers that version, and then fails as it is of the wrong architecture.
In my projects I wound up "fixing" the la file with sed as part of the build process, but that was an embedded project where:
The only real solution I see for this is for libtool to have specific support for linking against DESTDIR installed libraries (maybe make it respect DESTDIR if it's defined during the build? That could be a solution that is both easy to understand and simple to integrate)
-- Shachar Shemesh Lingnu Open Source Consulting Ltd. http://www.lingnu.com