broken build on debian while searching for popt.h

Matthias Dieter Wallnöfer mdw at samba.org
Tue Mar 15 14:52:49 MDT 2011


Jelmer, ekacnet, shouldn't we apply this change?
> diff --git a/testsuite/headers/test_headers.c 
> b/testsuite/headers/test_headers.c
> index c671d73..a36575f 100644
> --- a/testsuite/headers/test_headers.c
> +++ b/testsuite/headers/test_headers.c
> @@ -23,12 +23,12 @@
>
>  #define _GNU_SOURCE 1
>
> +#include <Python.h>
>  #include <stdio.h>
>  #include <unistd.h>
>  #include <stdlib.h>
>  #include <stdint.h>
>  #include <stdbool.h>
> -#include <Python.h>
>
>  /* pre-include some of the public headers to avoid ordering issues */
>  #include "core/ntstatus.h"

As far as I understand "Python.h" should always be the first include in 
order to avoid redefinitions.

Cheers,
Matthias


Jelmer Vernooij wrote:
> On Tue, 2011-03-15 at 20:30 +0300, Matthieu Patou wrote:
>    
>> Last days change on samba now produce this error while compiling on a
>> debian squeeze 6, when a checkout of the 13th of march worked well:
>>
>> [2266/2495] Compiling testsuite/headers/test_headers.c
>> In file included from /usr/include/python2.6/Python.h:8,
>> from ../testsuite/headers/test_headers.c:31:
>> /usr/include/python2.6/pyconfig.h:1031:1: warning: "_POSIX_C_SOURCE"
>> redefined
>> In file included from /usr/include/stdio.h:28,
>> from ../testsuite/headers/test_headers.c:26:
>> /usr/include/features.h:158:1: warning: this is the location of the
>> previous definition
>> In file included from /usr/include/python2.6/Python.h:8,
>> from ../testsuite/headers/test_headers.c:31:
>> /usr/include/python2.6/pyconfig.h:1040:1: warning: "_XOPEN_SOURCE" redefined
>> In file included from /usr/include/stdio.h:28,
>> from ../testsuite/headers/test_headers.c:26:
>> /usr/include/features.h:160:1: warning: this is the location of the
>> previous definition
>> In file included from default/testsuite/headers/test_headers.h:60,
>> from ../testsuite/headers/test_headers.c:37:
>> default/include/public/samba/popt.h:23:18: error: popt.h: No such file
>> or directory
>> In file included from default/testsuite/headers/test_headers.h:60,
>> from ../testsuite/headers/test_headers.c:37:
>> default/include/public/samba/popt.h:26: error: array type has incomplete
>> element type
>> default/include/public/samba/popt.h:27: error: array type has incomplete
>> element type
>> default/include/public/samba/popt.h:28: error: array type has incomplete
>> element type
>> default/include/public/samba/popt.h:29: error: array type has incomplete
>> element type
>> In file included from default/testsuite/headers/test_headers.h:63,
>> from ../testsuite/headers/test_headers.c:37:
>> default/include/public/security/access_check.h:66: warning: ‘struct
>> object_tree’ declared inside parameter list
>> default/include/public/security/access_check.h:66: warning: its scope is
>> only this definition or declaration, which is probably not what you want
>> default/include/public/security/access_check.h:72: warning: ‘struct
>> object_tree’ declared inside parameter list
>> Waf: Leaving directory `/usr/local/src/samba/bin'
>>
>>
>> installing libpopt-dev solves the problem, but as I understand we should
>> use the built-in version of libpopt when not told to do otherwise (or
>> when headers of this libs are not available).
>>      
> Did configure thing that popt was present? Can you paste the configure
> output ?
>
> Cheers,
>
> jelmer
>    



More information about the samba-technical mailing list