Bug 6742 - Fail to build torture suite when building against external talloc2
Fail to build torture suite when building against external talloc2
Status: RESOLVED FIXED
Product: Samba 3.4
Classification: Unclassified
Component: File services
3.4.1
Other Linux
: P3 normal
: ---
Assigned To: Stefan Metzmacher
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-17 16:23 UTC by Debian samba package maintainers (PUBLIC MAILING LIST)
Modified: 2009-12-08 02:56 UTC (History)
3 users (show)

See Also:


Attachments
Patch for v3-4 (2.34 KB, patch)
2009-09-20 12:19 UTC, Stefan Metzmacher
no flags Details
Build log (with patch applied) (319.31 KB, text/plain)
2009-09-21 13:54 UTC, Debian samba package maintainers (PUBLIC MAILING LIST)
no flags Details
Do not build talloctort if using an external talloc (2.35 KB, patch)
2009-09-21 18:39 UTC, Matt Kraai
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Debian samba package maintainers (PUBLIC MAILING LIST) 2009-09-17 16:23:33 UTC
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.
Comment 1 Stefan Metzmacher 2009-09-20 12:19:12 UTC
Created attachment 4723 [details]
Patch for v3-4

Can you please test if this fixes the problem.

metze
Comment 2 Debian samba package maintainers (PUBLIC MAILING LIST) 2009-09-21 13:54:13 UTC
With the patch, talloctort build is still attempted, apparently. See build.log

Comment 3 Debian samba package maintainers (PUBLIC MAILING LIST) 2009-09-21 13:54:55 UTC
Created attachment 4725 [details]
Build log (with patch applied)
Comment 4 Matt Kraai 2009-09-21 18:39:14 UTC
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.
Comment 5 Steve Langasek 2009-09-21 18:49:52 UTC
Correct, saw the same thing here wrt the 'everything' target and can confirm that the extra bit of patchy-patch will fix this.
Comment 6 Stefan Metzmacher 2009-09-23 21:18:17 UTC
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
Comment 7 Björn Jacke 2009-09-30 06:54:31 UTC
*** Bug 6721 has been marked as a duplicate of this bug. ***
Comment 8 Karolin Seeger 2009-10-16 08:47:18 UTC
Patch does not apply to master.
Could you provide one for master also, please?

Thanks a lot!
Comment 9 Guenther Deschner 2009-10-16 09:05:47 UTC
Just wondering, is this related to bug #6808 ?
Comment 10 Karolin Seeger 2009-12-08 02:56:22 UTC
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!