On 03/31/2011 12:48 AM, Brian Gough wrote:
Hi, now that GNU TLS is using nettle I notice there is a difference between the --libdir for the two packages on 64 bit. Nettle installs to $prefix/lib64/ and GNU TLS looks for it in $prefix/lib/ -- so it fails and the standard configure/install to a prefix doesn't work.
Indeed it seems nettle for some reason uses the /usr/lib64. Niels, is there really a reason for that? As I understand from the FHS[0] /usr/lib is the system library directory. /usr/lib64 and /usr/lib32 might not even be there.
regards, Nikos
[0]. http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGAN...
Nikos Mavrogiannopoulos nmav@gnutls.org writes:
Indeed it seems nettle for some reason uses the /usr/lib64. Niels, is there really a reason for that? As I understand from the FHS[0] /usr/lib is the system library directory. /usr/lib64 and /usr/lib32 might not even be there.
Sorry for the late reply. A bit down in the same document, http://www.pathname.com/fhs/pub/fhs-2.3.html, it says
/lib64 and /lib32 : 64/32-bit libraries (architecture dependent)
The 64-bit architectures PPC64, s390x, sparc64 and AMD64 must place 64-bit libraries in /lib64, and 32-bit (or 31-bit on s390) libraries in /lib.
If you believe this, then it's wrong to install 64-bit libraries in lib. And I believed so when I wrote this part of the nettle configure.ac...
But then it turned out that at least debian on x86_64 ignores this part of the FHS, and puts the 64-bit libraries in lib, and 32-bit libraries in lib32. Which seems to also be the freebsd way of doing it.
In the debian case, lib64 is a symlink to lib, so it doesn't matter for a 64-bit builds (they will be installed in lib64, which is a symlink to lib, which is tye right place), while a build with ./configure CC="gcc -m32" && make && make install will install the 32-bit library files in the wrong place.
I'm not sure what the right thing is. Is there any distribution which actuallly does what the FHS says? If so, I guess configure needs to check what directories exists, and install in lib$ABI whenever that directory exists, otherwise in lib. I haven't got around to fixing that.
Regards, /Niels
nettle-bugs@lists.lysator.liu.se