PDA

View Full Version : make problems


lazat
12-01-2005, 16:54
Hi

I have on my mandrake 10 linux box:
./configure --with-mysql --with-net-snmp and it works fine.

But when I make I get problems: see bellow... Also i have tried with the -lz in configure and also with static in comple. I need help!! BTW is 1.1 good to use in production enviroment? I have tried both versions with the same result.

[root@ns1 zabbix-1.0]# make
Making all in src/zabbix_agent
make[1]: Entering directory `/root/zabbix-1.0/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 -Wall -lnsl
gcc -o ../../bin/zabbix_agentd -g -O2 -I../../include zabbix_agentd.c sysinfo.c stats.c interfaces.c diskdevices.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/pid.c ../../include/snprintf.c -Wall -lnsl
make[1]: Leaving directory `/root/zabbix-1.0/src/zabbix_agent'
Making all in src/zabbix_sender
make[1]: Entering directory `/root/zabbix-1.0/src/zabbix_sender'
gcc -o ../../bin/zabbix_sender -g -O2 -I../../include ../../include/snprintf.c zabbix_sender.c -lnsl
make[1]: Leaving directory `/root/zabbix-1.0/src/zabbix_sender'
Making all in src/zabbix_sucker
make[1]: Entering directory `/root/zabbix-1.0/src/zabbix_sucker'
gcc -o ../../bin/zabbix_suckerd -g -O2 -I../../include -I/usr/include/mysql -I/usr/include zabbix_sucker.c ../../include/db.c ../../include/functions.c ../../include/expression.c ../../include/cfg.c ../../include/log.c ../../include/security.c ../../include/pid.c ../../include/snprintf.c ../zabbix_agent/sysinfo.c alerter.c pinger.c housekeeper.c -Wall -lnsl -L/usr/lib/mysql -lmysqlclient -lm -L/usr/lib -lnetsnmp -lcrypto
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:223:1: warning: "PACKAGE_BUGREPORT" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:851:1: warning: this is the location of the previous definition
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:226:1: warning: "PACKAGE_NAME" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:854:1: warning: this is the location of the previous definition
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:229:1: warning: "PACKAGE_STRING" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:857:1: warning: this is the location of the previous definition
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:232:1: warning: "PACKAGE_TARNAME" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:860:1: warning: this is the location of the previous definition
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:235:1: warning: "PACKAGE_VERSION" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:863:1: warning: this is the location of the previous definition
/usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0xbc): In function `my_compress_alloc':
: undefined reference to `compress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x13a): In function `my_uncompress':
: undefined reference to `uncompress'
collect2: ld returned 1 exit status
make[1]: *** [all] Fel 1
make[1]: Leaving directory `/root/zabbix-1.0/src/zabbix_sucker'
make: *** [all] Fel 1
[root@ns1 zabbix-1.0]#

Alexei
12-01-2005, 17:01
Please, check this thread:

http://sourceforge.net/forum/message.php?msg_id=1612870

lazat
12-01-2005, 17:27
I have tried this already.

My makefile looks like this ( src/zabbiz_sucker )

INCLUDE = -I/usr/include/mysql -I/usr/include
LIBS = -lnsl -L/usr/lib/mysql -lmysqlclient -lm -L/usr/lib -lnetsnmp -lcrypto -lz

( src/zabbiz_trapper )

INCLUDE = -I/usr/include/mysql
LIBS = -lnsl -L/usr/lib/mysql -lmysqlclient -lm -lz

this is how make looks with -lz


Making all in src/zabbix_sucker
make[1]: Entering directory `/root/zabbix-1.0/src/zabbix_sucker'
gcc -o ../../bin/zabbix_suckerd -g -O2 -I../../include -I/usr/include/mysql -I/usr/include zabbix_sucker.c ../../include/db.c ../../include/functions.c ../../include/expression.c ../../include/cfg.c ../../include/log.c ../../include/security.c ../../include/pid.c ../../include/snprintf.c ../zabbix_agent/sysinfo.c alerter.c pinger.c housekeeper.c -Wall -lnsl -L/usr/lib/mysql -lmysqlclient -lm -L/usr/lib -lnetsnmp -lcrypto -lz
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:223:1: warning: "PACKAGE_BUGREPORT" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:851:1: warning: this is the location of the previous definition
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:226:1: warning: "PACKAGE_NAME" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:854:1: warning: this is the location of the previous definition
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:229:1: warning: "PACKAGE_STRING" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:857:1: warning: this is the location of the previous definition
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:232:1: warning: "PACKAGE_TARNAME" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:860:1: warning: this is the location of the previous definition
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:235:1: warning: "PACKAGE_VERSION" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:863:1: warning: this is the location of the previous definition
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[1]: *** [all] Fel 1
make[1]: Leaving directory `/root/zabbix-1.0/src/zabbix_sucker'
make: *** [all] Fel 1
[root@ns1 zabbix-1.0]#

lazat
13-01-2005, 17:42
I fixed it by installing zlib devel.

jdonauer
03-03-2005, 13:02
AAAARGHS ... sorry ... down below is a idiot outside problem ! :D

forgot to install the openssl-devel package ... but I leave it here. Maybe some other guys run into the same trouble ... :cool:

---------------- Begin Idiot Outside Problem ------------------------
similar error on Fedora Core 3. And installing the zlib-devel didn't fix the problem.

In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:235:1: warning: "PACKAGE_VERSION" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:883:1: warning: this is the location of the previous definition
/usr/lib/libnetsnmp.so: undefined reference to `EVP_DigestInit'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_DigestFinal'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_DigestFinal_ex'
/usr/lib/libnetsnmp.so: undefined reference to `AES_set_encrypt_key'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_md5'
/usr/lib/libnetsnmp.so: undefined reference to `HMAC'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_MD_CTX_cleanup'
/usr/lib/libnetsnmp.so: undefined reference to `SSLeay'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_sha1'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_MD_CTX_init'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_DigestUpdate'
/usr/lib/libnetsnmp.so: undefined reference to `RAND_bytes'
/usr/lib/libnetsnmp.so: undefined reference to `DES_cbc_encrypt'
/usr/lib/libnetsnmp.so: undefined reference to `DES_ncbc_encrypt'
/usr/lib/libnetsnmp.so: undefined reference to `DES_key_sched'
/usr/lib/libnetsnmp.so: undefined reference to `AES_cfb128_encrypt'
collect2: ld returned 1 exit status
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/jdonauer/zabbix-1.0/src/zabbix_sucker'
make: *** [all] Error 1

if I use zabbix 1.1-alpha6 the following error appears at zabbix_server
In file included from ../../include/db.h:26,
from zabbix_sucker.c:59:
../../include/config.h:235:1: warning: "PACKAGE_VERSION" redefined
In file included from zabbix_sucker.c:46:
/usr/include/net-snmp/net-snmp-config.h:883:1: warning: this is the location of the previous definition
/usr/lib/libnetsnmp.so: undefined reference to `EVP_DigestInit'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_DigestFinal'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_DigestFinal_ex'
/usr/lib/libnetsnmp.so: undefined reference to `AES_set_encrypt_key'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_md5'
/usr/lib/libnetsnmp.so: undefined reference to `HMAC'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_MD_CTX_cleanup'
/usr/lib/libnetsnmp.so: undefined reference to `SSLeay'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_sha1'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_MD_CTX_init'
/usr/lib/libnetsnmp.so: undefined reference to `EVP_DigestUpdate'
/usr/lib/libnetsnmp.so: undefined reference to `RAND_bytes'
/usr/lib/libnetsnmp.so: undefined reference to `DES_cbc_encrypt'
/usr/lib/libnetsnmp.so: undefined reference to `DES_ncbc_encrypt'
/usr/lib/libnetsnmp.so: undefined reference to `DES_key_sched'
/usr/lib/libnetsnmp.so: undefined reference to `AES_cfb128_encrypt'
collect2: ld returned 1 exit status
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/jdonauer/zabbix-1.0/src/zabbix_server'
make: *** [all] Error 1

llama
08-03-2005, 19:24
Im trying to install on Mandrake 10.0..

2.4.25-4mdkenterprise
MySQL-4.0.18-1.3.100mdk
openssl-0.9.7c-3.1.100mdk

I have both zlib-devel and openssl-devel installed..

Any suggestions would be appreciated :)


[root@zabbix/usr/local/src]# rpm -qa |grep zlib
zlib1-1.2.1-2.1.100mdk
zlib1-devel-1.2.1-2.1.100mdk
[root@zabbix/usr/local/src]# rpm -qa |grep openssl
libopenssl0.9.7-0.9.7c-3.1.100mdk
openssl-0.9.7c-3.1.100mdk
libopenssl0.9.7-devel-0.9.7c-3.1.100mdk



[root@zabbix/usr/local/src/zabbix-1.1alpha6]# make
Making all in src/zabbix_agent
make[1]: Entering directory `/usr/local/src/zabbix-1.1alpha6/src/zabbix_agent'
gcc -o ../../bin/zabbix_agent -static -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
sysinfo.c: In function `process':
sysinfo.c:389: warning: `function_str' might be used uninitialized in this function
../../include/snprintf.c:169: warning: `dopr' defined but not used
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/local/src/zabbix-1.1alpha6/src/zabbix_agent'
make: *** [all] Error 1