[HACKERS] Building from git source on ubuntu with gssapi

2015-11-02 Thread Jeff Janes
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?

Cheers,

Jeff


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Building from git source on ubuntu with gssapi

2015-11-02 Thread Robbie Harwood
Jeff Janes  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).


signature.asc
Description: PGP signature


Re: [HACKERS] Building from git source on ubuntu with gssapi

2015-11-02 Thread Tom Lane
Jeff Janes  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.

Huh?  Platform-specific additions to -I and -L paths are quite common,
especially on platforms that don't have a policy of forcing installation
directly into /usr/include and /usr/lib whenever possible.

> Is there something we can and should do to make this compile directly
> out of git?

Don't think so.  It's up to the caller of configure to tell us where
to look, if there are places that aren't in the compiler's default
search paths.  If we tried to guess such paths, we'd end up destabilizing
about as many builds as we fixed.

regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers