[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running into cross-compilation issues with libtool (and autoconf) wi
From: |
Philip A. Prindeville |
Subject: |
Re: Running into cross-compilation issues with libtool (and autoconf) with libusb-0.1.12 |
Date: |
Tue, 03 Nov 2009 14:51:35 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-2.7.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 |
On 10/30/2009 01:53 PM, Nick Bowler wrote:
> On 13:19 Fri 30 Oct , Philip A. Prindeville wrote:
>> The problem is that this is an early linkage on the build host, where
>> the eventual DESTDIR hasn't yet been specified, but the resultant
>> libusbpp.la ends up looking like:
>
> I suspect that you have two libtool libraries in the same source tree,
> with one linked against the other. Chances are, the compiled binaries
> in the .libs directory are perfectly fine, and libtool is destroying
> them when you run 'make DESTDIR=/path/to/staging/dir install'.
>
> So we have libfoo.la and libbar.la, libbar links with libfoo and.
> Furthermore, you have a version of libfoo already installed on the host
> system, in /usr/lib. You cross-compile the package, using
> --prefix=/usr/lib (since that is where it will finally end up).
>
> Then you do 'make DESTDIR=/path/to/staging/dir install', and libtool
> decides to re-link the libraries against the libraries in the final
> installed location. In this case, it is /usr/lib. The problem is that
> the libfoo in /usr/lib is the wrong one, since the cross-compiled libfoo
> never got installed there!
>
> The workaround here is to manually copy the libraries from .libs into
> your staging directory. IMHO the fix is to make libtool not re-link
> anything if DESTDIR is set -- correct me if I'm wrong, but it seems to
> me that the current behaviour cannot possibly be correct on any
> platform, even on the ones that require re-linking.
That sounds about right, actually.
So what would be a good fix to have libtool do the right think when DESTDIR is
set?
Anyone want to come up with a patch for this that I can try?
Thanks,
-Philip