Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] nvidia-drivers fails to build
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
polq12
n00b
n00b


Joined: 30 Jun 2024
Posts: 6

PostPosted: Sun Jun 30, 2024 1:10 pm    Post subject: [SOLVED] nvidia-drivers fails to build Reply with quote

I updated my system today and with it came nvidia drivers 555 but it failed to compile. I got this:
Code:
* '/usr/src/linux/Module.symvers' was not found implying that the
 * linux-6.9.7polq12kerneltkg tree at that location has not been built.
 *
 * Please verify that this is the intended kernel version, then perform
 * a full build[1] (i.e. make && make modules_install && make install).
 *
 * Alternatively, consider a distribution kernel[2] that does not need
 * these manual steps (e.g. sys-kernel/gentoo-kernel or gentoo-kernel-bin).
 *
 * [1] https://wiki.gentoo.org/wiki/Kernel/Configuration#Build
 * [2] https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
 * ERROR: x11-drivers/nvidia-drivers-550.90.07::gentoo failed (compile phase):
 *   built kernel sources are required to build kernel modules
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3760:  Called linux-mod-r1_src_compile
 *   environment, line 2734:  Called _modules_sanity_kernelbuilt
 *   environment, line  811:  Called die
 * The specific snippet of code:
 *           die "built kernel sources are required to build kernel modules";
 *
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-550.90.07::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-550.90.07::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work'

>>> Failed to emerge x11-drivers/nvidia-drivers-550.90.07, Log file:
The file /usr/src/linux/Module.symvers exists. I uninstalled the current 550 drivers and tried to install 555 but it didn't help. Recompiled the kernel. Didn't help. Tried to install 550 drivers back and got the same thing. They were working before the update but now even 550 are not working. Updated the kernel from 6.9.6 to 6.9.7. Didn't help. I looked at this: https://forums.gentoo.org/viewtopic-t-1103978-start-0.html I have CONFIG_TRIM_UNUSED_KSYMS is not set.

output of `emerge --info '=x11-drivers/nvidia-drivers-550.90.07::gentoo'`:
Code:
Portage 3.0.65 (python 3.12.4-final-0, default/linux/amd64/23.0/desktop/systemd, gcc-14, glibc-2.39-r9, 6.9.7polq12kerneltkg x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.9.7polq12kerneltkg-x86_64-11th_Gen_Intel-R-_Core-TM-_i5-11320H_@_3.20GHz-with-glibc2.39
KiB Mem:    16175816 total,   9385852 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Sun, 30 Jun 2024 09:30:00 +0000
Head commit of repository gentoo: 9b7d7e801aac44095e206d6b5204ea043bf8b1b8
sh bash 5.2_p26-r5
ld GNU ld (Gentoo 2.42 p6) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r5::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.29.3::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.12.4_p1::gentoo, 3.13.0_beta3::gentoo
dev-lang/rust-bin:         1.79.0::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-apps/systemd:          256.1-r1::gentoo
sys-devel/binutils:        2.42-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           18.1.8::gentoo
sys-devel/gcc:             14.1.1_p20240622::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             18.1.8::gentoo
sys-devel/llvm:            18.1.8::gentoo
sys-kernel/linux-headers:  6.9::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r9::gentoo
Repositories:

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

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/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/sandbox.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
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-live config-protect-if-modified distlocks ebuild-locks 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 sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="rsync://ftp.vectranet.pl/gentoo/     http://ftp.vectranet.pl/gentoo/     ftp://ftp.vectranet.pl/gentoo/"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j8"
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"
RUSTFLAGS="-C target-cpu=native -C opt-level=3"
SHELL="/bin/bash"
USE="X aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cet crypt dbus dri encode exif flac gdbm gif gles2 gpm gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc mad mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf pipewire png policykit pulseaudio qt5 readline sdl seccomp sound spell ssl startup-notification svg systemd test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland wxwidgets x264 xattr xcb xft xml xv xvid xwayland zlib" ABI_X86="64" ADA_TARGET="gcc_12" 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="mmx mmxext sse sse2 aes avx avx2 avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vp2intersect avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi avx512vl f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="pl" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="18" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="intel nvidia" 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, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS

output of `emerge -pqv '=x11-drivers/nvidia-drivers-550.90.07::gentoo':
Code:
[ebuild  N    ] x11-drivers/nvidia-drivers-550.90.07  USE="X modules static-libs strip tools wayland -dist-kernel -kernel-open -modules-compress -modules-sign -persistenced -powerd" ABI_X86="(64) -32"

complete build log:
Code:
 * Package:    x11-drivers/nvidia-drivers-550.90.07:0/550
 * Repository: gentoo
 * Maintainer: ionen@gentoo.org soap@gentoo.org
 * USE:        X abi_x86_64 amd64 elibc_glibc kernel_linux modules static-libs strip tools wayland
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     6.9.7polq12kerneltkg
 * Checking for suitable kernel configuration options ...                                                                                                                                                    [ ok ]
 * Preparing x86_64-pc-linux-gnu toolchain for kernel modules (override with KERNEL_CHOST) ...
 * Toolchain picked for kernel modules (override with KERNEL_CC, _LD, ...): '/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-clang-18' '/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-clang++-18' '/usr/lib/llvm/18/bin/ld.lld' '/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-ar' '/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-nm' '/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-objcopy' '/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-objdump' '/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-readelf' '/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-strip'
>>> Unpacking source...
>>> Unpacking NVIDIA-Linux-x86_64-550.90.07.run to /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work
>>> Unpacking nvidia-installer-550.90.07.tar.bz2 to /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work
>>> Unpacking nvidia-modprobe-550.90.07.tar.bz2 to /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work
>>> Unpacking nvidia-persistenced-550.90.07.tar.bz2 to /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work
>>> Unpacking nvidia-settings-550.90.07.tar.bz2 to /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work
>>> Unpacking nvidia-xconfig-550.90.07.tar.bz2 to /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work
>>> Unpacking NVIDIA-kernel-module-source-550.90.07.tar.xz to /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work
>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work
>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work ...
 * Applying nvidia-modprobe-390.141-uvm-perms.patch ...                                                                                                                                                      [ ok ]
 * Applying nvidia-settings-530.30.02-desktop.patch ...                                                                                                                                                      [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work ...
 * '/usr/src/linux/Module.symvers' was not found implying that the
 * linux-6.9.7polq12kerneltkg tree at that location has not been built.
 *
 * Please verify that this is the intended kernel version, then perform
 * a full build[1] (i.e. make && make modules_install && make install).
 *
 * Alternatively, consider a distribution kernel[2] that does not need
 * these manual steps (e.g. sys-kernel/gentoo-kernel or gentoo-kernel-bin).
 *
 * [1] https://wiki.gentoo.org/wiki/Kernel/Configuration#Build
 * [2] https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
 * ERROR: x11-drivers/nvidia-drivers-550.90.07::gentoo failed (compile phase):
 *   built kernel sources are required to build kernel modules
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3760:  Called linux-mod-r1_src_compile
 *   environment, line 2734:  Called _modules_sanity_kernelbuilt
 *   environment, line  811:  Called die
 * The specific snippet of code:
 *           die "built kernel sources are required to build kernel modules";
 *
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-550.90.07::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-550.90.07::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-550.90.07/work'

The outputs of every command are identical for 555 and 550
How do i get it to compile?


Last edited by polq12 on Sun Jun 30, 2024 3:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2745

PostPosted: Sun Jun 30, 2024 1:16 pm    Post subject: Reply with quote

namei -m /usr/src/linux/Module.symvers? It may exist but not be readable if kernel was built with umask 077 rather than 022 or something.

Edit: If all good, output should look something like:
Code:
f: /usr/src/linux/Module.symvers
 drwxr-xr-x /
 drwxr-xr-x usr
 drwxr-xr-x src
 lrwxr-xr-x linux -> linux-6.9.7
   drwxr-xr-x linux-6.9.7
 -rw-r--r-- Module.symvers


Last edited by Ionen on Sun Jun 30, 2024 1:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
polq12
n00b
n00b


Joined: 30 Jun 2024
Posts: 6

PostPosted: Sun Jun 30, 2024 1:21 pm    Post subject: Reply with quote

I thought of that before so I did a chmod 777 and the output of ls -l /usr/src/linux/Module.symvers is
Code:
.rwxrwxrwx 791k polq12 30 cze 13:40 /usr/src/linux/Module.symvers

It didn't help.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2745

PostPosted: Sun Jun 30, 2024 1:22 pm    Post subject: Reply with quote

Please try namei -m (I edited the command shortly after posting) as it may reveal issue with leading directories.
Back to top
View user's profile Send private message
polq12
n00b
n00b


Joined: 30 Jun 2024
Posts: 6

PostPosted: Sun Jun 30, 2024 1:27 pm    Post subject: Reply with quote

Output of namei -m /usr/src/linux/Module.symvers:
Code:
f: /usr/src/linux/Module.symvers
 drwxr-xr-x /
 drwxr-xr-x usr
 drwxr-xr-x src
 lrwxr-xr-x linux -> /home/polq12/linux-tkg/linux-src-git/
   drwxr-xr-x /
   drwxr-xr-x home
   drwx--x--x polq12
   drwxr-xr-x linux-tkg
   drwxr-xr-x linux-src-git
 -rwxrwxrwx Module.symvers
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2745

PostPosted: Sun Jun 30, 2024 1:41 pm    Post subject: Reply with quote

Hm, don't see an issue there. All the ebuild does is a simple [[ -f ]] bash test, so it shouldn't fail unless there's something off with the file.

Maybe try this (will run as the portage user like the ebuild):
Code:
# su portage -s /bin/sh -c "file /usr/src/linux/Module.symvers" -
/usr/src/linux/Module.symvers: ASCII text
Back to top
View user's profile Send private message
polq12
n00b
n00b


Joined: 30 Jun 2024
Posts: 6

PostPosted: Sun Jun 30, 2024 1:58 pm    Post subject: Reply with quote

Output of su portage -s /bin/sh -c "file /usr/src/linux/Module.symvers" -
Code:
/usr/src/linux/Module.symvers: cannot open `/usr/src/linux/Module.symvers' (Permission denied)

So it's a permission issue. I also did su portage -s /bin/sh which got me to a shell. I did this:
Code:
sh-5.2$ cd /home
sh-5.2$ ls
lost+found  polq12
sh-5.2$ cd polq12
sh: cd: polq12: Brak dostępu
sh-5.2$
polq12 is my user.
So it doesn't have access to my home directory. How do I fix it? Do a chmod? It's weird thet it worked before and now the permissions changed.
Back to top
View user's profile Send private message
polq12
n00b
n00b


Joined: 30 Jun 2024
Posts: 6

PostPosted: Sun Jun 30, 2024 3:10 pm    Post subject: Reply with quote

Fixed it by running chmod 755 /home/polq12
Thank you for your help. I really appreciate that.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22001

PostPosted: Sun Jun 30, 2024 4:52 pm    Post subject: Reply with quote

Mode 711 should have been fine here. Do you have an LSM imposing additional restrictions?
Back to top
View user's profile Send private message
polq12
n00b
n00b


Joined: 30 Jun 2024
Posts: 6

PostPosted: Mon Jul 01, 2024 8:23 am    Post subject: Reply with quote

Hu wrote:
Mode 711 should have been fine here.
It was 711 before and I was getting permission denied.
Hu wrote:
Do you have an LSM imposing additional restrictions?
I don't. At least I didn't set one up manually
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum