debian9 64 compilation error
uname -a
Linux debian9-64-2 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
autoreconf -if && ./configure --enable-shell --with-pgsql --with-mysql --prefix=/home/wlodek/installed/git/
result:
Package:
Name: kea
Version: 1.4.0-git
Extended version: 1.4.0-git (git 3fc0d776ff2262cae0013de1ce4c776c54c32eba)
OS Family: Linux
Hooks directory: /home/wlodek/installed/git/lib/hooks
Premium hooks: yes
Included Hooks: forensic_log flex_id host_cmds subnet_cmds radius host_cache
C++ Compiler:
CXX: g++
CXX_VERSION: g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
CXX_STANDARD: 201402
DEFS: -DHAVE_CONFIG_H
CPPFLAGS: -DOS_LINUX -DBOOST_ASIO_HEADER_ONLY
CXXFLAGS: -g -O2
LDFLAGS: -lpthread
KEA_CXXFLAGS: -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC
Python:
PYTHON: /usr/bin/python3
PYTHON_VERSION: 3.5
Boost:
BOOST_VERSION: 1.62
BOOST_INCLUDES:
BOOST_LIBS: -lboost_system
OpenSSL:
CRYPTO_VERSION: OpenSSL 1.1.0f 25 May 2017
CRYPTO_CFLAGS:
CRYPTO_INCLUDES:
CRYPTO_LDFLAGS:
CRYPTO_LIBS: -lcrypto
Botan: no
Log4cplus:
LOG4CPLUS_VERSION: 1.1.2
LOG4CPLUS_INCLUDES: -I/usr/include
LOG4CPLUS_LIBS: -L/usr/lib -L/usr/lib64 -llog4cplus
Flex/bison:
FLEX: flex
BISON: bison -y
MySQL:
MYSQL_VERSION: 10.1.26
MYSQL_CPPFLAGS: -I/usr/include/mysql
MYSQL_LIBS: -L/usr/lib/x86_64-linux-gnu -lmariadbclient -lpthread -lz -lm -ldl
PostgreSQL:
PGSQL_VERSION: PostgreSQL 9.6.10
PGSQL_CPPFLAGS: -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -I/usr/include/postgresql -I/usr/include/postgresql/9.6/server
PGSQL_LIBS: -L/usr/lib/x86_64-linux-gnu -lpq
compilation error:
make[6]: Entering directory '/home/wlodek/kea/src/bin/agent'
CXXLD kea-ctrl-agent
../../../src/lib/process/.libs/libkea-process.so: undefined reference to `isc::db::DatabaseConnection::toElementDbAccessString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: error: ld returned 1 exit status
Makefile:666: recipe for target 'kea-ctrl-agent' failed
make[6]: *** [kea-ctrl-agent] Error 1
It looks like this change:
diff --git a/src/bin/agent/Makefile.am b/src/bin/agent/Makefile.am
index 31a2798d8..75059f357 100644
--- a/src/bin/agent/Makefile.am
+++ b/src/bin/agent/Makefile.am
@@ -83,6 +83,7 @@ kea_ctrl_agent_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
kea_ctrl_agent_LDADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
kea_ctrl_agent_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
kea_ctrl_agent_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
+kea_ctrl_agent_LDADD += $(top_builddir)/src/lib/database/libkea-database.la
kea_ctrl_agent_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
kea_ctrl_agent_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS)
fix issue