Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634126 - app-crypt/mit-krb5-1.15.2: `krb5-config --libs` explicitly lists -L/usr/lib64 breaking 32bit builds
Summary: app-crypt/mit-krb5-1.15.2: `krb5-config --libs` explicitly lists -L/usr/lib64...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kerberos Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 733132
  Show dependency tree
 
Reported: 2017-10-12 20:20 UTC by Andrei Slavoiu
Modified: 2021-01-20 20:47 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,55.31 KB, text/x-log)
2017-10-12 20:20 UTC, Andrei Slavoiu
Details
config.log.xz (config.log.xz,26.60 KB, application/x-xz)
2017-10-12 20:23 UTC, Andrei Slavoiu
Details
emerge --info (emerge.info,8.25 KB, text/plain)
2017-10-12 20:26 UTC, Andrei Slavoiu
Details
mit-krb5-1.18.2-krb5-config.patch (mit-krb5-1.18.2-krb5-config.patch,409 bytes, patch)
2020-08-29 16:05 UTC, Conrad Kostecki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Slavoiu 2017-10-12 20:20:34 UTC
Created attachment 498462 [details]
build.log

# krb5-config --libs
-L/usr/lib64 -lkrb5 -lk5crypto -lcom_err

Because of this apps that build 32bit binaries linked to krb5 (for example samba) fail to build. I'll attach the logs from a failed net-fs/samba-4.7.0-r1 build.
Comment 1 Andrei Slavoiu 2017-10-12 20:23:25 UTC
Created attachment 498464 [details]
config.log.xz
Comment 2 Andrei Slavoiu 2017-10-12 20:26:07 UTC
Created attachment 498466 [details]
emerge --info
Comment 3 Matt Turner gentoo-dev 2019-07-10 05:25:24 UTC
You are right that krb5-config --libs prints -L/usr/lib64. That is because it is a symlink:

mattst88@p50-ethernet ~ % ls -lh /usr/bin/*krb5-config
-rwxr-xr-x 1 root root 6.6K Jun  5 20:27 /usr/bin/i686-pc-linux-gnu-krb5-config
lrwxrwxrwx 1 root root   31 Jun  5 20:27 /usr/bin/krb5-config -> x86_64-pc-linux-gnu-krb5-config
-rwxr-xr-x 1 root root 6.6K Jun  5 20:27 /usr/bin/x86_64-pc-linux-gnu-krb5-config
mattst88@p50-ethernet ~ % /usr/bin/x86_64-pc-linux-gnu-krb5-config --libs
-L/usr/lib64 -lkrb5 -lk5crypto -lcom_err
mattst88@p50-ethernet ~ % /usr/bin/i686-pc-linux-gnu-krb5-config --libs
-lkrb5 -lk5crypto -lcom_err


I can also confirm that samba detects "/usr/bin/krb5-config" in the configure stage as the binary to use:

> Checking for program 'krb5-config'                                                              : /usr/bin/krb5-config 

but I don't see that it is used after that (at least with samba-4.10.6, with USE="acl client cups pam system-mitkrb5 systemd winbind zeroconf"
Comment 4 Andrei Slavoiu 2019-07-23 23:41:25 UTC
I don't use samba anymore, but I just gave version 4.10.6 a try. Same error as before. I even tried with the exact same USE flags (except for systemd, as I use the standard profile). Are you sure you also have abi_x86_32 enabled? As, of course, there is no problem unless you try to build for 32 bits.
Comment 5 Conrad Kostecki gentoo-dev 2020-08-29 15:30:42 UTC
Yep, I have the same problem here. net-libs/neon does not build for me due '-L/usr/lib64' in the linker command line. Just found out, that this comes from app-crypt/mit-krb5.
Comment 6 Conrad Kostecki gentoo-dev 2020-08-29 15:33:06 UTC
Isn't that anyway wrong, that '/usr/lib64' is included and printed?
Comment 7 Conrad Kostecki gentoo-dev 2020-08-29 16:05:30 UTC
Created attachment 657380 [details, diff]
mit-krb5-1.18.2-krb5-config.patch

If I do remove the if block, which prints '-L/usr/lib64', I am able to compile neon. I also did run a test with net-fs/samba and had no problems with compiling.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-20 14:32:39 UTC
(In reply to Conrad Kostecki from comment #7)
> Created attachment 657380 [details, diff] [details, diff]
> mit-krb5-1.18.2-krb5-config.patch
> 
> If I do remove the if block, which prints '-L/usr/lib64', I am able to
> compile neon. I also did run a test with net-fs/samba and had no problems
> with compiling.

Please commit this.
Comment 9 Larry the Git Cow gentoo-dev 2021-01-20 20:47:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04bdab0f9da07f3c3242281135914029efe44caf

commit 04bdab0f9da07f3c3242281135914029efe44caf
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2021-01-20 20:30:20 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2021-01-20 20:47:22 +0000

    app-crypt/mit-krb5: don't hardcode libpath
    
    If libpath is hardcoded for 'krb5-config --libs' this will fail the
    compilation on 32-bit systems.
    
    Closes: https://bugs.gentoo.org/634126
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 .../files/mit-krb5-1.18.2-krb5-config.patch        |  15 ++
 app-crypt/mit-krb5/mit-krb5-1.18.2-r3.ebuild       | 169 +++++++++++++++++++++
 app-crypt/mit-krb5/mit-krb5-1.18.3-r1.ebuild       | 168 ++++++++++++++++++++
 3 files changed, 352 insertions(+)