Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jul 21, 2018 2:46 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Spine 1.1.37 configure error
PostPosted: Tue May 29, 2018 8:05 am 
Offline

Joined: Sun Jun 21, 2015 6:06 am
Posts: 7
!!! 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:
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:
## ----------- ##
## 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.


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Thu May 31, 2018 9:40 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1242
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 Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Fri Jun 01, 2018 5:29 am 
Offline

Joined: Sun Jun 21, 2015 6:06 am
Posts: 7
!!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.


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Fri Jun 01, 2018 7:57 am 
Offline

Joined: Wed Mar 01, 2017 2:34 pm
Posts: 45
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:
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 <[email protected]> - 1.1.36-1
- initial package



Create a rpm out of this by:

Code:
# 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


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Tue Jul 10, 2018 5:08 pm 
Offline

Joined: Tue Jul 10, 2018 5:02 pm
Posts: 3
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?


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Tue Jul 10, 2018 5:39 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1242
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 Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Wed Jul 11, 2018 2:07 am 
Offline

Joined: Tue Jul 10, 2018 5:02 pm
Posts: 3
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?


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Wed Jul 11, 2018 2:10 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1242
I'll do some investigation as I thought I had it on my development wiki but I can't seem to find it.

_________________
Cacti Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Wed Jul 11, 2018 2:58 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1242
I've added a section to my Wiki that may help:
https://github.com/netniV/cacti/wiki/Te ... ent:-Spine

_________________
Cacti Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Wed Jul 11, 2018 12:32 pm 
Offline

Joined: Tue Jul 10, 2018 5:02 pm
Posts: 3
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"


Top
 Profile  
 
 Post subject: Re: Spine 1.1.37 configure error
PostPosted: Thu Jul 12, 2018 2:50 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1242
Thanks, I already had the snmp-dev but I've added MariaDB to the notes too.

_________________
Cacti Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group