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

Re: Add multiarch library paths to DEFAULT_LIBRARY_PATH in Dpkg::Shlibs?



On Tue, 16 Apr 2013 16:11:24 +0400
Игорь Пашев <pashev.igor@gmail.com> wrote:

> 2013/4/16 Raphael Hertzog <hertzog@debian.org>:
> > On Tue, 16 Apr 2013, Игорь Пашев wrote:
> >> I think it would be better to add multiarch dirs to DEFAULT_LIBRARY_PATH,
> >> and put them in first positions.
> >
> > Why?
> >
> > This modules tries to mimick ld.so's logic to find libraries as closely
> > as possible.
> 
> /lib:/usr/lib was the default path, now it is
> /lib/<multiarch>:/usr/lib/<multiarch>, isn't it?

No - there's confusion here between the runtime link path and the
build time link path. Dpkg::Shlibs at the point quoted is concerned
with the build time paths. Where to find the stuff which has been
linked against the built binaries for the current architecture of the
current build.

The shared library libfoo.so.1.2.3 lives in /usr/lib/$triplet for
runtime usage but the -dev package which provides the .so symlink which
is used to find the actual .so.N.N.N file is not necessarily in a
MultiArch path. The implementation of MultiArch for -dev packages is
not complete and most -dev packages are not co-installable with a
foreign architecture of the same -dev package. (Any one package build is
only building for a single architecture at any one time, discounting
the issues with CC_FOR_BUILD which needs to be handled differently.
Therefore, building bar for i386 and then armhf means removing some
of the i386 build-deps and installing the armhf build-deps instead.
This typically includes removing libfoo-dev:i386 and installing
libfoo2:armhf & libfoo-dev:armhf. libfoo2:armhf can, of course, stay
installed for later.)

MultiArch in Debian is principally concerned with runtime paths, the
build-time paths and consequent cross-compilation support still has a
few wrinkles to resolve. (or dpkg-cross could have been removed from
Wheezy.)

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpIvt6viKFcQ.pgp
Description: PGP signature


Reply to: