Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506216 - x11-drivers/nvidia-drivers-334.21 - make: *** /lib/modules/3.12.13-gentoo/build: Permission denied. Stop.
Summary: x11-drivers/nvidia-drivers-334.21 - make: *** /lib/modules/3.12.13-gentoo/bui...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Jeroen Roovers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-30 04:20 UTC by UX.MAN
Modified: 2019-01-16 10:43 UTC (History)
3 users (show)

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


Attachments
/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/temp/environment (environment,165.39 KB, text/plain)
2014-03-31 13:18 UTC, UX.MAN
Details

Note You need to log in before you can comment on or make changes to this bug.
Description UX.MAN 2014-03-30 04:20:12 UTC
x11-drivers/nvidia-drivers-334.21 fails to compile with the following error:


# emerge -v nvidia-drivers

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] x11-drivers/nvidia-drivers-334.21  USE="X acpi tools -multilib -pax_kernel -uvm" 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB


>>> Verifying ebuild manifests
>>> Running pre-merge checks for x11-drivers/nvidia-drivers-334.21
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.12.13-gentoo/build
 * Found sources for kernel version:
 *     3.12.13-gentoo
 * Checking for suitable kernel configuration options...                 [ ok ]

>>> Emerging (1 of 1) x11-drivers/nvidia-drivers-334.21
 * NVIDIA-Linux-x86_64-334.21.run SHA256 SHA512 WHIRLPOOL size ;-) ...   [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.12.13-gentoo/build
 * Found sources for kernel version:
 *     3.12.13-gentoo
>>> Unpacking source...
>>> Unpacking NVIDIA-Linux-x86_64-334.21.run to /var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work
>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work
>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work ...
 * Preparing nvidia module
make -j2 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' ARCH=x86_64 IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/3.12.13-gentoo/build CC=x86_64-pc-linux-gnu-gcc clean module 
NVIDIA: calling KBUILD...
/bin/sh: line 0: cd: /lib/modules/3.12.13-gentoo/build: Not a directory
make[1]: Entering directory `/usr/src/linux-3.12.13-gentoo'
make -C /lib/modules/3.12.13-gentoo/build \
KBUILD_SRC=/usr/src/linux-3.12.13-gentoo \
KBUILD_EXTMOD="/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work/kernel" -f /usr/src/linux-3.12.13-gentoo/Makefile \
modules
make: Entering an unknown directory
make: *** /lib/modules/3.12.13-gentoo/build: Permission denied.  Stop.
make: Leaving an unknown directory
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/linux-3.12.13-gentoo'
NVIDIA: left KBUILD.
 nvidia.ko failed to build!
make: *** [nvidia.ko] Error 1
 * ERROR: x11-drivers/nvidia-drivers-334.21::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-334.21::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-334.21::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work/kernel'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work/'

>>> Failed to emerge x11-drivers/nvidia-drivers-334.21, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/temp/build.log'

 * Messages for package x11-drivers/nvidia-drivers-334.21:

 * ERROR: x11-drivers/nvidia-drivers-334.21::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-334.21::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-334.21::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work/kernel'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/work/'











-------------------------------------------------------------------------------


# emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9500_@_2.60GHz-with-gentoo-2.2
KiB Mem:     2049764 total,     46392 free
KiB Swap:    4194300 total,   4194272 free
Timestamp of tree: Wed, 26 Mar 2014 15:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.localhost.net.ar/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.br.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mmx mng modules mp3 mp4 mpeg nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline samba sdl session socialweb spell sse sse2 ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="synaptics evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Jeroen Roovers gentoo-dev 2014-03-30 14:15:37 UTC
(In reply to UX.MAN from comment #0)
>  * The ebuild environment file is located at
> '/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/temp/environment'.

Please attach that file to this bug report.
Comment 2 UX.MAN 2014-03-31 13:18:11 UTC
Created attachment 373966 [details]
/var/tmp/portage/x11-drivers/nvidia-drivers-334.21/temp/environment
Comment 3 Jeroen Roovers gentoo-dev 2014-03-31 14:04:48 UTC
Looks like a duplicate of bug #438734 or bug #434710.
Comment 4 UX.MAN 2014-03-31 19:32:37 UTC
Ok, it looks like these bug reports you mentioned are related to this. Still, how could I resolve this issue? should I apply a patch or something?
Comment 5 Jeroen Roovers gentoo-dev 2014-03-31 19:57:48 UTC
(In reply to UX.MAN from comment #4)
> Ok, it looks like these bug reports you mentioned are related to this.
> Still, how could I resolve this issue? should I apply a patch or something?

I have no idea what is causing this in the first place. It looks like you have some variable set in the environment that's causing linux-mod.eclass or linux-info.eclass to misbehave. You tell me.
Comment 6 UX.MAN 2014-03-31 20:23:35 UTC
Well, I don't know. I haven't set any variables like KERNEL_DIR nor KBUILD_OUTPUT.
Comment 7 Noah Sheppard 2014-04-01 01:05:28 UTC
I also have the problem, and have not explicitly set any variables related to this.  For me, it appeared suddenly and unrelated to any choice I directly made myself, as far as I know.

The only unusual things I have set are:
-PORTAGE_TMPDIR set to /tmp in make.conf
-layman installed and /var/lib/layman/make.conf sourced in make.conf
-using the kde/systemd profile

I've wanted to debug this but haven't had enough time to dig in.  If anybody has any specific tests they'd like me to run, I'd be happy to do so.
Comment 8 Noah Sheppard 2014-04-08 05:24:16 UTC
I dug into this and discovered that, for me, the issue was simple file permissions.  I discovered that some of the files that are created in /usr/src/linux when you compile the kernel had mode 660 due to me having a umask of 0007.  This, combined with default FEATURES="userpriv", meant that necessary files were inaccessible when nvidia-drivers was compiling. This appeared for me suddenly because I had built the system I'm on and run with it a few weeks before I got around to copying over my bashrc files (which applied the umask).

I'm not 100% sure this is the same problem you're having, UX.MAN, since your error message is a little different (it fails accessing /lib/modules/3.12.13-gentoo/build whereas mine failed on e.g. include/generated/uapi), but what happens if you set FEATURES="-userpriv" and try again?
Comment 9 xpue 2015-10-29 09:06:57 UTC
I think same will happen if your umask was 077 when you build kernel.