Opened 8 years ago

Closed 8 years ago

#1442 closed defect (fixed)

build issue(s) on Ubuntu Oneiric (gcc-4.6 and gtest specifically)

Reported by: jelte Owned by: jelte
Priority: high Milestone: Sprint-20111220
Component: build system Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket: none
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

There are some build issues on Ubuntu 11.10 (Oneiric Ocelot);

The first symptom is that it complains about not being able to find the Botan library, but the problem is slightly deeper; it appears that gcc has gotten much more strict about the order in which libraries to link against are used.

So after the configure test for botan is fixed it would fail on log4cplus, and after that it would fail on a few internal LDADD order issues.

Additionally; the libgtest-dev package for Ubuntu includes neither a gtest-config script nor a pkg-config hints file, and it is compiled with -pthread, so we need to add a check for that too.

Subtickets

Change History (16)

comment:1 Changed 8 years ago by jelte

Note, this has been reported on the users list: https://lists.isc.org/pipermail/bind10-users/2011-November/000104.html

comment:2 Changed 8 years ago by jelte

Note2, part of this has been reported earlier, see #994. If this gets fixed here, we can probably close that one.

comment:3 Changed 8 years ago by jelte

  • Owner changed from jelte to UnAssigned
  • Status changed from new to reviewing

Okay, cleaned up a little bit. It is currently going through the buildbots, but assuming that goes ok, it is ready for review.

comment:4 Changed 8 years ago by jelte

  • Owner changed from UnAssigned to jelte
  • Status changed from reviewing to accepted

pulling out of review for a bit, failing on too many systems

comment:5 Changed 8 years ago by shane

  • Feature Depending on Ticket set to none

comment:6 follow-up: Changed 8 years ago by jelte

  • Owner changed from jelte to UnAssigned
  • Status changed from accepted to reviewing

Okay, also actually split up the -L and -l flags as returned by 1 string from botan-config into LDFLAGS and LIBS respectively, and played with the order a bit (on one system we have an old botan it ended up linking to for tests because it is in the same prefix as gtest)

Ready for review, again.

Note; some of these configure checks are getting long and extensive, should we spend some cycles refactoring these into some general autoconf functions?

comment:7 Changed 8 years ago by kevin_tes

  • Owner changed from UnAssigned to kevin_tes

comment:8 Changed 8 years ago by kevin_tes

The codes seems ok to me.
But in my master branch, the make check works well,
in the trac1442 branch it throws some errors:
make check-TESTS
make[7]: Entering directory `/home/xiejiagui/bind10/src/lib/datasrc/tests'
[==========] Running 111 tests from 9 test cases.
[----------] Global test environment set-up.
[----------] 3 tests from FactoryTest?
[ RUN ] FactoryTest?.sqlite3ClientBadConfig
/bin/bash: line 5: 11034 Segmentation fault (core dumped) ${dir}$tst
FAIL: run_unittests

when i debug the core file:
gdb -c core:
[Thread debugging using libthread_db enabled]
[==========] Running 111 tests from 9 test cases.
[----------] Global test environment set-up.
[----------] 3 tests from FactoryTest?
[ RUN ] FactoryTest?.sqlite3ClientBadConfig
[New Thread 0x7ffff3f7f700 (LWP 12347)]
[Thread 0x7ffff3f7f700 (LWP 12347) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff76e5625 in atomic_increment (this=0x7375e0, accessor=..., zone_name=..., rrclass=..., separate_rrs=false)

at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:66

66 );
(gdb) bt
#0 0x00007ffff76e5625 in atomic_increment (this=0x7375e0, accessor=..., zone_name=..., rrclass=..., separate_rrs=false)

at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:66

#1 boost::detail::sp_counted_base::add_ref_copy (this=0x7375e0, accessor=..., zone_name=..., rrclass=..., separate_rrs=false)

at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:133

#2 shared_count (this=0x7375e0, accessor=..., zone_name=..., rrclass=..., separate_rrs=false) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:228
#3 shared_ptr (this=0x7375e0, accessor=..., zone_name=..., rrclass=..., separate_rrs=false) at /usr/include/boost/smart_ptr/shared_ptr.hpp:169
#4 DatabaseIterator? (this=0x7375e0, accessor=..., zone_name=..., rrclass=..., separate_rrs=false) at database.cc:715
#5 0x00007ffff76e62b4 in isc::datasrc::DatabaseClient::getIterator (this=0x738ad0, name=..., separate_rrs=false) at database.cc:828
#6 0x00000000004afd39 in TestBody? (this=<value optimized out>) at factory_unittest.cc:90
#7 0x00007ffff7bc092a in testing::Test::Run() () from /usr/lib/libgtest.so.0
#8 0x00007ffff7bc0a28 in testing::internal::TestInfoImpl::Run() () from /usr/lib/libgtest.so.0
#9 0x00007ffff7bc0adb in testing::TestCase::Run() () from /usr/lib/libgtest.so.0
#10 0x00007ffff7bc4cfd in testing::internal::UnitTestImpl::RunAllTests?() () from /usr/lib/libgtest.so.0
#11 0x00000000004b5b38 in isc::util::unittests::run_all () at run_all.cc:87
#12 0x000000000040d3a2 in main (argc=1, argv=<value optimized out>) at run_unittests.cc:28

comment:9 in reply to: ↑ 6 Changed 8 years ago by kevin_tes

Replying to jelte:

Okay, also actually split up the -L and -l flags as returned by 1 string from botan-config into LDFLAGS and LIBS respectively, and played with the order a bit (on one system we have an old botan it ended up linking to for tests because it is in the same prefix as gtest)

Ready for review, again.

Note; some of these configure checks are getting long and extensive, should we spend some cycles refactoring these into some general autoconf functions?

I think it's good idea.

comment:10 Changed 8 years ago by kevin_tes

  • Owner changed from kevin_tes to jelte

comment:11 Changed 8 years ago by jelte

  • Owner changed from jelte to kevin_tes

I think this has been addressed in master, but only after I created this branch.

Could you checkout branch 'test_1442_merge' (which is this one as it would be branched into master) and see if your problem still occurs? (I suspect your issue has been fixed by the merge of 1292_2)

comment:12 Changed 8 years ago by kevin_tes

It seems ok to me. please merge.

comment:13 Changed 8 years ago by kevin_tes

  • Owner changed from kevin_tes to jelte

comment:14 Changed 8 years ago by jreed

I reviewed the diffs and discussed a little with Jelte via jabber. I suggested a few minor comment changes. It seems fine to me.

comment:15 Changed 8 years ago by jelte

just to have a record, these changes are:

  • add LDFLAGS to final overview
  • reword 'there is no gtest-config script'
  • add 'if it doesn't already to 'as a heuristics workaround' comment

ok, thanks, i'll address these now, but I will hold off merging until buildbot page settles down a bit :)

comment:16 Changed 8 years ago by jelte

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged, closing ticket

Note: See TracTickets for help on using tickets.