pkgsrc-Users archive

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

Re: Problems Building net/net-snmp in pkgsrc - need help please



Installing the beecrypt-devel rpm did indeed solve my problem - thx.

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

>Yes, but the version of libbeecrypt installed by pkgsrc may not match
>the one that is needed by /usr/lib/librpmio.so, so playing games with
>the dynamic linker through symlinks or LD_LIBRARY_PATH may get you burned.

So to do this completely within pkgsrc, I guess I would have to build
librpmio in pkgsrc, and make net-snmp and beecrypt find it there, so I
never pull in a *.la file from /usr/lib, right?  I don't see librpmio in
any PLIST files in the pkgsrc tree, so that means I would have to find that
source rpm and convert it to pkgsrc?

Too much trouble for me, so I just installed beecrypt-devel rpm and went on
with life.

Anyway, thanks for your help,
T.



                                                                                
                                                         
                      Johnny Lam                                                
                                                         
                      <jlam%pkgsrc.org@localhost>         To:       
tnoell%lexmark.com@localhost                                                    
         
                      Sent by:                  cc:       
cvazquez%lexmark.com@localhost, pkgsrc-users%NetBSD.org@localhost               
                   
                      pkgsrc-users-owner        Subject:  Re: Problems Building 
net/net-snmp in pkgsrc - need help please                
                      @NetBSD.org                                               
                                                         
                                                                                
                                                         
                                                                                
                                                         
                      02/28/2006 04:33                                          
                                                         
                      PM                                                        
                                                         
                                                                                
                                                         
                                                                                
                                                         




tnoell%lexmark.com@localhost wrote:
>
> OK, I did this***, and in /usr/lib/*.la I see the following references to
> libbeecrypt:
>
> galaxy 0 barch% cd /usr/lib
> /users/tnoell/barch
> galaxy 0 lib% grep beecrypt *.la
> /usr/lib
> librpmbuild.la:dependency_libs='
> -L/usr/src/build/588060-i386/install/usr/lib -L/usr/lib
/usr/lib/librpm.la
> -L/usr/local/lib /usr/lib/librpmdb.la /usr/lib/libpopt.la
> /usr/lib/librpmio.la /usr/lib/libbeecrypt.la -lrt -lpthread -lz -lbz2
> -lelf'
> librpmdb.la:dependency_libs='
-L/usr/src/build/588060-i386/install/usr/lib
> -L/usr/lib /usr/lib/librpmio.la /usr/lib/libbeecrypt.la -lrt -lpthread
> -L/usr/local/lib -lz -lbz2 /usr/lib/libpopt.la -lelf'
> librpmio.la:dependency_libs='
-L/usr/src/build/588060-i386/install/usr/lib
> -L/usr/lib /usr/lib/libbeecrypt.la -lrt -lpthread -L/usr/local/lib -lz
> -lbz2'
> librpm.la:dependency_libs=' -L/usr/src/build/588060-i386/install/usr/lib
> -L/usr/lib /usr/lib/librpmdb.la -L/usr/local/lib -lelf
/usr/lib/librpmio.la
> /usr/lib/libbeecrypt.la -lrt -lpthread -lz -lbz2 /usr/lib/libpopt.la'

Okay, this is your problem.  You're linking against librpmio.so, so all
of the libraries that are needed by librpmio.so must also be provided on
your system.  You therefore should install whatever provides
/usr/lib/libbeecrypt.la or else /usr/lib/librpmio.so is unusable for
builds.

> I also found some discussions on the net-snmp users list
> (http://sourceforge.net/mailarchive/forum.php?forum_id=4959
> 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.

This advice is correct.

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

Yes, but the version of libbeecrypt installed by pkgsrc may not match
the one that is needed by /usr/lib/librpmio.so, so playing games with
the dynamic linker through symlinks or LD_LIBRARY_PATH may get you burned.

> 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.*"

No, that is not what libtool is doing.   Libtool is complaining because
you're linking against -lrpmio, which causes libtool to read
/usr/lib/librpmio.la.  Upon reading /usr/lib/librpmio.la, it sees that
it should be able to find /usr/lib/libbeecrypt.la because it's mentioned
in the "dependency_libs" line of /usr/lib/librpmio.la.  When libtool
can't find /usr/lib/libbeecrypt.la at this point, it bails out with the
error that you see.

> 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?

No, you don't want to do this.  You want to just install the
beecrypt-devel RPM so that you can successfully link against the
librpmio.so in the base system.  Note that this advice only applies to
systems that have /usr/lib/librpm* in the base system.  Linux systems
that don't have those libraries aren't affected by this problem.

 Cheers,

 -- Johnny Lam <jlam%pkgsrc.org@localhost>





Home | Main Index | Thread Index | Old Index