PDA

View Full Version : Compile error in Solaris 10


lucamene
05-05-2005, 13:22
Hi everybody,

I'm trying to compile zabbix 1.1 alpha7 no my solaris 10 x86 box, with the following configure command:

./configure --with-mysql=/usr/local/mysql --with-net-snmp

and I get the following errors when running gmake:

bash-3.00# gmake
Making all in src/zabbix_agent
gmake[1]: Entering directory `/export/home/luca/software/src/zabbix-1.1alpha7/src/zabbix_agent'
gcc -o ../../bin/zabbix_agent -g -O2 -I../../include zabbix_agent.c sysinfo.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/snprintf.c ../../include/md5.c -Wall -lnsl -lkstat -lsocket
../../include/snprintf.c: In function `vasprintf':
../../include/snprintf.c:823: warning: implicit declaration of function `vsnprintf'
../../include/snprintf.c: At top level:
../../include/snprintf.c:169: warning: 'dopr' defined but not used
gcc -o ../../bin/zabbix_agentd -g -O2 -I../../include zabbix_agentd.c sysinfo.c stats.c interfaces.c diskdevices.c cpustat.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/pid.c ../../include/snprintf.c ../../include/md5.c -Wall -lnsl -lkstat -lsocket
../../include/snprintf.c: In function `vasprintf':
../../include/snprintf.c:823: warning: implicit declaration of function `vsnprintf'
../../include/snprintf.c: At top level:
../../include/snprintf.c:169: warning: 'dopr' defined but not used
gmake[1]: Leaving directory `/export/home/luca/software/src/zabbix-1.1alpha7/src/zabbix_agent'
Making all in src/zabbix_sender
gmake[1]: Entering directory `/export/home/luca/software/src/zabbix-1.1alpha7/src/zabbix_sender'
gcc -o ../../bin/zabbix_sender -g -O2 -I../../include ../../include/snprintf.c zabbix_sender.c -lnsl -lkstat -lsocket
gmake[1]: Leaving directory `/export/home/luca/software/src/zabbix-1.1alpha7/src/zabbix_sender'
Making all in src/zabbix_server
gmake[1]: Entering directory `/export/home/luca/software/src/zabbix-1.1alpha7/src/zabbix_server'
gcc -o ../../bin/zabbix_server -g -O2 -I../../include -I/usr/local/mysql/include/mysql -I/usr/local/include server.c ../../include/db.c ../../include/functions.c ../../include/expression.c ../../include/cfg.c ../../include/log.c ../../include/security.c ../../include/pid.c ../../include/email.c ../../include/snprintf.c ../zabbix_agent/sysinfo.c ../../include/md5.c ../../include/zlog.c alerter.c pinger.c housekeeper.c checks_simple.c checks_snmp.c checks_agent.c checks_internal.c -Wall -lnsl -lkstat -lsocket -L/usr/local/mysql/lib/mysql -lmysqlclient -lm -lz -L/usr/local/lib -lnetsnmp
server.c: In function `tcp_listen':
server.c:1194: warning: implicit declaration of function `bzero'
../../include/snprintf.c: In function `vasprintf':
../../include/snprintf.c:823: warning: implicit declaration of function `vsnprintf'
../../include/snprintf.c: At top level:
../../include/snprintf.c:169: warning: 'dopr' defined but not used
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
hstrerror /var/tmp//cc3qB2iZ.o
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 ../../bin/zabbix_server
collect2: ld returned 1 exit status
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/export/home/luca/software/src/zabbix-1.1alpha7/src/zabbix_server'
gmake: *** [all] Error 1


Can anyone please help me with this issue?

Many thanks in advance.

Luca

Alexei
05-05-2005, 13:24
I believe you have openssl-dev files (headers, libs) missing.

lucamene
05-05-2005, 17:04
Alexei,

Thank you very much for your super-fast reply.

the OpenSSL header files were already installed, after some investigations I found out that the problem was laying in the net-snmp build. I recompiled net-snmp with the correct OpenSSL support and the error disappeared.
I still had some troubles in the gmake process which I resolved by adding the -lresolv to the LIBS options in the makefile.
Now I managed to have a successful build.

Thanks again.

Luca

dlang
12-02-2007, 17:56
So I know this is old, but I am having the exact same issue. I am having problems finding the correct net-snmp build options so that libnetsnmp links against OpenSSL. I have installed net-snmp and OpenSSL from source, so all header files are on the build computer.

If anyone could tell me what the correct build options for net-snmp to include OpenSSL support, I would be grateful.

Here are my current net-snmp configure flags:

--with-mib-modules="host ucd-snmp/dlmod disman/event-mib ucd-snmp/diskio"
--with-openssl=/usr/local/ssl --with-sys-location="KSU" --with-sys-contact="estech@ksu.edu" --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"