PDA

View Full Version : FreeBSD 6.2 configure failes 1.4.1


Logicwrath
02-07-2007, 05:51
With:

./configure --enable-agent --enable-server --with-mysql --with-net-snmp --with-libcurl=/usr/local

I am getting:

checking for curl-config... /usr/local
configure: error: Not found Curl library

I have also tried /usr/local/bin and /usr/local/bin/curl-config

Also:

configure: WARNING: sys/mount.h: present but cannot be compiled
configure: WARNING: sys/mount.h: check for missing prerequisite headers?
configure: WARNING: sys/mount.h: see the Autoconf documentation
configure: WARNING: sys/mount.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/mount.h: proceeding with the preprocessor's result
configure: WARNING: sys/mount.h: in the future, the compiler will take precedence

Alexei
02-07-2007, 08:59
Use this option --with-libcurl=/usr/local/bin. It must point to location of the curl_config, see ./configure --help.

Logicwrath
03-07-2007, 02:01
Thanks for you interest.

"I have also tried /usr/local/bin and /usr/local/bin/curl-config"

I tried again with :

./configure --enable-agent --enable-server --with-mysql --with-net-snmp --with-libcurl=/usr/local/bin


checking for curl-config... /usr/local/bin
configure: error: Not found Curl library

[root@vismon /usr/local/bin]# ls curl*
curl curl-config

Logicwrath
03-07-2007, 04:20
I did get this to work finally. I added some symlinks but I do not think that is what did it.

The final solution did end up using /usr/local/bin/curl-config. Fifth times the charm? I swear I tried this before and it didnt work.

aalexanderr
03-07-2007, 21:03
Thanks for you interest.
"I have also tried /usr/local/bin and /usr/local/bin/curl-config"
I tried again with :
./configure --enable-agent --enable-server --with-mysql --with-net-snmp --with-libcurl=/usr/local/bin

checking for curl-config... /usr/local/bin
configure: error: Not found Curl library
[root@vismon /usr/local/bin]# ls curl*
curl curl-config

Yeap... this is a bad thing :)..

Try this:
find / -name "libcurl*"
if you libraries in /usr/local/lib/libcurl.* when just do:
cp /usr/local/lib/libcurl /usr/lib

run: ./configure --enable-agent --enable-server --with-mysql --with-net-snmp --with-libcurl=/usr/local/bin/curl-config

Alexei
04-07-2007, 06:53
curl_config must be in sync with your libraries. If curl_config returns wrong location of its libraries, ./configure won't work.

aalexanderr
04-07-2007, 08:04
curl_config must be in sync with your libraries. If curl_config returns wrong location of its libraries, ./configure won't work.

I install curl in /usr/local (by default):
#/usr/local/bin/curl-config --prefix
/usr/local
#/usr/local/bin/curl-config --libs
/usr/local/lib

but when i run ./configure --enable-agent --enable-server --with-mysql --with-net-snmp --with-libcurl=/usr/local
or --with-libcurl=/usr/local/bin/curl-config configure return error... libcurl not found.
after cp /usr/local/libs/curl* to /usr/libs all works fine...

Alexei
04-07-2007, 09:13
That's exactly what I'm talking about!

#/usr/local/bin/curl-config --libs
/usr/local/lib

Your curl-config incorrectly states that the libraries are installed in /usr/local/lib while they are actually in a different location.

aalexanderr
04-07-2007, 12:27
That's exactly what I'm talking about!

#/usr/local/bin/curl-config --libs
/usr/local/lib

Your curl-config incorrectly states that the libraries are installed in /usr/local/lib while they are actually in a different location.

NO !!!! Libraries instaled in /usr/local/lib !!!!!!!!
#ls /usr/local/lib/libcurl*
libcurl.a
libcurl.la
libcurl.so
libcurl.so.4

and #/usr/local/bin/curl-config --libs tell that :
/usr/local/lib
.............

and when i copy files from /usr/local/lib/libcurl* to /usr/lib/ zabbix correctly find curl libraries..

Alexei
05-07-2007, 15:28
Your curl-config is broken! It should generate the following output:

zabbix@ubuntu3:~/1.4.2$ curl-config --libs
-L/usr/lib -lcurl -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lidn -lssl -lcrypto -ldl -lssl -lcrypto -lz

Pay attention to -L and -l parameters.

aalexanderr
05-07-2007, 20:41
Your curl-config is broken! It should generate the following output:

zabbix@ubuntu3:~/1.4.2$ curl-config --libs
-L/usr/lib -lcurl -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lidn -lssl -lcrypto -ldl -lssl -lcrypto -lz

Pay attention to -L and -l parameters.

No :) my curl-config not broken.. i just copy part of the string what give me my curl-config --libs.
./curl-config --libs:
-L/usr/local/lib -lcurl -lssl -lcrypto -lz

This is normal string.. My curl is't broken.

mrdarcy
06-07-2007, 11:13
Your curl-config is broken! It should generate the following output:

zabbix@ubuntu3:~/1.4.2$ curl-config --libs
-L/usr/lib -lcurl -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lidn -lssl -lcrypto -ldl -lssl -lcrypto -lz

Pay attention to -L and -l parameters.

Under FreeBSD, with curl & net-snmp installed from the ports or packages, the curl & net-snmp libs live in /usr/local/lib/

Alexei, maybe you manually installed the curl libs on your FreeBSD test environment into /usr/lib ?
Afaik, under FreeBSD all user added software is supposed to go here: /usr/local/

e.g. /usr/local/bin/curl-config or /usr/local/lib/libcurl.so

Since curl is not part of the default FreeBSD installation, it's libs could never live /usr/lib unless manually installed or copied there.


btw, I use the LDFLAGS env var for zabbix 1.4.1 under freebsd 6.2, works fine for me:

./configure --enable-agent --enable-server --with-mysql --with-net-snmp --with-libcurl LDFLAGS="-L/usr/local/lib"

jacob.hamacher
03-09-2007, 21:52
I would also like to add to this thread. There is a problem with the configure script for FreeBSD. Zabbix assumes libcurl is installed in /usr/lib, but that is not the FreeBSD way. FreeBSD always install ports in /usr/local/lib. And I believe most FreeBSD admins prefer to install Zabbix from the ports system.

See my output below. Is there something the Zabbix developers can do, or is this something that the FreeBSD port maintainer of Zabbix should fix?


$ uname -a
FreeBSD <hostname_removed> 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Thu Apr 26 17:40:53 UTC 2007 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386

$ portversion -v zabbix
zabbix-1.4.2,1 = up-to-date with port

$ which curl-config
/usr/local/bin/curl-config

$ curl-config --libs
-L/usr/local/lib -lcurl -rpath=/usr/lib:/usr/local/lib -lssl -lcrypto -lz


But I really like Zabbix! Easy to setup, easy to get started, yet powerful and possible to adapt to many uses. Thank you for a good product!


/Jacob Hamacher

NOB
04-09-2007, 08:53
Hi,

I use - like one of the posters before - the LDFLAGS setting prior
to running "./configure".

My configure command looks like - of course all in one line:

LDFLAGS="-L /usr/local/lib -lssl" ./configure --enable-server --enable-agent --with-pgsql --with-net-snmp --with-libcurl=/usr/local/bin/curl-config --with-jabber

Net-SNMP from packages (via Internet, not on CD),
Postgresql from ports
Curl from ports
iksemel from ports
apache from packages (via Internet, not on CD)
PHP from ports but reconfigured later (Ports was not sufficient - no XML-support)

I think that -lssl was necessary for libcurl.

HTH,

Norbert.