FYI, this FTBFS is  only accidentally caused by GCC 6:

- the linker complains that tolower() is implemented in serveral object
files

- in /usr/include/ctype.h (line ~216) we find

__extern_inline int
__NTH (tolower (int __c))
{
  return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
}

- __extern_inline is defined as (/usr/include/x86_64-linux-gnu/sys/cdefs.h,
line 333)

#define __extern_inline extern __inline __attribute__ ((__gnu_inline__))

- this definition would NOT cause tolower() to be compiled into any object
files, but if we
  look at the preprocessed source4/heimdal/lib/roken/vis.c, we see that the
above lines
  from ctype.h come out as

extern __inline int
__attribute__ ((__nothrow__ , __leaf__)) tolower (int __c)
{
  return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
}

  i.e. " __attribute__ ((__gnu_inline__))" is missing

- the reason is that source4/heimdal/lib/roken/roken-common.h (line 275) has

#ifndef HAVE___ATTRIBUTE__
#define __attribute__(x)
#endif

  i.e. it #define's __attribute__ away and that is caused by
(source4/heimdal_build/roken.h, line 143):

#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
#ifndef HAVE___ATTRIBUTE__
#define HAVE___ATTRIBUTE__
#endif
#endif

- accidentally GCC 6 is still at 6.0, hence __GNUC_MINOR__=0, so
HAVE___ATTRIBUTE__ doesn't get #defined;
  it works with current GCC 5 in unstable as its version is 5.1.x

My guess is that the author of the above lines really meant "gcc since
3.1". Patch attached.

Cheers, Roderich
Index: samba-4.4.0+dfsg/source4/heimdal_build/roken.h
===================================================================
--- samba-4.4.0+dfsg.orig/source4/heimdal_build/roken.h	2016-04-06 12:21:10.225777970 +0200
+++ samba-4.4.0+dfsg/source4/heimdal_build/roken.h	2016-04-06 12:23:34.088035680 +0200
@@ -140,7 +140,7 @@
 #define HAVE_PIDFILE
 #endif
 
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+#if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )) || (__GNUC__ > 3)
 #ifndef HAVE___ATTRIBUTE__
 #define HAVE___ATTRIBUTE__
 #endif

Reply via email to