Subject: Re: Problems Building net/net-snmp in pkgsrc - need help please
To: None <>
From: None <>
List: pkgsrc-users
Date: 02/28/2006 15:50:16
> Can you grep the *.la files in /usr/lib and ${LOCALBASE}/lib for
> "/usr/lib/"?  Sometimes, those references mistakenly
> get embedded in other *.la files, which usually doesn't break the
> original package that installed those *.la files, but breaks building
> dependent packages.

OK, I did this***, and in /usr/lib/*.la I see the following references to

galaxy 0 barch% cd /usr/lib
galaxy 0 lib% grep beecrypt *.la
-L/usr/src/build/588060-i386/install/usr/lib -L/usr/lib /usr/lib/
-L/usr/local/lib /usr/lib/ /usr/lib/
/usr/lib/ /usr/lib/ -lrt -lpthread -lz -lbz2
-lelf'' -L/usr/src/build/588060-i386/install/usr/lib
-L/usr/lib /usr/lib/ /usr/lib/ -lrt -lpthread
-L/usr/local/lib -lz -lbz2 /usr/lib/ -lelf'' -L/usr/src/build/588060-i386/install/usr/lib
-L/usr/lib /usr/lib/ -lrt -lpthread -L/usr/local/lib -lz
-lbz2'' -L/usr/src/build/588060-i386/install/usr/lib
-L/usr/lib /usr/lib/ -L/usr/local/lib -lelf /usr/lib/
/usr/lib/ -lrt -lpthread -lz -lbz2 /usr/lib/'

***(the only *.la files in my pkgsrc $PREFIX/lib dir that reference
beecrypt are beecryt's files themselves).

I also found some discussions on the net-snmp users list
and search on beecrypt)

There it is said that the net-snmp/hsot/hr_swinst module needs librpmio,
which on my system is one of the ones that references beecrypt.
In those users' worlds, the standard answer appears to be "install the
beecrypt-devel rpm" and the problem goes away.

In the pkgsrc world, I have already installed security/beecrypt, and is happily sitting in my pkgsrc $PREFIX/lib/
(see my earlier note).

I'm pretty sure that libtool is looking at ldd output on
/usr/lib/librpmio.* and adding /usr/lib/libbeecrypt.* to the list of
depended on libraries.
So how do I get libtool to find it in my pkgsrc $PREFIX/lib dir?  (I threw
the -L${PREFIX}/lib flag, but libtool doesn't seem to be applying that to
libs sucked in by walking ldd and finding "/usr/lib/libbeecrypt.*"

Thinking I could set LD_LIBRARY_PATH to my pkgsrc $PREFIX/lib dir, I did
this and tried again.  Unfortunately, libtool still wants libbeecrypt to
come from /usr/lib.

Any more ideas?  Surely there is a way to get libtool to resolve discovered
dynamic library dependencies against the -L path or LD_LIBRARY_PATH?

Thx in advance for continued ideas,
Tim Noell
Lexmark International, Inc.