default $(libdir) and bi-arch systems

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

 



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 `@libdir@'.)

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



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux