[arch-dev-public] Buggy krb5-config script

Jan de Groot jan at jgc.homeip.net
Thu Jul 28 08:26:28 EDT 2011

This morning when Ionut was trying to update gtk3, he noticed that the
CUPS print backend would pull in libgcrypt, which is no longer needed,
as GnuTLS depends on nettle now instead of libgcrypt. This bug was
quickly resolved with a short patch from Fedora.

After fixing CUPS, we found out that CUPS would pull in a lot of other
libraries and weird CFLAGS in the cups-config output:

$ cups-config --libs
-lcups -march=x86-64 -mtune=generic -O2 -pipe -I/usr/include/dbus-1.0
-I/usr/lib/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE
-Wl,--hash-style=gnu -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto
-lcom_err -lkeyutils -lresolv -ldl -lz -lm -lcrypt

Notice the weird CFLAGS that are copied into the LDFLAGS now. These
flags don't come from CUPS, but from krb5:

CFLAGS=test krb5-config --libs
$ CFLAGS=test krb5-config --libs
test -Wl,--hash-style=gnu -Wl,--as-needed -lkrb5 -lk5crypto -lcom_err
-lkeyutils -lresolv -ldl

So it turns out krb5-config is plain wrong here. Fedora has a patch for

Another quite useful patch would be this:

I'm not sure about the whole library fixup things they're doing in the
first patch, but most important will be the first section of the part
that is applied to krb5-config.in.

OK to apply this? As krb5 is a dependency of quite some packages, this
would reduce lots of unneeded libs those packages.

More information about the arch-dev-public mailing list