help-gss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fail compile with cURL caused by headers


From: Simon Josefsson
Subject: Re: fail compile with cURL caused by headers
Date: Tue, 10 Nov 2009 08:33:30 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Marco Maggi <address@hidden> writes:

> "Simon Josefsson" wrote:
>>>   when compiling cURL version 7.19.6, it fails with:
>>>
>>> libtool: compile:  gcc -DHAVE_CONFIG_H -I../include -I../include -I../lib 
>>> -I../lib -I/usr/local/include >>-I/usr/local/include -I/usr/include/openssl 
>>> -I/usr/include -I/usr/local/include -O3 -march=i686 -mtune=i686 -g0 
>>> -Wno-system-headers -MT krb5.lo -MD -MP -MF .deps/krb5.Tpo -c krb5.c  -fPIC 
>>> -DPIC -o .libs/krb5.o
>>> In file included from /usr/local/include/gss.h:83,
>>>                  from urldata.h:130,
>>>                  from krb5.c:59:
>>> /usr/local/include/gss/api.h:92: error: redefinition of 'struct 
>>> gss_OID_desc_struct'
>>> /usr/local/include/gss/api.h:98: error: redefinition of 'struct 
>>> gss_OID_set_desc_struct'
>>> /usr/local/include/gss/api.h:104: error: redefinition of 'struct 
>>> gss_buffer_desc_struct'
>>> /usr/local/include/gss/api.h:110: error: redefinition of 'struct 
>>> gss_channel_bindings_struct'
>>
>> Don't include  both those header files, gss.h  is from GNU
>> GSS and gssapi/gssapi.h  is (probably) from Heimdal.  Both
>> provide a  GSS implementation, and if you  use both you'll
>> run into problems.  You should  be able to just remove the
>> gssapi/gssapi.h include if you want to use GNU GSS.
>
> Yes, that  is it.  The error  (which is still  there in cURL
> 7.19.7) is that, while "lib/urldata.h" has this block:
>
> #ifdef HAVE_GSSAPI
> # ifdef HAVE_GSSGNU
> #  include <gss.h>
> # elif defined HAVE_GSSMIT
> #  include <gssapi/gssapi.h>
> #  include <gssapi/gssapi_generic.h>
> # else
> #  include <gssapi.h>
> # endif
> #endif
>
> which  correctly handles mutual  exclusion of  header files,
> "lib/krb5.c" does:
>
> #ifdef HAVE_GSSMIT
> /* MIT style */
> #include <gssapi/gssapi.h>
> #include <gssapi/gssapi_generic.h>
> #include <gssapi/gssapi_krb5.h>
> #else
> /* Heimdal-style */
> #include <gssapi.h>
> #endif
>
> #include "urldata.h"

They should be synced.  Maybe the block could be moved to a separate
internal curl-gss.h header to avoid code duplication.

I'd be interested to hear about your experience with a GNU GSS enabled
curl, if you get something to work and what's not working.

Thanks,
/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]