BIND 10 #1500: Huge amount of linker errors in datasource factory test

BIND 10 Development do-not-reply at isc.org
Fri Dec 9 14:31:01 UTC 2011


#1500: Huge amount of linker errors in datasource factory test
-------------------------------------+-------------------------------------
            Reporter:  vorner        |                        Owner:
                Type:  defect        |  UnAssigned
            Priority:  critical      |                       Status:  new
           Component:  build system  |                    Milestone:  New
           Sensitive:  0             |  Tasks
         Sub-Project:  DNS           |                     Keywords:
Estimated Difficulty:  0             |              Defect Severity:  N/A
         Total Hours:  0             |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 Lately, distcheck started to fail on me with an linker error on the
 datasource factory unit tests binary. It produced huge amount of complains
 of missing gtest symbols. After some examination, I found out the linker
 is called like this:

 {{{
 /bin/sh ../../../../libtool --tag=CXX --mode=link g++ -Wall -Wextra
 -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -Werror -fPIC -g
 -O2 -o run_unittests_factory run_unittests_factory-factory_unittest.o
 libtool: link: g++ -Wall -Wextra -Wwrite-strings -Woverloaded-virtual
 -Wno-sign-compare -Werror -fPIC -g -O2 -o run_unittests_factory
 run_unittests_factory-factory_unittest.o
 }}}

 Which is surprisingly short and doesn't contain any of the used libraries
 (including gtest).

 When I was looking what happened, I did a small experiment which solved
 it, but I'm not completely sure why. It's attached and and I'd like
 someone to at last look at it if it is otherwise harmless, if providing a
 reason wouldn't be possible. It actually switches the code to compile the
 binary inside of the if HAVE_GTEST condition (where it should probably be
 anyway, as without gtest, it shouldn't be possible to compile it).

 My wild guess would be that the common_ldadd variable didn't survive out
 of the conditional expression and became empty outside, so switching
 inside made it work. Also, the gtest library is installed in common prefix
 for me, so there's no -L needed for it, if it might be relevant.

-- 
Ticket URL: <http://bind10.isc.org/ticket/1500>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list