Re: Building from git source on ubuntu with gssapi - Mailing list pgsql-hackers

From Robbie Harwood
Subject Re: Building from git source on ubuntu with gssapi
Date
Msg-id jlgsi4n6c4y.fsf@thriss.redhat.com
Whole thread Raw
In response to Building from git source on ubuntu with gssapi  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:

> I can't ./configure --with-gssapi from git on ubuntu 14.04.3 because:
>
> configure: error: gssapi.h header file is required for GSSAPI
>
> If I download the distribution-specific 9.3 source with apt, I find
> their secret sauce to make it work:
>
> ./debian/rules:LDFLAGS+= -Wl,--as-needed -L/usr/lib/mit-krb5
> -L/usr/lib/$(DEB_HOST_MULTIARCH)/mit-krb5
>
> ./debian/rules:CFLAGS+= -fPIC -pie -I/usr/include/mit-krb5
>
>
> Usually the packagers' secret sauce is there to change the
> installation locations and defaults and such, not to allow it to
> configure and compile at all.  It makes it a bit hard to test new code
> if you can't compile it without a bunch of messing around.
>
> Is there something we can and should do to make this compile directly
> out of git?

The preferred way to check for - and handle - GSSAPI/krb5 is with
pkg-config.  So, for instance, on my system:

rharwood@thriss:~$ pkg-config --exists krb5-gssapi
rharwood@thriss:~$ echo $?
0
rharwood@thriss:~$ pkg-config --libs krb5-gssapi
-L/usr/lib/x86_64-linux-gnu/mit-krb5 -lgssapi_krb5
rharwood@thriss:~$ pkg-config --cflags krb5-gssapi
-isystem /usr/include/mit-krb5 -isystem /usr/include/mit-krb5

In the past, this was done using krb5-config, but this has become
increasingly difficult to continue to make work (and krb5-config is not
nice code to work with).

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: a raft of parallelism-related bug fixes
Next
From: Amit Kapila
Date:
Subject: Re: Request: pg_cancel_backend variant that handles 'idle in transaction' sessions