[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#484277: Possible fix



Autotools and dpkg-cross could provide a simple fix:

lt_cv_sys_lib_dlsearch_path_spec="/usr/$(DEB_HOST_GNU_TYPE)/lib /lib /usr/lib /usr/local/lib"

The default path (on amd64) is:
libtool:sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
"

So it looks like libtool is reading BUILD when it should be reading
HOST.

Now we can either fix this in dpkg-cross by setting
lt_cv_sys_lib_dlsearch_path_spec in the /etc/dpkg-cross/config* files
and hopefully we can fix this in libtool too.

dpkg-cross gives us a direct fix for current builds (i.e. without
regenerating the autotools data of a particular package) and a fix in
libtool gives us a long term fix.

It looks like the libtool macros are listening to the wrong environment
variables - BUILD (which doesn't change when cross-compiling) compared
to HOST (which does change and this change should affect libtool
generation from ./configure).

This change to a CDBS package removes the RPATH from the cross-built
binary packages:

DEB_CONFIGURE_EXTRA_FLAGS=lt_cv_sys_lib_dlsearch_path_spec="/usr/$(DEB_HOST_GNU_TYPE)/lib /lib /usr/lib /usr/local/lib"

By using HOST, it does not change the value from what would be
automatically generated in a native build.

Whether the *order* of the variables matters, I don't know. More
testing required but I'm thinking of putting this into dpkg-cross to
support such tests.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

Attachment: pgpRFvLvPb649.pgp
Description: PGP signature


Reply to: