Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 729328 - dev-lang/mono-6.6.0.161 - ld: cannot find -lgssapi_krb5
Summary: dev-lang/mono-6.6.0.161 - ld: cannot find -lgssapi_krb5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-23 17:32 UTC by Jared B.
Modified: 2021-03-28 04:21 UTC (History)
0 users

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


Attachments
build.log (build.log,856.19 KB, text/plain)
2020-06-23 17:32 UTC, Jared B.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jared B. 2020-06-23 17:32:50 UTC
Created attachment 645860 [details]
build.log

Seems to fail with this message:
collect2: error: ld returned 1 exit status

Lots of warnings in the build log, but don't see an actual error until that point.  Having trouble finding the root cause.

Full build log attached.


# emerge --info dev-lang/mono                   
Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-9.3.0, glibc-2.30-r8, 5.6.15-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.6.15-gentoo-x86_64-AMD_Ryzen_9_3900X_12-Core_Processor-with-gentoo-2.6
KiB Mem:    32872260 total,  19038332 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Tue, 23 Jun 2020 13:30:01 +0000
Head commit of repository gentoo: 48d8cf183b05ac894acd5ad38dcc6152b7f95adc
Head commit of repository brother-overlay: 9ccba5d7c9fde9fdcb08e17695d25c3737089b71

Head commit of repository flatpak-overlay: 2bcc4b030ff8288683533a84f15777680c8c883e

Head commit of repository pentoo: 5e79e31499ea99afe271b72e4bfca16774758883

Head commit of repository torbrowser: 469b00e26548ede85818a0ccad1ae96f13d8ba71

sh bash 5.0_p17
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18::gentoo, 3.7.7-r2::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

local
    location: /home/user/data/dev/portage
    masters: gentoo
    priority: 0

brother-overlay
    location: /var/db/repos/overlay/brother-overlay
    sync-type: git
    sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 50

flatpak-overlay
    location: /var/db/repos/overlay/flatpak-overlay
    sync-type: git
    sync-uri: https://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

pentoo
    location: /var/db/repos/overlay/pentoo-overlay
    sync-type: git
    sync-uri: https://github.com/pentoo/pentoo-overlay.git
    masters: gentoo
    priority: 50

torbrowser
    location: /var/db/repos/overlay/torbrowser
    sync-type: git
    sync-uri: https://github.com/MeisterP/torbrowser-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/home/breland/data/files/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j22"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-7"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion berkdb branding bzip2 cairo caps cdda cddb cdr cli crypt cups curl dbus declarative dri dts dvd dvdr elogind emboss encode exif ffmpeg flac fortran gdbm gif iconv icu ipv6 joystick jpeg kde kipi kwallet lcms libnotify libtirpc lzma mad mmap mng mp3 mp4 mpeg multilib ncurses nls nptl ogg openal opengl openmp opus pam pango pcntl pcre phonon plasma png policykit ppds pulseaudio qml qt5 readline sdl seccomp smp spell split-usr ssl startup-notification svg taglib tcpd theora threads tiff truetype udev udisks unicode upower usb vaapi vdpau vim-syntax vorbis vpx widgets x264 xattr xcb xinerama xml xmp xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-US en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby25" SANE_BACKENDS="epson2 net" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jared B. 2020-06-23 19:23:39 UTC
Reviewed the logs again and noticed this:

/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgssapi_krb5

That kind of sticks out like a sore thumb.  Not sure how I missed it earlier.

I have the following library/header that seem to be related:

/usr/include/gssapi/gssapi_krb5.h
/usr/lib64/libgssapi_krb5.so

owned by mit-krb5.  Tried re-emerging that package, but still get the same error.  Guessing something else needs to be re-built, but I'm not sure what.

Based on that linker message, though, it looks like this is probably more of an issue with my particular system than the package itself.  If it's more appropriate to discuss this in the form, we can close this and I'll post there.  Otherwise, if anyone wants to help me finish running this down to confirm that's the case, would certainly appreciated it.
Comment 2 Jared B. 2020-06-23 22:16:25 UTC
According to the ld man page, -lnamespec "will search a directory for a library called libnamespec.so".  So, -lgssapi_krb5  will look for libgssapi_krb5.so, which exists in /usr/lib64.

I tried explicitly setting $LD_LIBRARY_PATH via env.d to include that path (which I know is overkill, just trying to rule everything I can find out):

# echo $LD_LIBRARY_PATH
/usr/lib64:/usr/local/lib

Still fails with the error on compilation, though.  Don't know why it won't see find the library.

I've pretty much hit a wall on this.  Hoping someone more knowledgeable can spot the issue.
Comment 3 Ionen Wolkens gentoo-dev 2020-06-25 18:37:04 UTC
I'm not familiar with this package or what is happening here but I'd like to point out that the ebuild doesn't have a dependency on app-crypt/mit-krb5 and seems there's configure automagic in-place to optionally use it.
Comment 4 Ionen Wolkens gentoo-dev 2020-06-25 20:54:12 UTC
Seems it was looking for 32bit library which is not enabled on mit-krb5.

Bug is still valid given ebuild should've been checking for this, summary should just be changed.

Forum thread for reference:
https://forums.gentoo.org/viewtopic-p-8474834.html
Comment 5 Jared B. 2020-06-25 22:38:09 UTC
So yeah, just to confirm the previous post, I had previously set ABI_X86="64 32" for mono (honestly don't even remember doing that), so it was trying to link against the 32-bit krb5 library.  Rebuilt mit-krb5 with 32-bit support, and now all is good.

Big thanks to Ionen for the pointer.

Would agree that the dependency should be handled more explicitly by the ebuild, as suggested.  Going to try to update the title to reference that instead of the build failure.
Comment 6 jospezial 2020-11-10 07:12:54 UTC
After removing wine.
depclean

!!! existing preserved libs:
>>> package: app-crypt/mit-krb5-1.18.2-r1
 *  - /usr/lib64/libkrb5.so.3
 *  - /usr/lib64/libkrb5.so.3.3
 *  - /usr/lib64/libgssapi_krb5.so.2
 *  - /usr/lib64/libgssapi_krb5.so.2.2
 *      used by /usr/lib64/libmono-native.so.0.0.0 (dev-lang/mono-6.10.0.104)
 *  - /usr/lib64/libk5crypto.so.3
 *  - /usr/lib64/libk5crypto.so.3.1
 *  - /usr/lib64/libkrb5support.so.0
 *  - /usr/lib64/libkrb5support.so.0.1
Comment 7 Larry the Git Cow gentoo-dev 2021-03-28 04:21:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f2ce176977618670a011966317ddfbd72409829

commit 3f2ce176977618670a011966317ddfbd72409829
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-03-28 03:45:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-03-28 04:21:05 +0000

    dev-lang/mono: add 6.12.0.122
    
    * Bumps to 6.12.0.122
    * Run cert-sync (regenerate certificate store) in pkg_postinst
    * Add (preliminary) check-reqs.eclass usage
    * Fix automagic dependencies on:
    ** app-crypt/mit-krb5
    ** sys-libs/zlib (fallback to bundled previously)
    
    Bug: https://bugs.gentoo.org/776667
    Bug: https://bugs.gentoo.org/719718
    Closes: https://bugs.gentoo.org/687892
    Closes: https://bugs.gentoo.org/729328
    Closes: https://bugs.gentoo.org/762265
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/mono/Manifest               |   1 +
 dev-lang/mono/mono-6.12.0.122.ebuild | 114 +++++++++++++++++++++++++++++++++++
 2 files changed, 115 insertions(+)