Spine, 087g, centos 5.6, failing to compile spine

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
dieselboy
Cacti User
Posts: 135
Joined: Wed May 27, 2009 5:10 pm

Spine, 087g, centos 5.6, failing to compile spine

Post by dieselboy »

Hi all. It has been a while since I last posted here. I have been hard at work / studying etc etc.

I'm hoping someone can help, as I have searched Google and this forum but not found anything relating to my specific issue. I seem to be unable to compile spine in my 64-bit OS. I built this server yesterday and have very slowly been putting all the pieces together for a working Cacti box. Cacti is working, polling etc but would like to install Spine.

I have followed the instructions here: http://www.cacti.net/spine_install_rhlnx.php
I have, installed all of the pre-requisites. I had to install gcc to compile, as my distribution did not come with it. I used YUM to install. When this didnt work I Googled which led me to install, in addition:
libtool,
zlib-devel,
gcc-c++
However I'm still running into problems.

I did find a thread on this site which someone mentioned to tell the OS where the mysql devel libraries are. However this didnt make any difference. The command was something like "./configure --where-sql=/usr/bin"

Here is the directory and where the configure fails.

Code: Select all

[root@localhost Desktop]# cd cacti-spine-0.8.7g
[root@localhost cacti-spine-0.8.7g]# ls -l
total 1488
-rw-r--r-- 1 1000 users 316684 Jul  9  2010 aclocal.m4
-rw-r--r-- 1 1000 users      0 Jul  9  2010 AUTHORS
drwxr-xr-x 2 1000 users   4096 Jul  9  2010 autom4te.cache
-rwxr-xr-x 1 1000 users   1895 Jul  9  2010 bootstrap
-rw-r--r-- 1 1000 users  13908 Jul 10  2010 ChangeLog
-rw-r--r-- 1 1000 users   3917 Jul  9  2010 common.h
drwxr-xr-x 2 1000 users   4096 Jul  9  2010 config
-rw-r--r-- 1 root root   47002 Jun 19 21:15 config.log
-rwxr-xr-x 1 1000 users 484757 Jul  9  2010 configure
-rw-r--r-- 1 1000 users  14048 Jul  9  2010 configure.ac
-rw-r--r-- 1 1000 users  17992 Jul  9  2010 COPYING
-rw-r--r-- 1 1000 users   4936 Jul  9  2010 error.c
-rw-r--r-- 1 1000 users   2381 Jul  9  2010 error.h
-rw-r--r-- 1 1000 users  15578 Jul  9  2010 INSTALL
-rw-r--r-- 1 1000 users   6791 Jul  9  2010 keywords.c
-rw-r--r-- 1 1000 users   2597 Jul  9  2010 keywords.h
-rw-r--r-- 1 1000 users   2238 Jul  9  2010 LICENSE
-rw-r--r-- 1 1000 users  26440 Jul  9  2010 LICENSE.LGPL
-rw-r--r-- 1 1000 users   7277 Jul  9  2010 locks.c
-rw-r--r-- 1 1000 users   2533 Jul  9  2010 locks.h
-rw-r--r-- 1 1000 users    257 Jul  9  2010 Makefile.am
-rw-r--r-- 1 1000 users  24201 Jul  9  2010 Makefile.in
-rw-r--r-- 1 1000 users      0 Jul  9  2010 NEWS
-rw-r--r-- 1 1000 users  10759 Jul  9  2010 nft_popen.c
-rw-r--r-- 1 1000 users   2532 Jul  9  2010 nft_popen.h
-rwxr-xr-x 1 1000 users   3263 Jul  9  2010 package
-rw-r--r-- 1 1000 users  16527 Jul  9  2010 php.c
-rw-r--r-- 1 1000 users   2503 Jul  9  2010 php.h
-rw-r--r-- 1 1000 users  35822 Jul  9  2010 ping.c
-rw-r--r-- 1 1000 users   5341 Jul  9  2010 ping.h
-rw-r--r-- 1 1000 users  53815 Jul  9  2010 poller.c
-rw-r--r-- 1 1000 users   2574 Jul  9  2010 poller.h
-rw-r--r-- 1 1000 users   1433 Jul  9  2010 README
-rw-r--r-- 1 1000 users   1359 Jul  9  2010 README-WINDOWS
-rw-r--r-- 1 1000 users  20871 Jul  9  2010 snmp.c
-rw-r--r-- 1 1000 users   2856 Jul  9  2010 snmp.h
-rw-r--r-- 1 1000 users  25326 Jul  9  2010 spine.c
-rw-r--r-- 1 1000 users   2791 Jul  9  2010 spine.conf.dist
-rw-r--r-- 1 1000 users  15205 Jul  9  2010 spine.h
-rw-r--r-- 1 1000 users   8354 Jul  9  2010 sql.c
-rw-r--r-- 1 1000 users   2563 Jul  9  2010 sql.h
-rw-r--r-- 1 1000 users  33840 Jul  9  2010 util.c
-rw-r--r-- 1 1000 users   3794 Jul  9  2010 util.h
[root@localhost cacti-spine-0.8.7g]#  ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gawk... (cached) gawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 98304
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ranlib... (cached) ranlib
checking whether to enable -Wall... no
checking for threadsafe gethostbyname()... no
checking for gethostbyname_r in -lnls... no
checking for socket in -lsocket... no
checking for floor in -lm... yes
checking for pthread_exit in -lpthread... yes
checking for deflate in -lz... yes
checking for kstat_close in -lkstat... no
checking for CRYPTO_realloc in -lcrypto... yes
checking for ANSI C header files... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for signal.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for netinet/in_systm.h... yes
checking for netinet/in.h... yes
checking for netinet/ip.h... yes
checking for netinet/ip_icmp.h... yes
checking for unsigned long long... yes
checking for long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for malloc... yes
checking for calloc... yes
checking for gettimeofday... yes
checking for strerror... yes
checking for strtoll... yes
checking priv.h usability... no
checking priv.h presence... no
checking for priv.h... no
checking whether we are using Solaris privileges... no
[b]checking for mysql_init in -lmysqlclient_r... no
configure: error: MySQL libraries not found[/b]
Many thanks in advance. It's probably me missing something / not understanding and if so, I apologise. I'm still learning :)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Spine, 087g, centos 5.6, failing to compile spine

Post by gandalf »

Please install mysql-devel
R.
dieselboy
Cacti User
Posts: 135
Joined: Wed May 27, 2009 5:10 pm

Re: Spine, 087g, centos 5.6, failing to compile spine

Post by dieselboy »

It has already been installed as part of the prerequisites :(

Code: Select all

[root@localhost cacti-spine-0.8.7g]# yum list mysql-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.sov.uk.goscomb.net
 * extras: mirror.sov.uk.goscomb.net
 * updates: mirror.sov.uk.goscomb.net
base                                                                                                                                   | 2.1 kB     00:00
dag                                                                                                                                    | 1.1 kB     00:00
extras                                                                                                                                 | 2.1 kB     00:00
updates                                                                                                                                | 1.9 kB     00:00
Installed Packages
mysql-devel.i386                                                           5.0.77-4.el5_6.6                                                          installed
mysql-devel.x86_64                                                         5.0.77-4.el5_6.6                                                          installed
dieselboy
Cacti User
Posts: 135
Joined: Wed May 27, 2009 5:10 pm

Re: Spine, 087g, centos 5.6, failing to compile spine

Post by dieselboy »

I just removed and reinstalled it with YUM and now it works...

Code: Select all

checking for mysql_init in -lmysqlclient_r... yes
Strange?!
dieselboy
Cacti User
Posts: 135
Joined: Wed May 27, 2009 5:10 pm

Re: Spine, 087g, centos 5.6, failing to compile spine

Post by dieselboy »

Thanks Gandalf! :)
What do I need to pull out of that directory now for spine. The document says "Now you must move your new binary, spine and spine.conf to a more permanent home such as /usr/local/spine."

What is the "new binary"? I can find "spine" and "spine.conf.dist" do I need to rename spine.conf.dist to spine.conf?

Thanks,
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Spine, 087g, centos 5.6, failing to compile spine

Post by gandalf »

binary == spine
config file == spine.conf
By default, we check specific locations to find them. There's a config option under settings to enter the path/to/spine
Personally, I put spine.conf in the cacti directory. Strictly speaking, this is bad. You may prefer /etc/cacti/spine.conf or the like.
R.
dieselboy
Cacti User
Posts: 135
Joined: Wed May 27, 2009 5:10 pm

Re: Spine, 087g, centos 5.6, failing to compile spine

Post by dieselboy »

Thanks for the tip. My path to spine (configured within Cacti) is /usr/bin and the .conf file is in that same directory. This seems wrong to me but seems logical to place Spine there?
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Spine, 087g, centos 5.6, failing to compile spine

Post by noname »

FYI:

In spine.h: (from spine-0.8.7g)

Code: Select all

/* locations to search for the config file */
#define CONFIG_PATHS 4
#define CONFIG_PATH_1 ""
#define CONFIG_PATH_2 "/etc/"
#define CONFIG_PATH_3 "/etc/cacti/"
#define CONFIG_PATH_4 "../etc/"
Spine searches config file at these locations.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests