Spine 1.1.37 configure error

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

Moderators: Developers, Moderators

mmandrino
Posts: 14
Joined: Sun Jun 21, 2015 6:06 am
Contact:

Spine 1.1.37 configure error

Post by mmandrino »

!!! WRONG FORUM - sorry, please move to Linux help!!

Hello

I tried to install new version -1.1.37 on new server, but after cacti install is complete cannot install spine.
OS: Centos 7.4.1708 - 3.10.0-862.2.3.el7.x86_64
Apache: 2.4.6
Cacti & Spine - 1.1.37
PHP: 5.4.16

when i run ./configure i get error:

Code: Select all

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/mmandrino/cacti-spine-1.1.37':
configure: error: C compiler cannot create executables
See `config.log' for more details
In config.log I found errors here:

Code: Select all

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2339: checking build system type
configure:2353: result: x86_64-pc-linux-gnu
configure:2373: checking host system type
configure:2386: result: x86_64-pc-linux-gnu
configure:2431: checking for a BSD-compatible install
configure:2499: result: /bin/install -c
configure:2510: checking whether build environment is sane
configure:2565: result: yes
configure:2716: checking for a thread-safe mkdir -p
configure:2755: result: /bin/mkdir -p
configure:2762: checking for gawk
configure:2778: found /bin/gawk
configure:2789: result: gawk
configure:2800: checking whether make sets $(MAKE)
configure:2822: result: yes
configure:2851: checking whether make supports nested variables
configure:2868: result: yes
configure:3067: checking for gawk
configure:3094: result: gawk
configure:3153: checking for gcc
configure:3169: found /bin/gcc
configure:3180: result: gcc
configure:3409: checking for C compiler version
configure:3418: gcc --version >&5
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3429: $? = 0
configure:3418: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
configure:3429: $? = 0
configure:3418: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3429: $? = 4
configure:3418: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3429: $? = 4
configure:3449: checking whether the C compiler works
configure:3471: gcc   -lpthread -lssl -lm  conftest.c  >&5
/bin/ld: cannot find -lssl
collect2: error: ld returned 1 exit status
configure:3475: $? = 1
configure:3513: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Spine Poller"
| #define PACKAGE_TARNAME "spine-poller"
| #define PACKAGE_VERSION "1.1.37"
| #define PACKAGE_STRING "Spine Poller 1.1.37"
| #define PACKAGE_BUGREPORT "http://www.cacti.net/issues.php"
| #define PACKAGE_URL ""
| #define PACKAGE "spine-poller"
| #define VERSION "1.1.37"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3518: error: in `/home/mmandrino/cacti-spine-1.1.37':
configure:3520: error: C compiler cannot create executables
See `config.log' for more details

I triead 1.1.38 spine but no luck.
I got 1.1.37 cacti via yum install so I tried spine of same version.

I see gcc error - but I am able to complie simple .c program and run it.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Spine 1.1.37 configure error

Post by netniV »

The compiler issue is normally because of a 32-bit/64-bit compiler issue. Make sure you have the correct bit version of your compiler installed. Also, make sure you have a compiler system installed at all, as sometimes you can have gcc but weirdly it's not the full build system.

Debian has a group package called build-essentails (I think). Other systems have similar things.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mmandrino
Posts: 14
Joined: Sun Jun 21, 2015 6:06 am
Contact:

Re: Spine 1.1.37 configure error

Post by mmandrino »

!!SOLVED!!

Thank you very much netniV

I added some devel packages I found installed on a working cacti server:

libdb-devel.x86 httpd-devel net-snmp-devel openssl-devel perl-devel rpm-devel

and it works, at least i get past the first problem - then the error was: Cannot find MySQL headers. To solve this one just install mariadb-devel.x86_64 package.

Thank you again netniV for pointing me in devel package direction.
tertius
Cacti User
Posts: 82
Joined: Wed Mar 01, 2017 2:34 pm

Re: Spine 1.1.37 configure error

Post by tertius »

In case you want to create a rpm package for spine, you can use a *.spec file like this:
(didn't find any on the web, so created one of my own. The BuildRequires should be complete, they pull a bunch of other packages as dependency)
It's made on/for CentOS 7.

Code: Select all

Name: cacti-spine
Version: 1.1.37
Release: 1%{?dist}
Summary: Data Collector for Cacti, an rrd based graphing tool
License: GPLv2+
URL: http://www.cacti.net/
Source0: http://www.cacti.net/downloads/spine/%{name}-%{version}.tar.gz

Requires: cacti
Requires: mariadb
Requires: rrdtool
Requires: net-snmp, net-snmp-utils
BuildRequires: mariadb-devel, net-snmp-devel, openssl-devel, help2man, libtool, dos2unix

%description
This is the Spine Data Collector for Cacti, an rrd based graphing tool

%prep
%setup -q

%build
./bootstrap
%configure
%make_build

%install
%make_install
%{__install} -d -m 0755 %{buildroot}/%{_sysconfdir}/cacti/
mv -f %{buildroot}/%{_sysconfdir}/spine.conf.dist %{buildroot}/%{_sysconfdir}/cacti/spine.conf


%files
%doc ChangeLog
%license LICENSE
%attr(0640,cacti,root) %config %{_sysconfdir}/cacti/spine.conf
%{_bindir}/*
%{_mandir}/man1/*

%changelog
* Mon Feb 26 2018 Alex Woick <alex@wombaz.de> - 1.1.36-1
- initial package

Create a rpm out of this by:

Code: Select all

# install build environment
sudo yum install rpmdevtools rpm-build yum-utils
# set up build environment
rpmdev-setuptree
# get *.spec file to correct location
cd ~/rpmbuild/SPECS
cp <downloadpath>/cacti-spine.spec .
# download source
spectool -g -R cacti-spine.spec
# install build-dependencies
yum-builddep cacti-spine.spec
# build rpm
rpmbuild -ba cacti-spine
ThomasH
Posts: 9
Joined: Tue Jul 10, 2018 5:02 pm

Re: Spine 1.1.37 configure error

Post by ThomasH »

Hello everyone.

I found this topic because I have a similar problem.
- System is Linux Mint 19
- Php 7.2.7-1
- Mariadb 10.3.8
- Apache2 2.4.33

And getting the same error "configure: error: Cannot find MySQL headers. Use --with-mysql= to specify non-default path." by configuring the compiler.

My system also doesn't have the mysql.h

Could you please support me to get this problem fixed?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Spine 1.1.37 configure error

Post by netniV »

You need to include the devel libraries which is explained in various documentation (including my wiki blow). It doesn't cover Mint itself but does show various other flavours and what to use.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
ThomasH
Posts: 9
Joined: Tue Jul 10, 2018 5:02 pm

Re: Spine 1.1.37 configure error

Post by ThomasH »

Thanks for your reply.
The devel-package is not usable for ubuntu derivates
https://pkgs.org/download/mariadb-devel

Could you please give me a hint what is the suitable developer package for ubuntu?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Spine 1.1.37 configure error

Post by netniV »

I'll do some investigation as I thought I had it on my development wiki but I can't seem to find it.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Spine 1.1.37 configure error

Post by netniV »

I've added a section to my Wiki that may help:
https://github.com/netniV/cacti/wiki/Te ... ent:-Spine
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
ThomasH
Posts: 9
Joined: Tue Jul 10, 2018 5:02 pm

Re: Spine 1.1.37 configure error

Post by ThomasH »

Thank you for your help and documentation.
I also got a solution by "apt-get install libmariadb-dev-compat"
And for snmp also "apt-get install libsnmp-dev"
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Spine 1.1.37 configure error

Post by netniV »

Thanks, I already had the snmp-dev but I've added MariaDB to the notes too.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
rmcdonald
Posts: 42
Joined: Wed Dec 22, 2010 4:03 pm
Location: Minnesota

Re: Spine 1.1.37 configure error

Post by rmcdonald »

so I know this is a new topic but I'm trying to migrate from 8.8b server to 1.1.38 server and am trying to install spine and am getting the following errors when installing spine 1.1.38

RHEL 7

:~/cacti-spine-1.1.38 $ make
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2 -L/usr/lib64 -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/net-snmp -I/usr/include/net-snmp/.. -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

I'm running mariaDB 10.3

and have verified all the spine requirements are installed.

sudo yum install automake libtool openssl-devel help2man mysql-devel net-snmp net-snmp-utils make net-snmp-libs net-snmp-agent-libs net-snmp-devel
Loaded plugins: langpacks, search-disabled-repos
Package automake-1.13.4-3.el7.noarch already installed and latest version
Package libtool-2.4.2-22.el7_3.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-12.el7.x86_64 already installed and latest version
Package help2man-1.41.1-3.el7.noarch already installed and latest version
Package MariaDB-devel-10.3.10-1.el7.centos.x86_64 already installed and latest version
Package 1:net-snmp-5.7.2-33.el7_5.2.x86_64 already installed and latest version
Package 1:net-snmp-utils-5.7.2-33.el7_5.2.x86_64 already installed and latest version
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Package 1:net-snmp-libs-5.7.2-33.el7_5.2.x86_64 already installed and latest version
Package 1:net-snmp-agent-libs-5.7.2-33.el7_5.2.x86_64 already installed and latest version
Package 1:net-snmp-devel-5.7.2-33.el7_5.2.x86_64 already installed and latest version
Nothing to do


Any suggestions?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Spine 1.1.37 configure error

Post by netniV »

It generally means that the mysql client libraries are not being found in your library path. Make sure that you have all the suggested packages from my wiki installed and see if you can locate the .so library.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
rmcdonald
Posts: 42
Joined: Wed Dec 22, 2010 4:03 pm
Location: Minnesota

Re: Spine 1.1.37 configure error

Post by rmcdonald »

How do I search for the .so library? I believe I did install all the dependicies in your wiki.

sudo yum install mysql-devel
Loaded plugins: langpacks, search-disabled-repos
Package MariaDB-devel-10.3.10-1.el7.centos.x86_64 already installed and latest version
Nothing to do

Am I missing something?
rmcdonald
Posts: 42
Joined: Wed Dec 22, 2010 4:03 pm
Location: Minnesota

Re: Spine 1.1.37 configure error

Post by rmcdonald »

Per usual I found the fix in another post
viewtopic.php?f=2&t=58015


Here is the fix

/usr/lib64

ln -s libmysqlclient.so.18.0.0 libmysqlclient.so
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests