PDA

View Full Version : Solaris 10 sparc compile errors


estrawser
01-12-2009, 15:39
I'm supposed to test out Zabbix to see if we'll want to use it as a monitoring solution. I'm running into all sorts of problems, though.

checking for curl-config... /usr/local/bin/curl-config
checking for the version of libcurl... 7.19.6
checking for libcurl >= version 7.13.1... yes
checking for main in -lcurl... no
configure: error: Not found libcurl library

Is the latest one. /usr/local/bin/curl-config is there. I can only compile if I use --with-libcurl=no, but even if I do that, I can't get to ~zabbix on the server. I did build it without libcurl, but can't access it, at all, even after starting the server.

Is it supposed to be this difficult under solaris?

Edit: MOre info:

./configure --enable-server --with-net-snmp --with-pgsql --with-libcurl=/usr/local/bin/curl-config CFLAGS="-I/usr/local/include"

echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/ucb:/home/strawser/scripts:/opt/coolstack/mysql_32bit/bin:/opt/coolstack/mysql_32bit/bin:/usr/ccs/bin:/bin:/etc:/usr/ccs/bin:/usr/openwin/bin:/opt/bin:/usr/local/bin:/usr/sfw/bin

From config.log:


configure:9905: checking for curl-config
configure:9936: result: /usr/local/bin/curl-config
configure:9947: checking for the version of libcurl
configure:9954: result: 7.19.6
configure:9961: checking for libcurl >= version 7.13.1
configure:9974: result: yes
configure:10085: checking for main in -lcurl
configure:10114: gcc -o conftest -I/usr/local/include -I/usr/include/pgsql -I/usr/local/include -L/usr/local/lib -lcurl -L/usr/local/lib -L/usr/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -lidn -lssh2 -lssl -lcrypto -lsocket -lnsl -lz conftest.c -lcurl -lkvm -lm -lresolv -lnsl -lkstat -lsocket >&5
ld: fatal: library -lidn: not found
ld: fatal: library -lssh2: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure:10120: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "zabbix"
| #define VERSION "1.6.7"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_TIME_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_MATH_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_CTYPE_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_SYS_SYSINFO_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_LOADAVG_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_SYS_SWAP_H 1
| #define HAVE_SYS_VMMETER_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_KSTAT_H 1
| #define HAVE_SYS_SYSCALL_H 1
| #define HAVE_SYS_SYSMACROS_H 1
| #define HAVE_SYS_PROCFS_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_PWD_H 1
| #define HAVE_SYS_PROC_H 1
| #define HAVE_SYS_VAR_H 1
| #define HAVE_RESOLV_H 1
| #define HAVE_ARPA_NAMESER_H 1
| #define HAVE_ASSERT_H 1
| #define HAVE_NLIST_H 1
| #define HAVE_NET_IF_H 1
| #define HAVE_KVM_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_SYS_SEM_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_SYS_TIMEB_H 1
| #define HAVE_LBER_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_GRP_H 1
| #define HAVE_SYS_USER_H 1
| #define HAVE_LIBM 1
| #define HAVE_LIBKVM 1
| #define HAVE_RES_QUERY 1
| #define HAVE_PROC 1
| #define HAVE_PROC_0_PSINFO 1
| #define HAVE_SYS_RESOURCE_SETPRIORITY 1
| #define HAVE_UNISTD_SYSCONF 1
| #define HAVE___VA_COPY 1
| #define HAVE_SYS_SWAP_SWAPTABLE 1
| #define HAVE_FUNCTION_INITGROUPS 1
| #define HAVE_FUNCTION_SETEUID 1
| #define HAVE___VA_ARGS__ 1
| #define RETSIGTYPE void
| #define HAVE_GETLOADAVG 1
| #define HAVE_SOCKET 1
| #define HAVE_STRTOD 1
| #define HAVE_SNPRINTF 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_HSTRERROR 1
| #define HAVE_ATOLL 1
| #define HAVE_GETOPT_LONG 1
| #define HAVE_POSTGRESQL 1
| #define HAVE_FUNCTION_PQSERVERVERSION 1
| /* end confdefs.h. */
|
|
| int
| main ()
| {
| return main ();
| ;
| return 0;
| }
configure:10138: result: no
configure:10146: error: Not found libcurl library

untergeek
01-12-2009, 16:50
With Solaris 10 I have similar problems. I find that I have to pre-pend my configure statement with a few extras. Your statement seems to post-pend (for some reason it seemed to matter. Here's what I had to do to get mine to compile:

CC=/usr/bin/cc CFLAGS="-I/opt/sfw/include" LDFLAGS="-L/opt/oracle/product/10.2.0.1/lib32 -R/opt/oracle/product/10.2.0.1/lib32" ./configure --with-net-snmp=/usr/local/bin/net-snmp-config --with-libcurl=/opt/sfw/bin/curl-config --with-oracle=/usr/local --enable-server --enable-proxy --enable-agent

My lib-curl was in /opt/sfw/include as it came with the Solaris extras CD.

You might try pre-pending the CFLAGS rather than post-pending it.

Tenzer
01-12-2009, 16:53
libcurl depends on libssh2 and libidn, which you don't seem to have:
ld: fatal: library -lidn: not found
ld: fatal: library -lssh2: not found


You could try the following command to make sure that you have the required libraries: ldd `which curl`

Oh, and libssh2 and libidn can be found at www.sunfreeware.com, if you don't know already.

estrawser
01-12-2009, 18:31
Thanks! I appreciate the help. I didn't realize I had to install those two packages.

Now . . . how do I get it started. HTTP://hostip gives me the default page. Is it running on a different port than 80, or something?

Tenzer
02-12-2009, 09:52
Zabbix does not run it's own webserver, you will have to move the frontend PHP files to the webservers document root.

estrawser
02-12-2009, 21:16
Zabbix does not run it's own webserver, you will have to move the frontend PHP files to the webservers document root.

Thanks a billion. I'm coming closer by the day.

PHP version: 5.2.6 Ok
PHP Memory limit: 64M Ok
PHP post max size: 8M Ok
PHP max execution time: 30 sec Fail
PHP Databases support: MySQL Ok
PHP BC math support: no Fail
PHP Sockets support no Fail
GD Version: No Fail
Image formats: No Fail
PHP Timezone: n/a Fail

Does anyone know how to fix the PHP max execution time, or where to find the missing parts for the tests I'm failing?

Edit:
I've uncommented :

extension=bcmath.so
extension=sockets.so

In /opt/coolstack/php5/lib/php.ini, but it didn't fix those two problems. There was no timezone statement in there.

untergeek
02-12-2009, 21:26
php.ini, wherever yours is.

Mine's in /usr/local/lib, with entries like these:

memory_limit = 128M ; Maximum amount of memory a script may default_socket_timeout = 1800
date.timezone = "America/Austin"
max_execution_time = 300

It seems you also have to recompile your PHP with BC Math, GD (with PNG support) and PHP Sockets.

Good luck!

estrawser
02-12-2009, 21:38
Mine's in /opt/coolstack/php5/lib/php.ini, but when I added those lines for date.timezon and max_execution_time it didn't fix those two errors.

untergeek
02-12-2009, 22:01
America/Chicago is a better choice for Central time.

Did you restart Apache after making the change? It isn't automatic.

estrawser
02-12-2009, 22:11
Oh, WOW. Thanks! Much, much better.

PHP version: 5.2.6 Ok
PHP Memory limit: 64M Ok
PHP post max size: 8M Ok
PHP max execution time: 300 sec Ok
PHP Databases support: MySQL Ok
PHP BC math support: yes Ok
PHP Sockets support yes Ok
GD Version: No Fail
Image formats: No Fail
PHP Timezone: America/Austin Ok


I installed GD from sunfreeware.com, but I guess it's missing from a path statement or something. And I don't get any pop-up help for "Image formats".

untergeek
02-12-2009, 22:14
There may be dependent packages. You have GD, but do you have the PNG portion? Do you have PHP-GD?

estrawser
03-12-2009, 14:24
I just ran: /opt/csw/bin/pkgutil --install CSWphp5gd

Then restarted apache. Still no graphics support.

GD Version: No Fail
Image formats: No Fail

estrawser
03-12-2009, 14:28
Sweet! I had to uncomment

extension=gd.so

In php.ini and I'm now past the prereq check. Thanks a million!

estrawser
03-12-2009, 14:36
Wouldn't it be hilarious if I finally got through the installation and I couldn't log in because I don't remember setting an admin username and password? I sure hope so, because that's what happened.

At the risk of sounding like a total buffoon, does anyone know how to set a username and password once the install is complete?

Edit: Never mind. I found the default login/pass in the docs. Thanks again, everyone!

Tenzer
03-12-2009, 15:28
Page 63 in the manual states:
ZABBIX frontend is ready! Default user name is ‘Admin’, password
'zabbix'.

untergeek
03-12-2009, 15:29
It's in the Zabbix Manual on page 63:

ZABBIX frontend is ready! Default user name is ‘Admin’, password 'zabbix'.

untergeek
03-12-2009, 15:29
DOH!

Beat by a matter of seconds. :)

estrawser
03-12-2009, 15:50
Thanks, guys. This forum is a tremendous help. I've also been testing some other stuff, and not every app has an active support forum. Hell, not every app even has an inactive support forum.

I've got it running, now, and I'll spend a few days clicking around and trying to find out how it works and what it does. So far, it's nice and fast compared to some of the other apps out there, and it appears to be feature rich, and you can actually get help for it (even if you're a Solaris user, instead of a Linux user).

Thanks again for all the help. I'd have been slugging away for God only knows how long without the forum.

untergeek
03-12-2009, 15:52
You're welcome, and good luck!

sunadmn
12-03-2010, 13:04
Has anyone been able to overcome this issue with libcurl on Solaris 10? I have tried almost everything I can think of here. Below is how I am trying to compile Zabbix:

env CC=/usr/local/bin/gcc CPPFLAGS='-I/opt/mysql-5.1.44/include/ -I/opt/mysql-5.1.44/mysql-test/include -I/opt/mysql-5.1.44/mysql-test/suite/funcs_1/include -I/opt/mysql-5.1.44/mysql-test/suite/funcs_2/include -I/opt/mysql-5.1.44/mysql-test/suite/jp/include -I/opt/mysql-5.1.44/mysql-test/suite/rpl/include -I/opt/mysql-5.1.44/mysql-test/suite/stress/include -I/opt/mysql-5.1.44/mysql-test/suite/innodb/include -I/usr/xpg4/include -I/usr/sfw/include -I/usr/sfw/mysql/mysql-test/include -I/usr/include -I/usr/X11/include -I/usr/dt/share/include -I/usr/local/include -I/usr/local/include/curl' LDFLAGS='-L/lib -L/etc/lib -L/usr/local/lib -L/usr/X11/lib -L/usr/dt/lib -L/usr/sfw/lib -L/usr/xpg4/lib -L/usr/openwin/lib -L/usr/openwin/sfw/lib -L/usr/lib -L/usr/ccs/lib -L/usr/share/lib -L/opt/mysql-5.1.44/mysql-test/suite/funcs_2/lib -L/opt/mysql-5.1.44/mysql-test/suite/funcs_1/lib -L/opt/mysql-5.1.44/mysql-test/lib -L/opt/mysql-5.1.44/lib -L/var/lib' ./configure --enable-server --with-mysql=/opt/mysql-5.1.44/lib/libmysqlclient.so --with-net-snmp --with-libcurl

And no matter what I get this error:

checking for Zabbix server database selection... ok
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gawk... (cached) nawk
checking for curl-config... /usr/local/bin/curl-config
checking for the version of libcurl... 7.20.0
checking for libcurl >= version 7.13.1... yes
checking for main in -lcurl... no
configure: error: Not found libcurl library

Does anyone have any ideas on this one? I really need to get this up and running to do a demo today if possible.

untergeek
12-03-2010, 18:13
My Solaris 10 string looks like this:

CC=/usr/bin/cc CFLAGS="-I/opt/sfw/include -I/opt/mysql/mysql32/include" LDFLAGS="-L/opt/sfw/lib -L/opt/mysql/mysql32/lib -R/opt/sfw/lib -R/opt/mysql/mysql32/lib" ./configure --with-net-snmp=/usr/local/bin/net-snmp-config --with-libcurl=/opt/sfw/bin/curl-config --with-mysql=/opt/mysql/mysql32/bin/mysql_config --without-jabber --enable-server

That --without-jabber actually may help, strangely enough...