"make bin/smbtorture4" fails on FreeBSD 9

Stefan (metze) Metzmacher metze at samba.org
Tue May 15 05:09:03 MDT 2012


Hi Volker,

> From the autoconf based build within source3 I am trying to
> build smbtorture4. This fails with:
> 
> [root at freebsdvl ~/git/s3/source3]# make bin/smbtorture4
> make -f Makefile-smbtorture4 bin/smbtorture4
> Waf: Entering directory root/git/s3/bin'
>         Selected embedded Heimdal build
> 'reconfigure' finished successfully (6.551s)
> cd .. && WAF_MAKE=1 buildtools/bin/waf --targets=smbtorture
>         Selected embedded Heimdal build
> Waf: Entering directory root/git/s3/bin'
>         Selected embedded Heimdal build
> [ 125/3551] Generating VERSION
> [ 161/3551] Generating smbd/build_options.c
> [3275/3551] Linking default/lib/ccan/libccan.so
> default/lib/ccan/failtest/failtest_1.o: In function et_backtrace':
> /root/git/s3/bin/../lib/ccan/failtest/failtest.c:144:
> undefined reference to `backtrace'
> Waf: Leaving directory root/git/s3/bin'
> Build failed:  -> task failed (err #1): 
>         {task: cc_link
> failtest_1.o,hash_1.o,htable_1.o,ilog_1.o,likely_1.o,list_1.o,read_write_all_1.o,debug_1.o,str_1.o,tally_1.o,time_1.o
> -> libccan.so}
> *** Error code 1
> 
> Stop in /root/git/s3/source3.
> *** Error code 1
> 
> Stop in /root/git/s3/source3.
> 
> How can I approach this?

1. looking at lib/ccan/failtest/failtest.c shows that 'backtrace()' is
only used with this:

   #if HAVE_BACKTRACE
   #include <execinfo.h>
   ...

   That means we are likely to have configure tests.

2. searching for configure tests

   metze at SERNOX11:~/devel/samba/3.X/master3$ git grep 'backtrace' | grep
wscript
   lib/util/wscript_configure:# backtrace could be in libexecinfo or in libc
   lib/util/wscript_configure:conf.CHECK_FUNCS_IN('backtrace
backtrace_symbols', 'execinfo', checklibc=True, headers='execinfo.h')

   metze at SERNOX11:~/devel/samba/3.X/master3$ git grep 'backtrace' | grep
configure
   lib/util/wscript_configure:# backtrace could be in libexecinfo or in libc
   lib/util/wscript_configure:conf.CHECK_FUNCS_IN('backtrace
backtrace_symbols', 'execinfo', checklibc=True, headers='execinfo.h')
   source3/configure.in:# libexecinfo provides backtrace_symbols on FreeBSD
   source3/configure.in:AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
   source3/configure.in:AC_CHECK_FUNCS(backtrace_symbols)

3. It's likely that there's a missing dependency to 'execinfo' in the
waf build

   metze at SERNOX11:~/devel/samba/3.X/master3$ find lib/ccan/ -name 'wscript*'
   lib/ccan/wscript

4. the 'build' section in 'lib/ccan/wscript' looks like this:

   def build(bld):
       bld.SAMBA_LIBRARY('ccan',
                      vnum="0.1-init-1161-g661d41f",
                      source=bld.path.ant_glob('*/*.c'),
                      private_library=True)

There's no dependency to 'execinfo'.

I've pushed the following commit to autobuild:

https://gitweb.samba.org/?p=metze/samba-autobuild/.git;a=commitdiff;h=e6879ff0c16b2c63525813aeee8e66ec53b43977

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120515/7cbe980b/attachment.pgp>


More information about the samba-technical mailing list