Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955059 - x11-drivers/nvidia-drivers-570.144 fails to build
Summary: x11-drivers/nvidia-drivers-570.144 fails to build
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-28 21:06 UTC by Mamadou Babaei
Modified: 2025-04-28 21:35 UTC (History)
2 users (show)

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


Attachments
build.log.tar.xz (build.log.tar.xz,7.30 KB, application/x-xz)
2025-04-28 21:06 UTC, Mamadou Babaei
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mamadou Babaei 2025-04-28 21:06:15 UTC
Created attachment 926998 [details]
build.log.tar.xz

ia-drivers-570.144/work/kernel/nvidia/os-interface.c  
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-dmabuf.o] Error 1
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-nano-timer.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-acpi.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-cray.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-dma.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-i2c.o] Error 1
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-mmap.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-p2p.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-pat.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-procfs.o] Error 1
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-usermap.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-vtophys.o] Error 1
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/os-interface.o] Error 1
make[3]: *** [scripts/Makefile.build:229: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel/nvidia/nv-vm.o] Error 1
make[2]: *** [/usr/src/linux-stable/Makefile:1949: /var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-stable'
make: *** [Makefile:115: modules] Error 2
 * ERROR: x11-drivers/nvidia-drivers-570.144::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-570.144::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-570.144::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-570.144/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-570.144/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work/kernel'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-570.144/work'
Comment 1 Mamadou Babaei 2025-04-28 21:07:13 UTC
$ emerge -pqv '=x11-drivers/nvidia-drivers-570.144::gentoo'

[ebuild     U ] x11-drivers/nvidia-drivers-570.144 [570.133.07] USE="X modules static-libs strip tools wayland -dist-kernel -kernel-open -modules-compress -modules-sign -persistenced -powerd" ABI_X86="(64) -32" 

$ emerge --info '=x11-drivers/nvidia-drivers-570.144::gentoo'

Portage 3.0.68 (python 3.12.10-final-0, default/linux/amd64/23.0/desktop, gcc-14, glibc-2.41-r1, 6.12.23 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.12.23-x86_64-AMD_Ryzen_Threadripper_3960X_24-Core_Processor-with-glibc2.41
KiB Mem:   131772892 total, 126298068 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 28 Apr 2025 20:50:21 +0000
Head commit of repository gentoo: 7ab75b2ba110033112fd1c5040f79200582dbaa2

sh bash 5.2_p37
ld GNU ld (Gentoo 2.44 p1) 2.44.0
ccache version 4.11.2 [enabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r2::gentoo
dev-build/cmake:           3.31.7::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.2::gentoo
dev-lang/perl:             5.40.2::gentoo
dev-lang/python:           3.12.10::gentoo, 3.13.3::gentoo, 3.13.3-r100::gentoo
dev-lang/rust-bin:         1.85.1::gentoo, 1.86.0-r1::gentoo
dev-util/ccache:           4.11.2::gentoo
llvm-core/clang:           18.1.8-r6::gentoo, 20.1.3::gentoo
llvm-core/lld:             18.1.8::gentoo, 20.1.3::gentoo
llvm-core/llvm:            18.1.8-r6::gentoo, 19.1.7::gentoo, 20.1.3::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.62::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-devel/binutils:        2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20250419::gentoo, 15.1.0::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.14::gentoo (virtual/os-headers)
sys-libs/glibc:            2.41-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: 10
    volatile: False
    sync-git-verify-commit-signature: true

NuLL3rr0r
    location: /var/db/repos/local
    masters: gentoo
    priority: 50
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64 ~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 /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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=48 --keep-going --with-bdeps=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks export-pms-vars fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LEX="flex"
LINGUAS="en_US en fa_IR fa"
MAKEOPTS="-j49"
PKGDIR="/var/cache/portage/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/zsh"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus dri dts dvd dvdr elogind encode exif flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc lm-sensors mad mng mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qml qt5 qt6 readline sdl seccomp sound spell ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_14" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="joystick keyboard libinput mouse" KERNEL="linux" L10N="en-US en fa-IR fa" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="BPF NVPTX X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres17" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="arm aarch64 x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby32" VIDEO_CARDS="d3d12 nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto 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, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Ionen Wolkens gentoo-dev 2025-04-28 21:12:30 UTC
Sounds like your kernel sources are not properly built or something else is broken with them, this file should exist:

    /usr/src/linux/include/generated/autoconf.h

Try to make clean and rebuild them, or re-emerge if it's a distribution kernel.
Comment 3 Ionen Wolkens gentoo-dev 2025-04-28 21:19:54 UTC
(to clarify, nvidia-drivers needs fully built sources and not just a simple make modules_prepare)
Comment 4 Mamadou Babaei 2025-04-28 21:35:41 UTC
Thank you very much!

You're right something was wrong. I usually clone the kernel sources directly from kernel.org. So, I did:

$ git clean -dfx && git reset --hard && git checkout .

$ 

And rebuilt everything and the nvidia-drivers built just fine:

$ cd /usr/src/linux/ \
    && eclean-dist && eclean-pkg && eclean-kernel -n 4 \
    && rm -f initrd* || true \
    && CCACHE_DIR="/var/cache/ccache" PATH="/usr/lib/ccache/bin:${PATH}" make -j$(nproc) \
    && CCACHE_DIR="/var/cache/ccache" PATH="/usr/lib/ccache/bin:${PATH}" make modules_install \                                                                
    && CCACHE_DIR="/var/cache/ccache" PATH="/usr/lib/ccache/bin:${PATH}" make install \                                                                        
    && emerge --oneshot @module-rebuild \
    && /opt/bliss-initramfs/mkinitrd.py -k `git describe --tags | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/'` \
    && \cp -v initrd-`git describe --tags | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/'` /boot/initrd

Thank you again!