default/source4/heimdal/lib/roken/vis_3.o: In function `tolower': /usr/include/ctype.h:216: multiple definition of `tolower' default/source4/heimdal/lib/roken/hex_3.o:/usr/include/ctype.h:216: first defined here default/source4/heimdal/lib/roken/vis_3.o: In function `toupper': /usr/include/ctype.h:222: multiple definition of `toupper' default/source4/heimdal/lib/roken/hex_3.o:/usr/include/ctype.h:222: first defined here collect2: error: ld returned 1 exit status default/source4/heimdal/lib/roken/vis_3.o: In function `tolower': /usr/include/ctype.h:216: multiple definition of `tolower' default/source4/heimdal/lib/roken/hex_3.o:/usr/include/ctype.h:216: first defined here default/source4/heimdal/lib/roken/vis_3.o: In function `toupper': /usr/include/ctype.h:222: multiple definition of `toupper' default/source4/heimdal/lib/roken/hex_3.o:/usr/include/ctype.h:222: first defined here default/source4/heimdal/lib/asn1/asn1parse_130.o: In function `tolower': /usr/include/ctype.h:216: multiple definition of `tolower' default/source4/heimdal/lib/roken/hex_3.o:/usr/include/ctype.h:216: first defined here default/source4/heimdal/lib/asn1/asn1parse_130.o: In function `toupper': /usr/include/ctype.h:222: multiple definition of `toupper' default/source4/heimdal/lib/roken/hex_3.o:/usr/include/ctype.h:222: first defined here default/source4/heimdal/lib/asn1/lex_130.o: In function `tolower': /usr/include/ctype.h:216: multiple definition of `tolower' default/source4/heimdal/lib/roken/hex_3.o:/usr/include/ctype.h:216: first defined here default/source4/heimdal/lib/asn1/lex_130.o: In function `toupper': /usr/include/ctype.h:222: multiple definition of `toupper' default/source4/heimdal/lib/roken/hex_3.o:/usr/include/ctype.h:222: first defined here collect2: error: ld returned 1 exit status Waf: Leaving directory `/builddir/build/BUILD/samba-4.4.0rc3/bin' Build failed: -> task failed (err #1): {task: cc_link base64_3.o,ct_3.o,hex_3.o,bswap_3.o,dumpdata_3.o,emalloc_3.o,ecalloc_3.o,getarg_3.o,get_window_size_3.o,getdtablesize_3.o,h_errno_3.o,issuid_3.o,net_read_3.o,net_write_3.o,parse_time_3.o,parse_units_3.o,vis_3.o,strlwr_3.o,strsep_copy_3.o,strsep_3.o,strupr_3.o,strpool_3.o,estrdup_3.o,erealloc_3.o,simple_exec_3.o,strcollect_3.o,rtbl_3.o,rand_3.o,cloexec_3.o,xfree_3.o,replace_3.o,closefrom_3.o,print_version_128.o,version_128.o,parse_132.o,lex_132.o,compile_et_132.o,replace_1.o -> compile_et} -> task failed (err #1): {task: cc_link base64_3.o,ct_3.o,hex_3.o,bswap_3.o,dumpdata_3.o,emalloc_3.o,ecalloc_3.o,getarg_3.o,get_window_size_3.o,getdtablesize_3.o,h_errno_3.o,issuid_3.o,net_read_3.o,net_write_3.o,parse_time_3.o,parse_units_3.o,vis_3.o,strlwr_3.o,strsep_copy_3.o,strsep_3.o,strupr_3.o,strpool_3.o,estrdup_3.o,erealloc_3.o,simple_exec_3.o,strcollect_3.o,rtbl_3.o,rand_3.o,cloexec_3.o,xfree_3.o,replace_3.o,closefrom_3.o,print_version_128.o,version_128.o,main_130.o,gen_130.o,gen_copy_130.o,gen_decode_130.o,gen_encode_130.o,gen_free_130.o,gen_glue_130.o,gen_length_130.o,gen_seq_130.o,gen_template_130.o,hash_130.o,symbol_130.o,asn1parse_130.o,lex_130.o,replace_1.o -> asn1_compile} Makefile:8: recipe for target 'all' failed
Same bug in debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812264
The Debian bug report has an explanation: the heimdal sources erroneously define __attribute__ away. This has also caused other build problems, leading to the 2 commits below: https://git.samba.org/?p=samba.git;a=commitdiff;h=1dc05386f20481596ee7360d6f4e628a16675d3f https://git.samba.org/?p=samba.git;a=commitdiff;h=1c796547f20fa3c7c2e93fd5ce6ee8453a2bb435
Created attachment 11970 [details] patch from master branch This was fixed in the master branch with the attached patch. I haven't yet tried it with 4.4, but it seems likely to apply.
You may also want some of commits 88be24c27..78f8a89bd Which replace tests like #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) mostly as a proxy check for __attribute__, and which fail with GCC 6.0.0 (as the pre-release builds are versioned). At least some of these caused build errors with -O3.
Can somebody take care of this bug in 4.4.x? Thanks
Created attachment 12251 [details] git-am fix for 4.4.next. Here is the patchset I think we need - cherry pick from master with BUG: ref added to the commit comments.
Comment on attachment 12251 [details] git-am fix for 4.4.next. The patch "git-am fix for 4.4.next" LGTM, though for released versions of GCC 6, I think only the first patch is necessary (as below). The other patches fix things for GCC pre-releases which have a zero in the minor version. The first 6.x release was 6.1. From 50cb2787bd6fb0bf8726a7cb3e4a58a44c708dab Mon Sep 17 00:00:00 2001 From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Date: Tue, 8 Mar 2016 10:23:09 +1300 Subject: [PATCH 1/8] configure: set HAVE___ATTRIBUTE__ for heimdal Without this, heimdal ends up defining __attribute__ away, causing gcc-6 compile errors with -Werror=return-type because it can't tell when functions have __attribute__((noreturn)). BUG: https://bugzilla.samba.org/show_bug.cgi?id=11750 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Mar 9 13:52:26 CET 2016 on sn-devel-144 (cherry picked from commit 1c796547f20fa3c7c2e93fd5ce6ee8453a2bb435) --- buildtools/wafsamba/wscript | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 586cc4b..8802e5a 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -402,6 +402,22 @@ def configure(conf): addmain=False, msg='Checking for library destructor support') + conf.CHECK_CODE(''' + void test_attribute(void) __attribute__ (()); + + void test_attribute(void) + { + return; + } + + int main(void) { + return 0; + } + ''', + 'HAVE___ATTRIBUTE__', + addmain=False, + msg='Checking for __attribute__') + if sys.platform.startswith('aix'): conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True) # Might not be needed if ALL_SOURCE is defined -- 2.8.0.rc3.226.g39d4020
Fixed in Samba 4.5.0rc1 with commits leading up to d64877541036c6b82aa0204671bfdae08936b529
Assigning to kseeger for 4.4
Pushed to autobuild-v4-4-test.
(In reply to Karolin Seeger from comment #10) Pushed to v4-4-test. Closing out bug report. Thanks!