Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 853202 - sys-kernel/gentoo-kernel-5.18.5-r1 requires dev-util/pahole
Summary: sys-kernel/gentoo-kernel-5.18.5-r1 requires dev-util/pahole
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-20 14:39 UTC by Alexander Weber
Modified: 2022-06-23 09:32 UTC (History)
3 users (show)

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


Attachments
.config (config.gz,51.66 KB, application/gzip)
2022-06-23 06:48 UTC, Alexander Weber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Weber 2022-06-20 14:39:26 UTC
sys-kernel/gentoo-kernel does not build with latest version if dev-util/pahole is not installed.

Reproducible: Always

Steps to Reproduce:
1. emerge sys-kernel/gentoo-kernel
Actual Results:  
+ make -f /var/tmp/portage/sys-kernel/gentoo-kernel-5.18.5-r1/work/linux-5.18/scripts/Makefile.modpost MODPOST_VMLINUX=1
  scripts/mod/modpost    -o vmlinux.symvers vmlinux.o
+ info MODINFO modules.builtin.modinfo
+ printf '  %-7s %s\n' MODINFO modules.builtin.modinfo
  MODINFO modules.builtin.modinfo
+ x86_64-pc-linux-gnu-objcopy -j .modinfo -O binary vmlinux.o modules.builtin.modinfo
+ info GEN modules.builtin
+ printf '  %-7s %s\n' GEN modules.builtin
  GEN     modules.builtin
+ tr '\0' '\n'
+ sed -n 's/^[[:alnum:]:_]*\.file=//p'
+ tr ' ' '\n'
+ uniq
+ sed -e 's:^:kernel/:' -e 's/$/.ko/'
+ btf_vmlinux_bin_o=
+ is_enabled CONFIG_DEBUG_INFO_BTF
+ grep -q '^CONFIG_DEBUG_INFO_BTF=y' include/config/auto.conf
+ btf_vmlinux_bin_o=.btf.vmlinux.bin.o
+ gen_btf .tmp_vmlinux.btf .btf.vmlinux.bin.o
+ local pahole_ver
++ command -v pahole
+ '[' -x '' ']'
+ echo 'BTF: .tmp_vmlinux.btf: pahole (pahole) is not available'
BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
+ return 1
+ echo 'Failed to generate BTF for vmlinux'
Failed to generate BTF for vmlinux
+ echo 'Try to disable CONFIG_DEBUG_INFO_BTF'
Try to disable CONFIG_DEBUG_INFO_BTF
+ exit 1
make[1]: *** [/var/tmp/portage/sys-kernel/gentoo-kernel-5.18.5-r1/work/linux-5.18/Makefile:1158: vmlinux] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-kernel/gentoo-kernel-5.18.5-r1/work/build'
make: *** [Makefile:219: __sub-make] Error 2


Expected Results:  
successful build

after installing dev-util/pahole the build does fine.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-23 05:53:42 UTC
1. Your USE flags, please.
2. Are you using a custom .config?
3. Please attach your /var/tmp/portage/sys-kernel/gentoo-kernel-5.18.5-r1/work/build/.config
Comment 2 Alexander Weber 2022-06-23 06:48:32 UTC
Created attachment 786914 [details]
.config

.config file
Comment 3 Alexander Weber 2022-06-23 06:51:02 UTC
I use some config snippets in /etc/kernel/config.d/. The current configuration is attached

# emerge --info gentoo-kernel
Portage 3.0.30 (python 3.9.13-final-0, default/linux/amd64/17.1/desktop, gcc-11.3.0, glibc-2.34-r13, 5.18.5-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.18.5-gentoo-dist-x86_64-Intel-R-_Core-TM-_i5-10210U_CPU_@_1.60GHz-with-glibc2.34
KiB Mem:    32677752 total,  13843380 free
KiB Swap:    8387580 total,   8387580 free
Timestamp of repository gentoo: Thu, 23 Jun 2022 05:00:01 +0000
Head commit of repository gentoo: e6fa63e32cc33b26430dfcd01eec8cad219ab68a
[ .. some overlay timestamps ..]

sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.9.13::gentoo, 3.10.5::gentoo
dev-lang/rust:             1.60.0::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.61.4-r2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           14.0.4::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.4::gentoo
sys-devel/llvm:            14.0.4::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r13::gentoo
Repositories:

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

[ .. some overlays ..]

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
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="-O2 -march=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write n"
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_C[ONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live 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 -march=native -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j10"
PKGDIR="/var/cache/binpkgs"
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"
SHELL="/bin/bash"
USE="X a52 aac aacs acl acpi alsa amd64 avahi bdplus bluetooth bluray branding bzip2 cacert cairo cdda cddb cdr cli cover crypt css cups dbus dist-kernel dri dts dvd dvdr elogind encode exif fat ffmpeg flac fortran gamepad gdbm gif gimp git gpm gstreamer gtk gtk3 gui hddtemp heif hfs iconv icu ipv6 java jpeg jpeg2k lcms libglvnd libnotify libtirpc lm-sensors logrotate mad mdnsresponder-compat mms mng mp3 mp4 mpeg mtp multilib ncurses nls nptl ntfs oauth ocr ogg opencv openexr opengl openmp opus pam pango pcre pdf png policykit postscript ppds printsupport pulseaudio qt5 readline rtmp samba scanner sdl seccomp snmp spamassassin spell split-usr sqlite ssl startup-notification svg threads thunar tiff truetype udev udf udisks unicode upower usb v4l vaapi vdpau vorbis vulkan webp widevine wiimote wmf wxwidgets x264 x265 xattr xcb xfce xinerama xml xpmopenexr xrandr xv xvid xvmc zeroconf zlib" ABI_X86="64" ADA_TARGET="gnat_2020" 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 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en de ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AArch64" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_USER_TARGETS="aarch64" RUBY_TARGETS="ruby27" SANE_BACKENDS="hp net" USERLAND="GNU" VIDEO_CARDS="intel i965 iris amdgpu radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sys-kernel/gentoo-kernel-5.18.5-r1::gentoo was built with the following:
USE="-debug -hardened -initramfs -savedconfig -test" ABI_X86="(64)"
FEATURES="unmerge-logs fixlafiles parallel-fetch strict network-sandbox ebuild-locks binpkg-docompress userpriv preserve-libs usersandbox assume-digests binpkg-dostrip merge-sync unknown-features-warn news buildpkg-live ipc-sandbox xattr qa-unresolved-soname-deps pid-sandbox usersync config-protect-if-modified multilib-strict sandbox protect-owned userfetch unmerge-orphans sfperms binpkg-logs distlocks"
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-23 08:03:55 UTC
The ebuild deps are fine-tuned for the default config which doesn't enable CONFIG_DEBUG_INFO=y.  You either need to install the necessary deps manually or enable USE=debug -- but note that it may enable some options you currently don't have (I haven't checked).
Comment 5 Alexander Weber 2022-06-23 09:32:13 UTC
Did a deeper look into configurations.
CONFIG_DEBUG_INFO was enabled by DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT

I do not set this option, seems the option is coming from default config and is set if DEBUG_KERNEL is set.

In my kernel the DEBUG_KERNEL is enabled by EXPERT that I need for some options.

Solved the issue for me by setting DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=n into my config snippet.

Maybe it does sense to add the disabling DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT in default no-debug.config to avoid such issues?