[collectd] compiling on solaris 9: 3.11.7 and 4.1.2
samuel gipe
sgipe at yahoo.com
Thu Oct 11 00:38:38 CEST 2007
Hi all,
Thought I would post my experience with compiling collectd on solaris 9 using gcc. If anyone has had better experience, let me know please.
Compiling collectd-3.11.7 works on solaris 9, after disabling various modules (shown below).
Compiling collectd-4.1.2 fails on solaris 9 with an strerror_r related error (shown below).
4.1.2:
collectd wants strerror_r, a lib available for linux and solaris 10, but not for solaris 9 (that I know of).
Its seems like there are measures provided for in config.h to deal with the availability of strerror_r, but something doesn't seem to be working. That said, I haven't really poked around enough:
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#define HAVE_DECL_STRERROR_R 0
/* Define to 1 if you have the `strerror_r' function. */
/* #undef HAVE_STRERROR_R */
/* Define to 1 if strerror_r returns char *. */
/* #undef STRERROR_R_CHAR_P */
The error from the make:
common.c: In function `sstrerror':
common.c:94: warning: implicit declaration of function `strerror_r'
*** Error code 1
The corresponding "configure" command line (used for both 4.1.2 and 3.11.7):
env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" CC=/usr/local/bin/gcc LIBS="-lkstat -ldevinfo -lsocket" CFLAGS="-D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__ -D_AVL_H -D_REENTRANT" ./configure --disable-mysql --disable-apcups --disable-csv --disable-email --disable-exec --disable-mbmon --disable-perl --disable-swap --disable-unixsock --prefix=/usr/local/collectd
note: For both 4.1.2 and 3.11.7, enabling the above modules causes make to fail (for at least some of the modules, possibly all...Not needing these modules, I didn't spend a lot of time troubleshooting).
I used CFLAGS from http://mailman.verplant.org/pipermail/collectd/2007-August/001095.html
thanks! collectd is a great tool!
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545433
More information about the collectd
mailing list