Re: staging dir (DESTDIR)

Tomek Bury <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <CAO1ALzmMU4s6jg2sywPFf5O875QczvNb6_9sOgUZaHSOTGvC4w@mail.gmail.com>
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

On Wed, Jul 5, 2017 at 8:48 PM Robert Boehne <[email protected]> wrote:

> 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
>
> On Mon, Jul 3, 2017 at 12:17 PM, Tomek Bury <[email protected]> wrote:
>
>> Hi,
>>
>> Is there any way to make libtool play nicely with cross-compiled
>> dependencies in temporary staging directory? I'm trying to build Weston
>> which requires wayland which, in turn, requires ffi. Libtool correctly
>> finds the 1st-level dependencies (wayland) but then fails on libffi.
>>
>> In theory it should Just Work (TM) but in practice libtool tries to use
>> sed on /usr/local/lib/libffi.la (I've configured with
>> --prefix=/usr/local) which doesn't exist.
>>
>> Cheers,
>> Tomek
>>
>> _______________________________________________
>> https://lists.gnu.org/mailman/listinfo/libtool
>>
>>
>

_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.