Thread: problems compiling CVS HEAD - LDAP auth and Kerberos

problems compiling CVS HEAD - LDAP auth and Kerberos

From
"Albe Laurenz"
Date:
I have tried the --with-ldap option since I also intend
to submit a patch that uses LDAP functionality.

Compiling src/interfaces/libpq/fe-auth.c on Linux I get

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -fno-strict-aliasing
-I../../../src/include -D_GNU_SOURCE  -I/usr/kerberos/include  -c -o
auth.o auth.c
auth.c:793:1: directives may not be used inside a macro argument
auth.c:792:56: unterminated argument list invoking macro "ereport"
auth.c: In function `CheckLDAPAuth':
auth.c:794: warning: implicit declaration of function `ereport'
auth.c:798: syntax error before ')' token

I use 3.2.3 20030502.

Another problem:

When I compile --with-krb5 on Windows 2000, I experience a mysterious
crash that I guess is related to my configuration and not a code error.

I link against krb5_32.dll (DLL version 1.3.5.0), and my executable
crashes,
with printfs I could find that it crashes WHILE returning from
pg_krb5_init() (in the error handling clause after
krb5_cc_get_principal),
which is called from pg_krb5_authname(). The stack trace is empty!

Can anybody give me a hint?
Is there something like a preferred set of library/header versions for
building CVS head?

Yours,
Laurenz Albe


Re: problems compiling CVS HEAD - LDAP auth and Kerberos

From
"Albe Laurenz"
Date:
> Compiling src/interfaces/libpq/fe-auth.c on Linux I get
[compiler error]

Sorry to follow myself up, but I was talking about
src/backend/libpq/auth.c

Yours,
Laurenz Albe


Re: problems compiling CVS HEAD - LDAP auth and Kerberos

From
Tom Lane
Date:
"Albe Laurenz" <all@adv.magwien.gv.at> writes:
> Compiling src/interfaces/libpq/fe-auth.c on Linux I get

> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -fno-strict-aliasing
> -I../../../src/include -D_GNU_SOURCE  -I/usr/kerberos/include  -c -o
> auth.o auth.c
> auth.c:793:1: directives may not be used inside a macro argument
> auth.c:792:56: unterminated argument list invoking macro "ereport"
> auth.c: In function `CheckLDAPAuth':
> auth.c:794: warning: implicit declaration of function `ereport'
> auth.c:798: syntax error before ')' token

Fixed, thanks for the report.

Anybody want to enable the LDAP code on any of the buildfarm machines?
This shoulda been noticed sooner.
        regards, tom lane


Re: problems compiling CVS HEAD - LDAP auth and Kerberos

From
"Magnus Hagander"
Date:
> > Compiling src/interfaces/libpq/fe-auth.c on Linux I get
>
> > gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> > -Wdeclaration-after-statement -fno-strict-aliasing
> > -I../../../src/include -D_GNU_SOURCE
> -I/usr/kerberos/include  -c -o
> > auth.o auth.c
> > auth.c:793:1: directives may not be used inside a macro argument
> > auth.c:792:56: unterminated argument list invoking macro "ereport"
> > auth.c: In function `CheckLDAPAuth':
> > auth.c:794: warning: implicit declaration of function `ereport'
> > auth.c:798: syntax error before ')' token
>
> Fixed, thanks for the report.

Thanks!


> Anybody want to enable the LDAP code on any of the buildfarm machines?
> This shoulda been noticed sooner.

I think Andrew has enabled it by default, but that will only affect
*new* clients and not existing ones. If I understood him right.

FYI, Snake has been running with ldap for a while, and it compiles fine
there, so it's definitly a compiler-dependent bug. (IIRC, it compiled
fine on my linux box (slack 10.2) when I tested it, as well) But yeah,
getting it on them all would have picked it up probably.

//Magnus


Re: problems compiling CVS HEAD - LDAP auth and Kerberos

From
Stefan Kaltenbrunner
Date:
Tom Lane wrote:
> "Albe Laurenz" <all@adv.magwien.gv.at> writes:
> 
>>Compiling src/interfaces/libpq/fe-auth.c on Linux I get
> 
> 
>>gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
>>-Wdeclaration-after-statement -fno-strict-aliasing
>>-I../../../src/include -D_GNU_SOURCE  -I/usr/kerberos/include  -c -o
>>auth.o auth.c
>>auth.c:793:1: directives may not be used inside a macro argument
>>auth.c:792:56: unterminated argument list invoking macro "ereport"
>>auth.c: In function `CheckLDAPAuth':
>>auth.c:794: warning: implicit declaration of function `ereport'
>>auth.c:798: syntax error before ')' token
> 
> 
> Fixed, thanks for the report.
> 
> Anybody want to enable the LDAP code on any of the buildfarm machines?
> This shoulda been noticed sooner.

added --with-ldap to lionfish and spoonbill

Stefan