-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rick Lloyd wrote:
> Daniel,
> 
> The crypt and ssl libraries are statically linked - by default and 
> probably for a reason - and so won't show up in the ldd output.  Try 
> linking them explicitly with -lcrypt -lssl when you build zabbix.
> 
> Rick

Thank you for your response, however I am not sure that is the case.
First, to see if you are correct, I ran nm on libnetsnmp.so and grep'd
for the references that zabbix is complaining about.  Most of them were
in there, but undefined.

I have tried building net-snmp with --disable-static and one of my
configure options is --enable-shared.  Also, I would prefer that
net-snmp not build in the OpenSSL functionality statically.  Most
net-snmp packages built and distributed by Linux distributions or even
Sun Freeware are dynamically built and properly link against libcrypto
among other libraries.  That is why I am confused that I can't seem to
properly build this package.

Finally, even if the library is being built statically, it's not
building correctly then.  I did try adding -lcrypt to the zabbix
makefile, but that did not help, there are still missing references in
libnetsmnp.so

Here is an example of nm output when ran on libnetsnmp.so:

 nm /usr/local/lib/libnetsnmp.so | grep DES_key_sched
[3277]  |         0|       0|NOTY |GLOB |0    |UNDEF  |DES_key_sched

Object size of zero, of no type and undefined.

Dan Lang

> 
> Daniel Lang wrote:
> I am trying to build some monitoring software on Solaris that requires
> net-snmp.  It requires that net-snmp be built with the openssl package
> as it uses the various crypto functions available.
> 
> I built net-snmp 5.3.1 from source with the options and have OpenSSL
> version 0.9.8d:
> --with-mib-modules="host ucd-snmp/dlmod disman/event-mib ucd-snmp/diskio"
> --with-openssl=/usr/local/ssl --with-sys-location="xxx"
> --with-sys-contact="[EMAIL PROTECTED]" --with-default-snmp-version=3
> --with-logfile="/var/log/net-snmp.log"
> --with-persistent-directory="/var/lib/net-snmp"
> --enable-ucd-snmp-compatibility --enable-shared --with-zlib
> --with-transports="UDP TCP Unix Callback"
> 
> I then tried to build the monitoring server, zabbix, but it failed when
> building the server with the following link errors:
> 
> sqlclient -lm -lz    -lnetsnmp -lkvm -lresolv -lnsl -lkstat -lsocket
> Undefined                       first referenced
>  symbol                             in file
> HMAC                                /usr/local/lib/libnetsnmp.so
> DES_cbc_encrypt                     /usr/local/lib/libnetsnmp.so
> AES_cfb128_encrypt                  /usr/local/lib/libnetsnmp.so
> EVP_DigestFinal_ex                  /usr/local/lib/libnetsnmp.so
> SSLeay                              /usr/local/lib/libnetsnmp.so
> DES_key_sched                       /usr/local/lib/libnetsnmp.so
> EVP_DigestInit                      /usr/local/lib/libnetsnmp.so
> EVP_MD_CTX_cleanup                  /usr/local/lib/libnetsnmp.so
> RAND_bytes                          /usr/local/lib/libnetsnmp.so
> EVP_DigestUpdate                    /usr/local/lib/libnetsnmp.so
> EVP_md5                             /usr/local/lib/libnetsnmp.so
> EVP_sha1                            /usr/local/lib/libnetsnmp.so
> EVP_DigestFinal                     /usr/local/lib/libnetsnmp.so
> AES_set_encrypt_key                 /usr/local/lib/libnetsnmp.so
> DES_ncbc_encrypt                    /usr/local/lib/libnetsnmp.so
> EVP_MD_CTX_init                     /usr/local/lib/libnetsnmp.so
> ld: fatal: Symbol referencing errors. No output written to zabbix_server
> collect2: ld returned 1 exit status
> 
> I ran ldd against libnetsnmp and it returns:
> 
> $ldd /usr/local/lib/libnetsnmp.so.10.0.1
>         libc.so.1 =>     /lib/libc.so.1
>         libm.so.2 =>     /lib/libm.so.2
>         /platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
> 
> So it appears that the net-snmp libraries are not properly linking
> against libcrypt and other OpenSSL libraries.  I checked the net-snmp
> libraries on a Red Hat server and the rpm built library is linked
> properly against OpenSSL.  I suspect that I am missing a configure
> option and/or I need to edit a Makefile.  The reason is that on the same
> Red Hat server, when I build net-snmp from source, the net-snmp
> libraries still do not link against OpenSSL.  It is something I am doing
> wrong.
> 
> I found a reference to something similar in the README.solaris file,
> regarding OpenSSL and crle.  I followed the instructions regarding the
> crle settings, but it does not seem to have changed what the libraries
> are linked against.
> 
> I have found similar problems through google searches, but everyone
> seems to fix it but didn't explain what they did to fix it.  I have
> tried several different configure options, but I can't find the correct
> configure flags.  I am hoping someone quickly recognizes what I am
> missing or can point me to documentation I have missed.
> 
> Thank you,
> 
> Dan Lang
> 
>>
- -------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>>
>>

> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Net-snmp-users mailing list
> [email protected]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users



- --
Daniel Lang
UNIX Systems Administrator
Enterprise Server Technologies
Computing and Telecommunications Services
Kansas State University
785.532.6264
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF0NZ4k8n08ToxrxoRAj3EAKCC0SI8SWsCXqdc/2xyxF6BNu41LQCfUQdX
cquYj6vVAV3VVoxMIo13+Nw=
=MrwW
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to