autoconf
[Top][All Lists]
Advanced

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

default $(libdir) and bi-arch systems


From: Bruno Haible
Subject: default $(libdir) and bi-arch systems
Date: Wed, 10 Sep 2008 01:00:16 +0200
User-agent: KMail/1.5.4

Hi,

A bi-arch system is one where
  - the processor has a 32-bit execution mode and a 64-bit execution mode
    (ex. x86_64, ia64, sparc64, powerpc64), and
  - 32-bit mode libraries and executables and 64-bit mode libraries are
    both installed, and
  - 32-bit mode libraries and object files cannot be mixed with 64-bit mode
    ones.

On several types of such systems, for historical reasons, the 32-bit libraries
are installed in $prefix/lib, whereas the 64-bit libraries are installed in
  - $prefix/lib64 on many Linux systems [1][2],
  - $prefix/lib/64 on Solaris systems [3].

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 ?

The GNU standards would allow this: They state

     The value of `libdir' should normally be
     `/usr/local/lib', but write it as `$(exec_prefix)/lib'.  (If you
     are using Autoconf, write it as address@hidden@'.)

It says "normally", not "by default". This allows the default to be different
in special cases.

Bruno

[1] 
http://www.pathname.com/fhs/pub/fhs-2.3.html#LIBLTQUALGTALTERNATEFORMATESSENTIAL
[2] 
https://ldn.linuxfoundation.org/forum/new-lsb-navigator-19-and-lsb-dbscripts-14-released
[3] http://docs.sun.com/app/docs/doc/817-1984/chapter3-1?a=view





reply via email to

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