Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 629366 - dev-db/mariadb-10.1.26: compile fails with app-crypt/heimdal
Summary: dev-db/mariadb-10.1.26: compile fails with app-crypt/heimdal
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-30 10:25 UTC by Spooky Ghost
Modified: 2017-08-30 19:51 UTC (History)
0 users

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


Attachments
cmake patch which checks for -lkrb5 (heimdal-krb5.patch,2.34 KB, patch)
2017-08-30 10:25 UTC, Spooky Ghost
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Spooky Ghost 2017-08-30 10:25:56 UTC
Created attachment 491100 [details, diff]
cmake patch which checks for -lkrb5

dev-db/mariadb needs -lkrb5 when compiling the gssapi plugin against heimdal kerberos.  The attached patch works for me but may not really be the best approach to solving this issue.

In the build log for the failure:

...
-- Found GSSAPI: -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib64 -L/usr/lib64 -lgssapi
-- Looking for krb5_free_unparsed_name
-- Looking for krb5_free_unparsed_name - not found
...
CMakeFiles/auth_gssapi.dir/gssapi_server.cc.o: In function `plugin_init()':
gssapi_server.cc:(.text+0x212): undefined reference to `krb5_init_context'
gssapi_server.cc:(.text+0x24b): undefined reference to `krb5_free_keyblock'
gssapi_server.cc:(.text+0x25a): undefined reference to `krb5_xfree'
gssapi_server.cc:(.text+0x26e): undefined reference to `krb5_free_principal'
gssapi_server.cc:(.text+0x27d): undefined reference to `krb5_free_context'
gssapi_server.cc:(.text+0x2c9): undefined reference to `krb5_sname_to_principal'
gssapi_server.cc:(.text+0x2e1): undefined reference to `krb5_unparse_name'
gssapi_server.cc:(.text+0x367): undefined reference to `krb5_kt_read_service_key'
collect2: error: ld returned 1 exit status
make[2]: *** [plugin/auth_gssapi/CMakeFiles/auth_gssapi.dir/build.make:148: plugin/auth_gssapi/auth_gssapi.so] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-db/mariadb-10.1.26/work/mysql-abi_x86_64.amd64'
make[1]: *** [CMakeFiles/Makefile2:2494: plugin/auth_gssapi/CMakeFiles/auth_gssapi.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
...

In the build.log with the patch applied:

...
-- Found GSSAPI: -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib64 -L/usr/lib64 -lgssapi
-- Found KRB5: -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib64 -L/usr/lib64 -lkrb5
-- Looking for krb5_free_unparsed_name
-- Looking for krb5_free_unparsed_name - found
...

build succeeds.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2017-08-30 11:36:44 UTC
I think I need to apply https://gitweb.gentoo.org/proj/mysql-extras.git/tree/20025_all_mariadb-10.2.6-gssapi-detect.patch to 10.1 versions as well.  This works very well with 10.2.
Comment 2 Brian Evans (RETIRED) gentoo-dev 2017-08-30 12:26:52 UTC
Should be fixed in git.  Please test with new patch.
Comment 3 Spooky Ghost 2017-08-30 13:32:17 UTC
That update fixes it for me.  Thank you:)

# pwd; git log -n 1 -- .
/usr/portage/dev-db/mariadb
commit f566a37488f2f509d3ac89d098a76076270a6480
Author: Brian Evans <grknight@gentoo.org>
Date:   Wed Aug 30 08:25:13 2017 -0400

    dev-db/mariadb: Fix GSSAPI detection in 10.1.26 wrt bug 629366
    
    Package-Manager: Portage-2.3.8, Repoman-2.3.3