[bind10-dev] (was: failed build)

Jelte Jansen jelte at isc.org
Tue Jun 29 07:33:57 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/29/2010 03:36 AM, Jeremy C. Reed wrote:
> On Tue, 29 Jun 2010, BIND 10 Tests wrote:
> 
>> http://bind10.isc.org/~tester/builder//BIND10/20100629004001-Debian5Linux-i686/logs/build.out
>>
>> http://bind10.isc.org/~tester/builder//builder.html
> 
> 
> So in commit r2316, I did:
> "
> I noticed this because libcfgclient's tests only linked with cc/data.o
> but build using Sunstudio showed it used libcc's session also.
> So instead of just linking with cc/session.o (which does work),
> I chose to link with libcc -- and noticed it was not using libtool.
> "
> 

interesting. It only linked to data.o because the Session class here is provided
by fake_session.*. I'm a tiny bit surprised it even gets to the linker stage at
all, and I'm going to go ahead and guess that your segfault may have to do with
the linker picking the wrong one there (did that also happen before you changed
the makefile?).

> Testing on NetBSD with g++ and Solaris with sunstudio I never noticed.
> 
> But the build error above on Debian Linux with g++ is:
> 
> ../../../../src/lib/cc/.libs/libcc.so: undefined reference to 
> `pthread_key_create'
> ../../../../src/lib/cc/.libs/libcc.so: undefined reference to 
> `pthread_key_delete'
> collect2: ld returned 1 exit status
> make[5]: *** [run_unittests] Error 1
> 
> 
> I will revert this run_unittests_LDADD += 
> $(top_builddir)/src/lib/cc/libcc.la change but first want to see if 
> anyone knows of the correct fix for this.

linking to the 'raw' version also works (.libs/libcc.a), so apparently libtool
is dropping things in here. We had the same problems with boost and asio, so
there is, as Nathanael already noticed, the workaround is available because of
that one;

Index: Makefile.am
===================================================================
- --- Makefile.am	(revision 2321)
+++ Makefile.am	(working copy)
@@ -18,6 +18,7 @@

 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
+run_unittests_LDFLAGS += $(PTHREAD_LDFLAGS)
 run_unittests_LDADD =  $(GTEST_LDADD)
 run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
 run_unittests_LDADD += libfake_session.la

But, and especially regarding the segfault you saw, perhaps we need another way
to replace a class for this specific test (or revert to linking to only data.o)

Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwpoeUACgkQ4nZCKsdOncXGqwCeNzF3dzyrrVoKBHCi5e1+BsMp
1RMAoLqwWCaoyLGwdDp9Sh2q3WkubFlc
=TFWc
-----END PGP SIGNATURE-----



More information about the bind10-dev mailing list