[Top][All Lists]

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

Re: default $(libdir) and bi-arch systems

From: Ralf Corsepius
Subject: Re: default $(libdir) and bi-arch systems
Date: Wed, 10 Sep 2008 03:30:58 +0200

On Wed, 2008-09-10 at 01:00 +0200, Bruno Haible wrote:
> Hi,

> But when people configure GNU packages built with autoconf in 64-bit mode,
> "make install" will by default install the libraries in $prefix/lib. This
> leads to two problems:
>   1) If the user has already installed 32-bit libraries with the same
>      --prefix setting, 32-bit and 64-bit mode libraries overwrite each other
>      in $prefix/lib, leading to installed programs that don't run any more,
>      configurations that don't find previously installed libraries, etc.
>   2) If the user is using a fresh --prefix setting but not thinking about
>      $libdir, the installed libraries will not be found by tools which look
>      in the appropriate directory (such as the gnulib 'havelib' module, or
>      the Solaris linker).
> How about changing the libdir default (currently $exec_prefix/lib) to be
> $exec_prefix/lib64 or $exec_prefix/lib/64, respectively, when
>   - not cross-compiling, and
>   - $CC $CPPFLAGS generates 64-bit mode object files, and
>   - 64-bit mode object files are installed in /usr/lib64 or /usr/lib/64,
>     not in /usr/lib ?

This would be way too simple (read: incorrect and broken), for many

1. This proposal mixes configuration and packaging/system-integration
(CPPFLAGS, changing libdir). Better leave packaging (such as  choosing
CPPFLAGS, libdir) to system-integrators. Whatever you choose, will
always be wrong (and potentially collide) somewhere.

2. Linux systems using lib rsp. lib64 are "just special cases" of a much
wider set of scenarios. At least some aspects of you wanting to exclude
cross-compilation probably originates from this, because "multi-libing"
is pretty common on embedded systems.

3. libdir/choosing compiler flags is not related to multi-arching
(having several instances of runtime-libs installed in parallel), it is
"multi-libing" (installing several instances of devel/link-libs in

4. CPPFLAGS is not necessarily the appropriate place to set up compiler
flags for multilibs. In general, you will want either to set CFLAGS or
even override CC.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]