Problems compiling Spine 1.1.24 on Centos 7

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

Moderators: Developers, Moderators

Post Reply
misterguitar
Posts: 14
Joined: Wed Jun 10, 2015 2:25 pm

Problems compiling Spine 1.1.24 on Centos 7

Post by misterguitar »

I have followed the directions for compiling spine.

configure worked like a champ.

Make keeps bombing on this? I suspect something in Maridb changed. Anybody else run into this? I'm running Mariadb 1.5.5.56-2.el7 from the MariaDB repo.

[root@localhost cacti-spine-1.1.24]# make
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.c
mv -f .deps/sql.Tpo .deps/sql.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT spine.o -MD -MP -MF .deps/spine.Tpo -c -o spine.o spine.c
mv -f .deps/spine.Tpo .deps/spine.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT snmp.o -MD -MP -MF .deps/snmp.Tpo -c -o snmp.o snmp.c
mv -f .deps/snmp.Tpo .deps/snmp.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT locks.o -MD -MP -MF .deps/locks.Tpo -c -o locks.o locks.c
mv -f .deps/locks.Tpo .deps/locks.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT poller.o -MD -MP -MF .deps/poller.Tpo -c -o poller.o poller.c
mv -f .deps/poller.Tpo .deps/poller.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT nft_popen.o -MD -MP -MF .deps/nft_popen.Tpo -c -o nft_popen.o nft_popen.c
mv -f .deps/nft_popen.Tpo .deps/nft_popen.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT php.o -MD -MP -MF .deps/php.Tpo -c -o php.o php.c
mv -f .deps/php.Tpo .deps/php.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT ping.o -MD -MP -MF .deps/ping.Tpo -c -o ping.o ping.c
mv -f .deps/ping.Tpo .deps/ping.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT keywords.o -MD -MP -MF .deps/keywords.Tpo -c -o keywords.o keywords.c
mv -f .deps/keywords.Tpo .deps/keywords.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT error.o -MD -MP -MF .deps/error.Tpo -c -o error.o error.c
mv -f .deps/error.Tpo .deps/error.Po
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/mysql -g -O2 -L/usr/lib64 -lpthread -lssl -lm -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 -lmysqlclient -lcrypto -lz -lpthread -lm
libtool: link: gcc -I/usr/include/mysql -g -O2 -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 -L/usr/lib64 -lssl -lmysqlclient -lcrypto -lz -lpthread -lm
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make: *** [spine] Error 1
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by cigamit »

Did you install MariaDB-devel or mysql-devel ?
misterguitar
Posts: 14
Joined: Wed Jun 10, 2015 2:25 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by misterguitar »

MariaDB-devel
misterguitar
Posts: 14
Joined: Wed Jun 10, 2015 2:25 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by misterguitar »

mysql-devel seems to point to the same thing...

[root@localhost cacti-spine-1.1.24]# yum install mysql-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.solarvps.com
* epel: archive.linux.duke.edu
* extras: mirror.math.princeton.edu
* updates: mirrors.rit.edu
Package MariaDB-devel-10.2.9-1.el7.centos.x86_64 already installed and latest version
Nothing to do
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by cigamit »

And how about MariaDB-client?
misterguitar
Posts: 14
Joined: Wed Jun 10, 2015 2:25 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by misterguitar »

Yes it is

[administrator@probe ~]$ yum list installed | grep maria
MariaDB-client.x86_64 10.2.9-1.el7.centos @mariadb
MariaDB-common.x86_64 10.2.9-1.el7.centos @mariadb
MariaDB-compat.x86_64 10.2.9-1.el7.centos @mariadb
MariaDB-devel.x86_64 10.2.9-1.el7.centos @mariadb
MariaDB-server.x86_64 10.2.9-1.el7.centos @mariadb
galera.x86_64 25.3.20-1.rhel7.el7.centos @mariadb
misterguitar
Posts: 14
Joined: Wed Jun 10, 2015 2:25 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by misterguitar »

I also just confirmed this happens on spine 1.1.25.


Steps to repeat problem
Install Centos 7 choose sever with gui. No additional options.
Yum upgrade server
Configure MariaDB repo
MariaDB 10.2 CentOS repository list - created 2017-10-04 15:23 UTC
http://downloads.mariadb.org/mariadb/repositories/

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Install epel repo using yum
Install Maria DB server and client and development tools. On these versions (which are current)
root@probe cacti-spine-1.1.25]# yum list installed | grep maria
MariaDB-client.x86_64 10.2.9-1.el7.centos @MariaDB
MariaDB-common.x86_64 10.2.9-1.el7.centos @MariaDB
MariaDB-compat.x86_64 10.2.9-1.el7.centos @MariaDB
MariaDB-devel.x86_64 10.2.9-1.el7.centos @MariaDB
MariaDB-server.x86_64 10.2.9-1.el7.centos @MariaDB
galera.x86_64 25.3.20-1.rhel7.el7.centos @MariaDB

Install development tools to compile spine (GCC, Make, openssl-devel, etc.)
Download spine source

Run ./configure. Completes normally (This time on spine 1.1.25. Same result on 1.1.24.

[root@probe cacti-spine-1.1.25]# ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-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... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gawk... (cached) gawk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 whether gcc understands -c and -o together... yes
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 whether ln -s works... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/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... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
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 dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
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... no
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 whether to enable -Wall... no
checking for help2man... /usr/bin/help2man
checking for help2man... /usr/bin/help2man
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
checking sys/capability.h usability... no
checking sys/capability.h presence... no
checking for sys/capability.h... no
checking whether we are using Linux Capabilities... no
checking if Net-SNMP needs crypto support... no
checking for snmp_timeout in -lnetsnmp... no
checking for the spine results buffer size... 1024 bytes
checking for the maximum simultaneous spine scripts... 20
checking for the maximum MySQL buffer size... 65536
checking whether we are using traditional popen... no
checking whether to verify net-snmp library vs header versions... no
checking for glibc gethostbyname_r... no
checking for Solaris/Irix gethostbyname_r... no
checking for HP-UX gethostbyname_r... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/config.h
config.status: config/config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
[root@probe cacti-spine-1.1.25]#

Run Make. This will errorout with the following statement
[root@probe cacti-spine-1.1.25]# make
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/mysql -g -O2 -L/usr/lib64 -lpthread -lssl -lm -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 -lmysqlclient -lcrypto -lz -lpthread -lm
libtool: link: gcc -I/usr/include/mysql -g -O2 -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 -L/usr/lib64 -lssl -lmysqlclient -lcrypto -lz -lpthread -lm
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make: *** [spine] Error 1
misterguitar
Posts: 14
Joined: Wed Jun 10, 2015 2:25 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by misterguitar »

I also opened a problem for this on the github. I'm going to try backreving the database and see if that helps. I also get the same problem when using the default version of Maridb that ships on Centos 7.
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by Pucho »

I think what you need to install is mariadb-libs.

If you do a yum provides *\mysqlclient\* It should tell.
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
adankert
Posts: 10
Joined: Wed Oct 04, 2017 6:11 am

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by adankert »

/usr/lib64

ln -s libmysqlclient.so.18.0.0 libmysqlclient.so

Seems to do the trick.
misterguitar
Posts: 14
Joined: Wed Jun 10, 2015 2:25 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by misterguitar »

I did have Mariadb-libs installed.

I was able to backrev mariadb to 10.1 and the problem went away. It appears whatever they fixed in 10.1 got broke again in 10.2. Or the fix never made its way to the newer code.
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by Pucho »

There was another thread for the same Issue

phalek wrote:I guess 10.2 doesn't ship that anymore ( see here ):

Code: Select all

libmysqlclient has been removed from the server. It has been replaced by MariaDB’s own Connector/C.
- See more at: https://mariadb.com/resources/blog/mariadb-102-beta#sthash.oEQ5t8c0.dpuf
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
misterguitar
Posts: 14
Joined: Wed Jun 10, 2015 2:25 pm

Re: Problems compiling Spine 1.1.24 on Centos 7

Post by misterguitar »

I read that thread. it said it was fixed in MariaDB 10.2.7. I was compiling with 10.2.9. So it appears it must have gotten broken again.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests