Opened 4 years ago

Last modified 4 years ago

#4244 new defect

Can't compile Kea with g++4.9 on Ubuntu 15.10

Reported by: tomek Owned by:
Priority: medium Milestone: Outstanding Tasks
Component: build system Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


As a possible workaround for issues #4242 and #4243 (both related to gcc-5), I tried to compile Kea with g++-4.9, but that failed:

$autoreconf -i
$CXX=g++-4.9 ./configure --with-gtest-source=/home/thomson/devel/gtest-1.7.0 --with-dhcp-mysql --with-dhcp-pgsql
checking for log4cplus/logger.h... yes
checking for log4cplus library... no
configure: error: Needs log4cplus library

I did investigate this and it seems that:

$ g++-5 -o conftest -g -O2   -DOS_LINUX  conftest.cpp  -llog4cplus -pthread -ldl
thomson@billabong:~/devel/kea-P1/kea-1.0.0-beta2$ ldd conftest =>  (0x00007ffe9bbee000) => /usr/lib/ (0x00007fa0e53cc000) => /usr/lib/x86_64-linux-gnu/ (0x00007fa0e504a000) => /lib/x86_64-linux-gnu/ (0x00007fa0e4e32000) => /lib/x86_64-linux-gnu/ (0x00007fa0e4a68000) => /lib/x86_64-linux-gnu/ (0x00007fa0e484a000) => /lib/x86_64-linux-gnu/ (0x00007fa0e4541000)
	/lib64/ (0x0000558ff249d000)
thomson@billabong:~/devel/kea-P1/kea-1.0.0-beta2$ g++-4.9 -o conftest -g -O2   -DOS_LINUX  conftest.cpp  -llog4cplus -pthread -ldl
/tmp/ccYTtB9s.o: In function `main':
/home/thomson/devel/kea-P1/kea-1.0.0-beta2/conftest.cpp:7: undefined reference to `log4cplus::Logger::getInstance(std::string const&)'
collect2: error: ld returned 1 exit status

For some reason, gcc-4.9 is not able link with log4cplus. It can find the library, but can't find the symbol in it.

This ticket will become a low priority once #4242 and #4243 are addressed. But until that happens, using gcc-4.9 could become a viable workaround for those two mentioned.


Change History (1)

comment:1 Changed 4 years ago by tomek

  • Milestone changed from Kea-proposed to Outstanding Tasks

Moving all bugs to outstanding, we'll triage them with other defects.

Note: See TracTickets for help on using tickets.