We went on this while building Debian packages... They're built with: --cache-file=./config.cache \ --with-fhs \ --enable-shared \ --enable-static \ --disable-pie \ --prefix=/usr \ --sysconfdir=/etc \ --libdir=/usr/lib/samba \ --with-privatedir=/etc/samba \ --with-piddir=/var/run/samba \ --localstatedir=/var \ --with-rootsbindir=/sbin \ --with-pammodulesdir=/lib/security \ --with-pam \ --with-syslog \ --with-utmp \ --with-readline \ --with-pam_smbpass \ --with-libsmbclient \ --with-winbind \ --with-shared-modules=idmap_rid,idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_tdb2 \ --with-automount \ --with-ldap \ --with-ads \ --without-smbmount \ --with-dnsupdate \ --without-libtdb \ --without-libnetapi \ --with-modulesdir=/usr/lib/samba \ --datarootdir=/usr/share \ --datadir=/usr/share/samba \ --with-swatdir=/usr/share/samba/swat \ --with-lockdir=/var/run/samba \ --with-statedir=/var/lib/samba \ --with-cachedir=/var/cache/samba \ --enable-external-libtalloc \ --without-libtalloc \ ....and the build system has talloc 2.0.0 installed We needed to use a small patch to fix the build system, first: Index: samba-deb.clean/source3/configure.in =================================================================== --- samba-deb.clean.orig/source3/configure.in +++ samba-deb.clean/source3/configure.in @@ -42,6 +42,8 @@ if test "x$enable_external_libtalloc" != xyes then m4_include(../lib/talloc/libtalloc.m4) +else + tallocdir=../lib/talloc fi Then the compilation is OK, but compiling the torture suite gives: Linking bin/talloctort ../lib/talloc/testsuite.o: In function `_test_talloc_free_in_destructor': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:1034: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_ref4': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:270: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:278: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:285: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:291: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:296: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_unlink1': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:320: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:336: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:341: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_loop': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:904: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:906: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:909: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_talloc_free_in_destructor': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:1057: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:1058: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:1059: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:1063: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:1065: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_realloc_child': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:601: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_misc': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:375: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:386: undefined reference to `talloc_free' ../lib/talloc/testsuite.o:/tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:402: more undefined references to `talloc_free' follow ../lib/talloc/testsuite.o: In function `test_misc': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:461: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:473: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:493: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_realloc': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:555: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_steal': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:661: undefined reference to `_talloc_steal' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:664: undefined reference to `_talloc_steal' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:669: undefined reference to `_talloc_steal' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:670: undefined reference to `_talloc_steal' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:674: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:675: undefined reference to `_talloc_steal' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:679: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:684: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:689: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_move': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:722: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_unref_reparent': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:768: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:772: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:780: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:781: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_free_parent_deny_child': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:938: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:943: undefined reference to `talloc_free' ../lib/talloc/testsuite.o:/tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:750: more undefined references to `talloc_free' follow ../lib/talloc/testsuite.o: In function `test_ref1': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:120: undefined reference to `_talloc_reference' ../lib/talloc/testsuite.o: In function `test_ref2': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:175: undefined reference to `_talloc_reference' ../lib/talloc/testsuite.o: In function `test_ref3': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:227: undefined reference to `_talloc_reference' ../lib/talloc/testsuite.o: In function `test_lifeless': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:867: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:868: undefined reference to `_talloc_reference' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:871: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:873: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:874: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:875: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_pool': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:1101: undefined reference to `talloc_free' ../lib/talloc/testsuite.o:/tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:1079: more undefined references to `talloc_free' follow ../lib/talloc/testsuite.o: In function `test_ref1': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:146: undefined reference to `_talloc_reference' ../lib/talloc/testsuite.o: In function `test_ref2': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:204: undefined reference to `talloc_free' /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:209: undefined reference to `talloc_free' ../lib/talloc/testsuite.o: In function `test_ref1': /tmp/buildd/samba-3.4.1/source3/../lib/talloc/testsuite.c:154: undefined reference to `talloc_free' collect2: ld returned 1 exit status make[1]: *** [bin/talloctort] Error 1 make[1]: Leaving directory `/tmp/buildd/samba-3.4.1/source3' make: *** [build-stamp] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 E: Failed autobuilding of package I: user script /var/cache/pbuilder/build/cow.30139/tmp/hooks/C10_launch_shell starting I: installing necessary tools to work in the damn chroot dpkg: warning: ignoring request to remove nvi which isn't installed.
Created attachment 4723 [details] Patch for v3-4 Can you please test if this fixes the problem. metze
With the patch, talloctort build is still attempted, apparently. See build.log
Created attachment 4725 [details] Build log (with patch applied)
Created attachment 4728 [details] Do not build talloctort if using an external talloc I believe that the previous patch didn't work because the everything target still depended on talloctort. This patch reworks Stefan's patch to remove this dependency as well when using an external talloc.
Correct, saw the same thing here wrt the 'everything' target and can confirm that the extra bit of patchy-patch will fix this.
Comment on attachment 4728 [details] Do not build talloctort if using an external talloc thanks, that looks good, Karolin, please push for master and v3-4
*** Bug 6721 has been marked as a duplicate of this bug. ***
Patch does not apply to master. Could you provide one for master also, please? Thanks a lot!
Just wondering, is this related to bug #6808 ?
This one is fixed in v3-4-test (d8c7a5aafe0c1), v3-5-test (bd70351b9) and master (23c7eccc27d). Thanks to Metze for verifying! Closing out bug report. Thanks!