cacti-cactid-0.8.6i - on solaris 10

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
lecoveny
Posts: 2
Joined: Tue Jul 17, 2007 9:45 am

cacti-cactid-0.8.6i - on solaris 10

Post by lecoveny »

I am attempting to install cacti-cactid-0.8.6i on solaris 10. I am getting the following error on the configure

checking for mysql_thread_init in -lmysqlclient... yes
checking if UCD-SNMP needs crypto support... no
checking if Net-SNMP needs crypto support... no
checking for snmp_timeout in -lnetsnmp... no
Cannot find NET-SNMP libraries(snmp)... checking UCD-SNMP
checking for snmp_timeout in -lsnmp... no
configure: error: Cannot find UCD-SNMP libraries(snmp)

I've attached the config.log
Here are my settings.
PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw:/opt/sfw/bin:/usr/sfw/bin
LOGNAME=root
MAIL=/var/mail/root
LDFLAGS=-L/usr/sfw/lib
SHELL=/sbin/sh
CPPFLAGS=-I/usr/sfw/include/net-snmp
HOME=/
LD_LIBRARY_PATH=/usr/sbin:/usr/bin:/usr/local/:/usr/sfw:/usr/sfw/lib:/usr/lib:/usr/sfw/lib/::/usr/sfw/include/net-snmp/library/:/usr/sfw/lib/sparcv9
TERM=xterm
PWD=/usr/local/source/cacti-cactid-0.8.6i
TZ=US/Eastern
Attachments
config.txt
(46.07 KiB) Downloaded 241 times
tafirol
Posts: 15
Joined: Sun May 22, 2005 9:43 am

Post by tafirol »

Looks like you dont have the net-snmp source http://net-snmp.sourceforge.net/,
check this post http://forums.cacti.net/about6112.html and before to run configure specify
LIBS something like
export LDFLAGS="-L/path-to-net-snmp"

Regards
User avatar
Darwin
Posts: 27
Joined: Mon May 27, 2002 10:34 am
Location: Montreal, QC
Contact:

Post by Darwin »

I'm getting the same problem, only, this time, on Solaris 8.

OS: Solaris 8
MySQL: /vol0/mysql/bin/mysql Ver 14.12 Distrib 5.0.45, for sun-solaris2.8 (sparc) using readline 5.0
NetSNMP: 5.4 or 5.1, tried both, from SunFreeware packages, same result
-----

Thing is, everything works fine with cacti-cactid-0.8.6g, it didn't error out when checking for net-snmp, and compiles fine.

But now, with cacti-cactid-0.8.6i, no go.

Anyone have an idea? I'd prefer avoiding having to compile net-snmp from source also, if possible, unless it winds up being the only solution. That, or keep running with g.

-----

Library paths, I believe, should be fine:

# crle

Configuration file [version 4]: /var/ld/ld.config
Default Library Path (ELF): /usr/lib:/usr/local/lib:/vol0/mysql/lib:/usr/local/ssl/lib
Trusted Directories (ELF): /usr/lib/secure (system default)

Command line:
crle -c /var/ld/ld.config -l /usr/lib:/usr/local/lib:/vol0/mysql/lib:/usr/local/ssl/lib

-----

# ./configure --prefix=/home/cacti/cactid --with-mysql=/vol0/mysql --with-snmp=/usr/local

...
checking for mysql_thread_init in -lmysqlclient... yes
checking if UCD-SNMP needs crypto support... no
checking if Net-SNMP needs crypto support... yes
checking for snmp_timeout in -lnetsnmp... no
Cannot find NET-SNMP libraries(snmp)... checking UCD-SNMP
checking for snmp_timeout in -lsnmp... no
configure: error: Cannot find UCD-SNMP libraries(snmp)

According to config.log, it fails at this part:

configure:5752: checking for snmp_timeout in -lnetsnmp
configure:5782: gcc -o conftest -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/vol0/mysql/include -g -O2 -D_POSI
X_PTHREAD_SEMANTICS -L/usr/local/lib -L/vol0/mysql/lib conftest.c -lnetsnmp -lmysqlclient -lmysqlclient -lkstat -lz -lpthread -lm
-lsocket -lnsl >&5
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 conftest
collect2: ld returned 1 exit status
configure:5788: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "Cactid Poller"
| #define PACKAGE_TARNAME "cactid-poller"
| #define PACKAGE_VERSION "0.8.6i"
| #define PACKAGE_STRING "Cactid Poller 0.8.6i"
| #define PACKAGE_BUGREPORT "http://bugs.cacti.net"
| #define PACKAGE "cactid"
| #define VERSION "0.8.6i"
| #define SOLAR_THREAD 1
| #define HAVE_LIBNSL 1
| #define HAVE_LIBSOCKET 1
| #define HAVE_LIBM 1
| #define HAVE_LIBPTHREAD 1
| #define HAVE_LIBZ 1
| #define HAVE_LIBKSTAT 1
| #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_UNISTD_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_ASSERT_H 1
| #define HAVE_CTYPE_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_MATH_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_STDIO_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_UNSIGNED_LONG_LONG 1
| #define HAVE_LONG_LONG 1
| #define TIME_WITH_SYS_TIME 1
| #define RETSIGTYPE void
| #define HAVE_MALLOC 1
| #define HAVE_CALLOC 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_STRERROR 1
| #define HAVE_STRTOLL 1
| #define HAVE_LIBMYSQLCLIENT 1
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char snmp_timeout ();
| int
| main ()
| {
| snmp_timeout ();
| ;
| return 0;
| }
configure:5814: result: no
repudi8or
Posts: 27
Joined: Tue Sep 25, 2007 7:41 pm

Post by repudi8or »

Hey Lecovney/Darwin,

Did you ever get this resolved? Im having the same issue trying to compile cactid for solaris 10. I am trying to use the SMA (Sun's implementation of net-snmp) libraries/sources.

bash-3.00# pwd
/cacti/src/cacti-cactid-0.8.6i

bash-3.00# env | grep -i lib
LDFLAGS=-L/usr/sfw/lib
LD_LIBRARY_PATH=:/usr/local/lib:/usr/sfw/lib

bash-3.00# crle
Configuration file [version 4]: /var/ld/ld.config
Default Library Path (ELF): /lib:/usr/lib:/usr/sfw/lib

bash-3.00# ./configure --with-mysql=/cacti/src/mysql-5.0.41/include --with-snmp=/usr/share/src/sma_snmp

the libraries are (i believe) in /usr/sfw/lib and i have tried adding that to LD_LIB_PATH, LDFLAGS and the default search path with crle all to no avail.

All help welcome ;-)

Repudi8or
potpot
Posts: 2
Joined: Mon Jan 22, 2007 6:55 pm

Post by potpot »

have you tried adding LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib"
User avatar
Darwin
Posts: 27
Joined: Mon May 27, 2002 10:34 am
Location: Montreal, QC
Contact:

Post by Darwin »

Ahhh..

Thanks for the tip.

OS: Solaris 8, sparc
Spine: cacti-spine-0.8.7a

SNMP: netsnmp-5.4-sol8-sparc-local
SSL: openssl-0.9.8e-sol8-sparc-local

For what it's worth, I was able to get through my previously reported, seemingly SNMP/SSL-related problem, by specifying, first:

LDFLAGS=-L/usr/local/ssl/lib
export LDFLAGS

And then proceeding with my usual configure steps:

./configure --prefix=/vol0/spine --with-mysql=/vol0/mysql --with-snmp=/usr/local

I thought having /usr/local/ssl/lib in crle would make it so I woudn't need to define it before executing the configure, but I guess not.

Doing the 'make' encounters some other problems, related to netinet/ip.h and netinet/ip_icmp.h, but I'll go post about that in the 'Spine Compile Issues Here' thread instead.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

could you please try with cactid 0.8.6k ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
Darwin
Posts: 27
Joined: Mon May 27, 2002 10:34 am
Location: Montreal, QC
Contact:

Post by Darwin »

Okay, I just tried compiling 0.8.6k.

A few revised/additional steps to get things to compile correctly:

Code: Select all

# LDFLAGS=-L/usr/local/ssl/lib 
# export LDFLAGS
# CFLAGS=-I/usr/local/include/net-snmp/library
# export CFLAGS
# ./configure --prefix=/vol0/cactid --with-mysql=/vol0/mysql --with-snmp=/usr/local
If I don't specify the LDFLAGS, I will be getting this error message during 'configure':

Code: Select all

checking if UCD-SNMP needs crypto support... no
checking if Net-SNMP needs crypto support... yes
checking for snmp_timeout in -lnetsnmp... no
Cannot find NET-SNMP libraries(snmp)... checking UCD-SNMP
checking for snmp_timeout in -lsnmp... no
configure: error: Cannot find UCD-SNMP libraries(snmp)
If I don't specify the CFLAGS, I will be getting this error message during 'make':

Code: Select all

source='snmp.c' object='snmp.o' libtool=no \
        depfile='.deps/snmp.Po' tmpdepfile='.deps/snmp.TPo' \
        depmode=gcc3 /bin/bash ./config/depcomp \
        gcc -DHAVE_CONFIG_H -I. -I. -I./config     -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/vol0/mysql/include -g -O2 -c `test -f 'snmp.c' || echo './'`snmp.c
In file included from snmp.c:45:
/usr/local/include/net-snmp/utilities.h:31:20: getopt.h: No such file or directory
make: *** [snmp.o] Error 1
Also, of note, during configure, I got these warning messages, which I see have been reported in a few other threads also. Really not sure how they might affect things...

Code: Select all

checking netinet/ip.h usability... no
checking netinet/ip.h presence... yes
configure: WARNING: netinet/ip.h: present but cannot be compiled
configure: WARNING: netinet/ip.h:     check for missing prerequisite headers?
configure: WARNING: netinet/ip.h: see the Autoconf documentation
configure: WARNING: netinet/ip.h:     section "Present But Cannot Be Compiled"
configure: WARNING: netinet/ip.h: proceeding with the preprocessor's result
configure: WARNING: netinet/ip.h: in the future, the compiler will take precedence
configure: WARNING:     ## -------------------------------------------- ##
configure: WARNING:     ## Report this to http://www.cacti.net/bugs.php ##
configure: WARNING:     ## -------------------------------------------- ##
checking for netinet/ip.h... yes
checking netinet/ip_icmp.h usability... no
checking netinet/ip_icmp.h presence... yes
configure: WARNING: netinet/ip_icmp.h: present but cannot be compiled
configure: WARNING: netinet/ip_icmp.h:     check for missing prerequisite headers?
configure: WARNING: netinet/ip_icmp.h: see the Autoconf documentation
configure: WARNING: netinet/ip_icmp.h:     section "Present But Cannot Be Compiled"
configure: WARNING: netinet/ip_icmp.h: proceeding with the preprocessor's result
configure: WARNING: netinet/ip_icmp.h: in the future, the compiler will take precedence
configure: WARNING:     ## -------------------------------------------- ##
configure: WARNING:     ## Report this to http://www.cacti.net/bugs.php ##
configure: WARNING:     ## -------------------------------------------- ##
checking for netinet/ip_icmp.h... yes
Otherwise, it does "seem" to compile correctly. I don't have the luxury of actually trying it out at the moment unfortunately.

Uhmmm... Something of note, with this cactid version, looks like the version string might be a bit wrong. :)

Code: Select all

# ./cactid -h
CACTID 0.8.8l  Copyright 2002-2006 by The Cacti Group
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Darwin wrote:Uhmmm... Something of note, with this cactid version, looks like the version string might be a bit wrong. :)

Code: Select all

# ./cactid -h
CACTID 0.8.8l  Copyright 2002-2006 by The Cacti Group
You're right, I've seen that too.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Post by sukanta »

Hi,
after that also getting error..

-L/usr/local//lib -L -L/opt/mysql5-client

One extra -L is coming after ./configure..PL help..

/bin/bash ./libtool --tag=CC --mode=link gcc -I/usr/local//include/net-snmp -I/usr/local//include/net-snmp/.. -I/opt/mysql/include -I/usr/local/include/net-snmp/library -L/usr/local//lib -L -L/opt/mysql5-client/lib/mysql -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lnetsnmp -lmysqlclient_r -lmysqlclient_r -lkstat -lz -lpthread -lm -lsocket
libtool: link: require no space between `-L' and `-L/opt/mysql5-client/lib/mysql'
make: *** [spine] Error 1
PWD=/soft/cacti/cacti-spine-0.8.7e
HZ=
LD_LIBRARY_PATH=/opt/mysql5-client/lib/mysql:/usr/local/include/net-snmp/library
MACHTYPE=sparc-sun-solaris
MAIL=/var/mail/root
OLDPWD=/soft/cacti/cacti-spine-0.8.7e/config
LOGNAME=root
SHLVL=1
LDFLAGS=-L/opt/mysql5-client/lib/mysql
SHELL=/sbin/sh
HOSTTYPE=sparc
OSTYPE=solaris
HOME=/
TERM=xterm
PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/openwin/bin:/opt/mysql5-client/bin
CFLAGS=-I/usr/local/include/net-snmp/library
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Post by sukanta »

Resolved!!!!!

After deleting the extra -L from Makefile
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests