[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding dependencies in lib64 or lib
From: |
Konstantin Andreev |
Subject: |
Re: Finding dependencies in lib64 or lib |
Date: |
Thu, 11 Feb 2010 19:00:12 +0300 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.5) Gecko/20100119 Thunderbird/3.0 |
On 11.02.10 14:37, Daniel Pocock wrote:
I've been looking over configure.in for the Ganglia project.
The project depends on some other libs, and their locations can be specified
with configure arguments, for example:
--with-libconfuse=/usr/local
The original configure.in would then try -L/usr/local/lib
However, there are platforms where 64 bit libraries should be in */lib64, e.g.
the search for libconfuse should try /usr/local/lib64 on those platforms.
My initial solution is to test $host
LIB_SUFFIX=lib
case $host in
x86_64-redhat-linux*)
LIB_SUFFIX=lib64
esac
but a proper solution needs to test against all the architectures listed in the
FHS:
http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64
and also know about the non-FHS compliant cases (e.g. Debian)
Is anyone aware of macros for doing this and helping me set LIB_SUFFIX
correctly for a particular $host?
Typically, pkg-config knows where particular libraries installed. Something
like that:
| $ pkg-config --libs-only-L libconfuse
| -L/opt/confuse-2.6/lib
Unfortunately, pkg-config does not distinct instruction sets (32/64 bit).
Sadly, pkg-config authors refuse to support instruction sets.
Let me introduce the approach which is used by Solaris 10 to mitigate this
pkg-config restriction.
In Solaris, libraries live in
32-bit : /usr/lib
64-bit : /usr/lib/64
And, alongside well-known /usr/lib/pkgconfig/*.pc package descriptions, Solaris
provides /usr/lib/64/pkgconfig/*.pc for 64-bit versions of packages.
So, on Solaris, you wouldn't search for 64-bit library for yourself.
This approach looks great, and I would like to see it adopted by every library
maintainer.
Best regards,
--
Konstantin Andreev.
Re: Finding dependencies in lib64 or lib,
Konstantin Andreev <=
- Re: Finding dependencies in lib64 or lib, Ben Taylor, 2010/02/11
- Re: Finding dependencies in lib64 or lib, Dr. David Kirkby, 2010/02/17
- Re: Finding dependencies in lib64 or lib, Dr. David Kirkby, 2010/02/17
- Re: Finding dependencies in lib64 or lib, Ralf Corsepius, 2010/02/17
- Re: Finding dependencies in lib64 or lib, Ben Taylor, 2010/02/17
- Re: Finding dependencies in lib64 or lib, Bob Friesenhahn, 2010/02/17
- Re: Finding dependencies in lib64 or lib, Ben Taylor, 2010/02/17
Re: [autoconf] Re: Finding dependencies in lib64 or lib, mpsuzuki, 2010/02/11