genkernel --color --no-nconfig --save-config --config=/etc/kernels/kernel-config-x86_64-5.0.5 \ --kerneldir=/usr/src/linux-5.0.5 \ --keymap --lvm --dmraid --mdadm --btrfs --zfs all Will exaust: /usr/bin/genkernel: line 40: /defaults/software.sh: No such file or directory You can work around it by creating /default and linking software.sh to /usr/share/genkernel/defaults/software.sh. But this leads to the next "not found" file: /gen_funcs.sh. You can link this from /usr/share/genkernel/gen_funcs.sh. ... Or: just fix the missing part for all files not found: /usr/share/genkernel. It reveals GK_SHARE is undefined while needed by genkernel to find its files. Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.1/systemd, gcc-8.3.0, glibc-2.28-r5, 5.1.0-rc2 x86_64) ================================================================= System uname: Linux-5.1.0-rc2-x86_64-Intel-R-_Core-TM-_i3-2100_CPU_@_3.10GHz-with-gentoo-2.6 KiB Mem: 2015840 total, 323552 free KiB Swap: 4194300 total, 4189424 free Timestamp of repository gentoo: Tue, 02 Apr 2019 00:45:01 +0000 Head commit of repository gentoo: df515ffd776e0e543f5a2388c13d0a607966a5e1 sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.30 p5) 2.30.0 app-shells/bash: 4.4_p23-r1::gentoo dev-lang/perl: 5.26.2::gentoo dev-lang/python: 2.7.15::gentoo, 3.6.5::gentoo dev-util/cmake: 3.9.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.69-r4::gentoo sys-devel/automake: 1.16.1-r1::gentoo sys-devel/binutils: 2.30-r4::gentoo sys-devel/gcc: 8.3.0::gentoo sys-devel/gcc-config: 2.0::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.28-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: no sync-rsync-extra-opts: ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/gentoo/" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" 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="acl amd64 berkdb build bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 libtirpc mmx multilib ncurses nls nptl openmp pam pcmcia pcre png readline seccomp sse sse2 ssl systemd tcpd truetype udev unicode usb xattr zlib" ABI_X86="64" 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="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
/usr/share/genkernel/gen_funcs.sh: line 97: [: : integer expression expected
At line 97, at execution time, "$1" and "$LOGLEVEL" seem undefined.
It is not only GK_SHARE being undefined. In /etc/genkernel.conf: # Default share directory location GK_SHARE="${GK_SHARE:-/usr/share/genkernel}" But at the time reading this file GK_SHARE is already defined to be "". This way the default is never set ...! Next: # Location of DISTDIR, where our source tarballs are stored DISTDIR="${GK_SHARE}/distfiles" given the default it would expand to "/usr/share/genkernel/distfiles". Since GK_SHARE is "" it expands to "/distfiles". But shouldn't it expand to "/usr/portage/distfiles"? OK. Trying to set these to what might have been expected. Then: # LANG=C /usr/bin/genkernel --color --no-nconfig --save-config --config=/etc/kernels/kernel-config-x86_64-5.0.9 --kerneldir=/usr/src/linux-5.0.9 --keymap --lvm --dmraid --mdadm --btrfs --zfs all * Gentoo Linux Genkernel; Version 3.5.3.3 * Running with options: --color --no-nconfig --save-config --config=/etc/kernels/kernel-config-x86_64-5.0.9 --kerneldir=/usr/src/linux-5.0.9 --keymap --lvm --dmraid --mdadm --btrfs --zfs all * Using genkernel.conf from /etc/kernels/kernel-config-x86_64-5.0.9 * Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh .. * Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load .. /usr/share/genkernel/gen_funcs.sh: line 47: ${LOGFILE}: ambiguous redirect * Linux Kernel 5.0.9 for x86_64... /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect * .. with config file /etc/kernels/kernel-config-x86_64-5.0.9 /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect * kernel: Using config from /usr/src/linux-5.0.9/.config /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect * kernel: --mrproper is disabled; not running 'make mrproper'. /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect * kernel: --oldconfig is disabled; not running 'make oldconfig'. /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect * kernel: --clean is disabled; not running 'make clean'. /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_compile.sh: line 292: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 47: ${LOGFILE}: ambiguous redirect * ERROR: Failed to compile the "prepare" target... /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect * /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect * -- Grepping log... -- /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect * /usr/share/genkernel/gen_funcs.sh: line 142: ${LOGFILE}: ambiguous redirect /usr/share/genkernel/gen_funcs.sh: line 149: ${LOGFILE}: ambiguous redirect The last working version of genkernel reports "Gentoo Linux Genkernel; Version 69" all versions after this one are broken.
Closing as invalid. You don't provide minimum of required information like used version. We don't even know if you are using genkernel or genkernel-next. Like you have noticed, GK_SHARE is critical. It looks like something is really broken on your system. This is not a general problem or genkernel wouldn't work at all: In reply to Thomas from comment #3) > It is not only GK_SHARE being undefined. In /etc/genkernel.conf: > > # Default share directory location > GK_SHARE="${GK_SHARE:-/usr/share/genkernel}" > > But at the time reading this file GK_SHARE is already defined to be "". This > way the default is never set ...! Please explain. Latest released genkernel version has the following genkernel.conf: https://github.com/gentoo/genkernel/blob/v3.5.3.3/genkernel.conf Like you can see, GK_SHARE gets defined in line 222 and only there. Of course, if _you_ have set GK_SHARE already for some reason, config value will get ignored. That's a feature. Question is why is GK_SHARE set to ""...
1. It is not resolved. 2. It is not only GK_SHARE 3. It is with genkernel AND genkernel-next both show the same problems. emerge does not mention any missing packages. # emerge -cav genkernel # emerge -cav genkernel-next # emerge genkernel does not pull in anything else then genkernel or genkernel-next. All dependencies are resolved according to equery. Setting GK_SHARE to the path given leads to next error messages as to be found in Comment 3. Same for genkernel and genkernel-next. Comment 3 even gives you the version used: genkernel: 3.5.3.3 genkernel-next: 069 Seems you just did not read ...!
1) We only support sys-kernel/genkernel. If you have problems with sys-kernel/genkernel-next please file a bug against genkernel-next. 2) Sure, when something on your system is broken, it is not resolved _for you_ but it's not a general problem. 3) The fact that both genkernel and genkernel-next are failing that early with the same problem clearly indicate that something on your system is really broken. Please read comment 4 again and see the linked code: genkernel.conf will set GK_SHARE... This is not a problem in genkernel. For upcoming genkernel release I added > if [ -z "${GK_SHARE}" ] > then > small_die "GK_SHARE is not set!" > fi which tries to catch situations like that but the main question still is how you managed to get an invalid value GK_SHARE. There's really nothing we can do if GK_SHARE is not set/invalid. And the way we set GK_SHARE is straight forward -- unless your genkernel.conf file is empty (which would be a fatal error), I don't see a way how GK_SHARE can be missing/set to an invalid value. Please provide genkernel's build.log and /etc/genkernel.conf.
After searching around I found some slight change: --file -> --config --config -> kernel-config Now, after changing option names genkernel works again. This option change was never mentioned anywhere and got overseen after upgrading. # /bin/bash -x genkernel 2>&1 | less was helpful in seeing what was going on.
(In reply to Thomas from comment #7) > After searching around I found some slight change: > --file -> --config > --config -> kernel-config > > Now, after changing option names genkernel works again. This option change > was never mentioned anywhere and got overseen after upgrading. > > # /bin/bash -x genkernel 2>&1 | less > > was helpful in seeing what was going on. There was no such change, you were just doing it wrong.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=e86d05cef0026ac0c37b60eb03793f471410e584 commit e86d05cef0026ac0c37b60eb03793f471410e584 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-07-12 21:17:42 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-07-14 11:58:01 +0000 genkernel: Bail out when GK_SHARE is not defined Bug: https://bugs.gentoo.org/682568 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> genkernel | 5 +++++ 1 file changed, 5 insertions(+)