Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775251 - sys-kernel/genkernel-4.1.2-r3 fails to build initramfs with ssh support (dropbear.gkbuild src_compile() fails)
Summary: sys-kernel/genkernel-4.1.2-r3 fails to build initramfs with ssh support (drop...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2021-03-10 13:37 UTC by rjhwelsh
Modified: 2021-03-21 23:22 UTC (History)
0 users

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


Attachments
/var/log/genkernel.log (genkernel.log,120.59 KB, text/x-log)
2021-03-10 13:37 UTC, rjhwelsh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rjhwelsh 2021-03-10 13:37:15 UTC
Created attachment 690507 [details]
/var/log/genkernel.log

Hi,

I just started using genkernel for initramfs generation, and while I was experimenting with options adding ssh support I get an error. 
I think the failure is because ld cannot find the tomcrypt libraries (cannot find -ltomcrypt -ltommath); even though I do have dev-libs/libtomcrypt installed. This also might be related to https://bugs.gentoo.org/749957

Other info:

Downgrading to 4.0.10 and 3.5.3.3 did not help.
4.0.10 had the same issue.
3.5.3.3 had an issue with compiling busybox.




My command-line:

genkernel --makeopts=-j7  --kernel-config=/usr/src/linux/.config   --install --ssh initramfs




From /var/log/genkernel.log:

x86_64-pc-linux-gnu-gcc -L/var/tmp/genkernel/gk_V12QpwW0/dropbear/buildroot/usr/lib  -L/var/tmp/genkernel/gk_V12QpwW0/dropbear/buildroot/usr/lib -static -o dropbearmulti dbmulti.o atomicio.o bignum.o buffer.o chachapoly.o circbuffer.o cli-agentfwd.o cli-auth.o cli-authinteract.o cli-authpasswd.o cli-authpubkey.o cli-channel.o cli-chansession.o cli-kex.o cli-main.o cli-runopts.o cli-session.o cli-tcpfwd.o common-algo.o common-channel.o common-chansession.o common-kex.o common-runopts.o common-session.o compat.o crypto_desc.o curve25519.o dbhelpers.o dbmalloc.o dbrandom.o dbutil.o dh_groups.o dropbearconvert.o dropbearkey.o dss.o ecc.o ecdsa.o ed25519.o fake-rfc2553.o gcm.o gendss.o gened25519.o genrsa.o gensignkey.o keyimport.o list.o listener.o loginrec.o ltc_prng.o netio.o packet.o process-packet.o progressmeter.o queue.o rsa.o scp.o scpmisc.o signkey.o sshpty.o svr-agentfwd.o svr-auth.o svr-authpam.o svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-chansession.o svr-kex.o svr-main.o svr-runopts.o svr-service.o svr-session.o svr-tcpfwd.o svr-x11fwd.o tcp-accept.o termcodes.o -ltomcrypt -ltommath  -lutil -lz  -lcrypt
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ltomcrypt
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ltommath
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: svr-auth.o: in function `recv_msg_userauth_request':
svr-auth.c:(.text+0x4a0): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: svr-chansession.o: in function `execchild':
svr-chansession.c:(.text+0x6f8): warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: sshpty.o: in function `pty_setowner':
sshpty.c:(.text+0x2e0): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: common-session.o: in function `fill_passwd':
common-session.c:(.text+0xa14): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cli-kex.o: in function `recv_msg_kexdh_reply':
cli-kex.c:(.text+0x2ce): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: netio.o: in function `connect_remote':
netio.c:(.text+0x13b): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: common-session.o: in function `fill_passwd':
common-session.c:(.text+0xa6d): warning: Using 'getspnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
make: *** [Makefile:223: dropbearmulti] Error 1
* ERROR: Command 'nice -n10 make -j7 V=1 MULTI=1 PROGRAMS='dbclient dropbear dropbearkey dropbearconvert scp'' failed!

* ERROR: create_initramfs(): append_data(): append_dropbear(): populate_binpkg(): gkbuild(): Failed to create binpkg of dropbear-2020.80!




emerge --info output:

Portage 3.0.13 (python 3.8.7-final-0, default/linux/amd64/17.1/desktop, gcc-9.3.0, glibc-2.32-r6, 5.4.97-gentoo-FC.01 x86_64)
=================================================================
System uname: Linux-5.4.97-gentoo-FC.01-x86_64-Intel-R-_Core-TM-_i7-3632QM_CPU_@_2.20GHz-with-glibc2.2.5
KiB Mem:     7993496 total,    665724 free
KiB Swap:    8388604 total,   8374524 free
Head commit of repository bliss-overlay: 7e95a7c525faa9ab06e50b1d54291ac20f98bf55

Head commit of repository brother-overlay: bd7f27e3399297ff80dfa64ed57cf1054792b573

Timestamp of repository gentoo: Sat, 27 Feb 2021 12:30:01 +0000
Head commit of repository gentoo: 6cb2f794326a4cd3ff8429dc2c69500e8ba63281
sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 4.1 [disabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r6::gentoo, 3.6.12-r2::gentoo, 3.7.9-r2::gentoo, 3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/ccache:          4.1::gentoo
dev-util/cmake:           3.18.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r6::gentoo
Repositories:

bliss-overlay
    location: /var/lib/overlays/bliss-overlay
    sync-type: git
    sync-uri: https://github.com/fearedbliss/bliss-overlay.git
    masters: gentoo

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

akater
    location: /var/lib/layman/akater
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    masters: gentoo
    priority: 50

raiagent
    location: /var/lib/layman/raiagent
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

waebbl
    location: /var/lib/layman/waebbl
    masters: gentoo
    priority: 50

brother-overlay
    location: /usr/local/portage/brother-overlay
    sync-type: git
    sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 4000

localrepo
    location: /usr/local/portage
    masters: gentoo
    priority: 4999

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: 5000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=ivybridge -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=ivybridge -O2"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=1 --load-average=1 --with-bdeps=y --quiet-build=y --keep-going=y --autounmask --autounmask-keep-keywords=n --autounmask-write"
ENV_UNSET="CARGO_HOME 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 buildpkg 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://ftp.swin.edu.au/gentoo ftp://ftp.swin.edu.au/gentoo"
LANG="en_NZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_NZ"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
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="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cryptsetup cups curl dbus dhcpcd dri dts dvd dvdr elogind emacs emboss encode exif flac fortran gdal gdbm gif gpm gtk gui hdf5 i915 iconv icu intel ipv6 jpeg lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg mpi multilib ncurses netgen netifrc nfs nls notmuch nouveau nptl ogg opencascade opengl openmp openscad pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp smartcard spell split-usr ssh ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vhost-net vnc vorbis x264 xattr xcb xinerama xml xv xvid zeroconf zlib zsh-completion" 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="mmxext mmx sse sse2" 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 coreboot" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" QEMU_SOFTMMU_TARGETS="arm x86_64 i386 aarch64" QEMU_USER_TARGETS="x86_64 arm" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel i965 nouveau" 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, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2021-03-10 14:55:21 UTC
genkernel is picking up local libtom. 

It's already fixed in git, https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=012432aedd39bb26d6840af13a679eddc4a8fa9e
Comment 2 rjhwelsh 2021-03-11 06:29:08 UTC
(In reply to Thomas Deutschmann from comment #1)
> genkernel is picking up local libtom. 
> 
> It's already fixed in git,
> https://gitweb.gentoo.org/proj/genkernel.git/commit/
> ?id=012432aedd39bb26d6840af13a679eddc4a8fa9e

I confirm this fixes the issue for me. (sys-kernel/genkernel-9999)
Thank you.
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2021-03-21 23:22:12 UTC
Released with genkernel-4.2.0!