strange install directory

Niels Möller nisse at lysator.liu.se
Fri Feb 26 19:51:03 UTC 2021


Marc Glisse <marc.glisse at inria.fr> writes:

> We have CONFIG_SITE=/usr/share/site/aarch64-unknown-linux-gnu by
> default in our environment on this machine, and this file does

Ah, I see! I've never used site-wide config (or site-wide config.cache).

> # If user did not specify libdir, guess the correct target:
> # Use lib64 for 64 bit bi-arch targets, keep the default for the rest.
> if test "$libdir" = '${exec_prefix}/lib' ; then
> [...]
>
> so it looks like you can override it with anything but what you want
> (the file is sourced by configure after it has set libdir).

My configure.ac logic does something similar (but it also takes
configured abi into account), under the theory that it's pretty unlikely
that the used want to use the precise value '${exec_prefix}/lib'
as override (note the single quotes in the test). Either of
--libdir=/usr/local/lib/, or --libdir='${prefix}/lib' should work as
overrides.

> Anyway, I think Paul's goal is more once GMP has been installed in
> lib64, how can MPFR, knowing only the prefix, guess the right libdir?

I have no good answer, but I think it is a bit unhelpful to
automagically change libdir to specify a directory that isn't searched
by compiler and linker by default.

> You could also complain to SUSE...

>From comments in Nettle's configure.ac:

      # Linux conventions are a mess... According to the Linux File
      # Hierarchy Standard, all architectures except IA64 puts 32-bit
      # libraries in lib, and 64-bit in lib64. Some distributions,
      # e.g., Fedora and Gentoo, adhere to this standard, while at
      # least Debian has decided to put 64-bit libraries in lib and
      # 32-bit libraries in lib32.
      
      # We try to figure out the convention, except if we're cross
      # compiling. We use lib${ABI} if /usr/lib${ABI} exists and
      # appears to not be a symlink to a different name.

(Comment being 10 years old, and maybe not completely accurate).

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list