Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647366 - net-mail/dovecot-2.2.33.2-r2[kerberos] fails to build with =app-crypt/heimdal-7.5.0
Summary: net-mail/dovecot-2.2.33.2-r2[kerberos] fails to build with =app-crypt/heimda...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Eray Aslan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-12 03:48 UTC by Rafał Mużyło
Modified: 2020-09-12 08:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Mużyło 2018-02-12 03:48:29 UTC
It's an '-Wl,--as-needed' problem.
autoconf check calls 'krb5-config gssapi'.
'krb5-config gssapi krb5' would have worked.

The result is:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: ./.libs/libauth.a(mech-gssapi.o): undefined reference to symbol 'krb5_free_context@@HEIMDAL_KRB5_2.0'
Comment 1 Tomáš Mózes 2018-02-12 07:36:22 UTC
Please attach the full build.log and the output of $(emerge --info).
Comment 2 Rafał Mużyło 2018-02-12 08:54:17 UTC
Output of `krb5-config gssapi krb5 --libs` is `-Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib64 -L/usr/lib64 -lgssapi -lkrb5`.
Output of `krb5-config gssapi --libs` is `-Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib64 -L/usr/lib64 -lgssapi`.

With '-Wl,--as-needed' and krb5_free_context being used it's just obvious why it breaks in the second case and that's what the autoconf check uses.

As for a workaround, I've simply sed-ed configure script with such change (both for '--libs' and '--cflags', even though '--cflags' in both cases returns '') - didn't feel like it's worth adding full autoreconf for something such trivial.
Proper solution would be pinging the upstream to update that portion of configure.ac...well, actually in their repo on master they've restructured, so there it would be m4/want_gssapi.m4.

This is likely triggered by the cleanup done in heimdal's krb5-config done around the time of changing versioning scheme.
Comment 3 Eray Aslan gentoo-dev 2020-09-12 08:42:02 UTC
should be fixed with https://github.com/dovecot/core/commit/2d316e272fc2c97fc729ee221189271799884c78

Please reopen if this is still a problem.