Skip to content

Testing Environment: Spine

Mark Brugnoli-Vinten edited this page Aug 24, 2018 · 5 revisions

Compiling and Installing Spine

In order to compile spine, you need to have development libraries and headers installed. This page is currently focused on the ubuntu OS method of compiling spine

Pre-Compile Library installation

Ubuntu

sudo apt install -y net-snmp* help2man libsnmp-dev make libtool autoconf 

You will also need to install the appropriate database libraries/headers. For MySQL this would be:

sudo apt install -y libmysqlclient-dev 

For MariaDB this would be:

sudo apt install -y libmariadb-dev-compat

CentOS 7

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

FreeBSD 11

pkg install unix2dos gcc autoconf automake libtool openssl-devel help2man net-snmp

Compiling

When all libraries have been installed, complete the bootstrap process:

./bootstrap

Once bootstrap successfully finishes it will display a message information you have to complete the process:

These instructions assume the default install location for spine
of /usr/local/spine.  If you choose to use another prefix, make
sure you update the commands as required for that new path.

To compile and install Spine using MySQL versions 5.5 or higher
please do the following:

./configure
make
make install
chown root:root /usr/local/spine/bin/spine
chmod +s /usr/local/spine/bin/spine

To compile and install Spine using MySQL versions previous to 5.5
please do the following:

./configure --with-reentrant
make
make install
chown root:root /usr/local/spine/bin/spine
chmod +s /usr/local/spine/bin/spine

Common Errors and Warnings

The following are a listing of various errors and how they might prevent spine from being compiled:

./bootstrap: 51: ./bootstrap: autoreconf: not found

This error is seen if the autoconf tool is not properly installed on the system. It should be one of the tools installed during the apt install command above.

configure.ac:83: error: possibly undefined macro: AC_PROG_LIBTOOL

This error is seen if the libtool library has not been installed. Again it should have been installed during the installations above.

configure: error: C compiler cannot create executables

This comes about because the appropriate libraries are not installed to allow development work under C++ so ensure that you have the correct libraries installed as per above.

configure: error: Cannot find MySQL headers. Use --with-mysql= to specify non-default path.

This comes about because the MySQL headers are not installed. This is part of the database packages which should have been installed during the installation above.

/bin/mkdir: cannot create directory '/usr/local/spine': Permission denied

This error usually means that you are attempting to run make install as a normal user. To rectify run the following:

sudo make install