Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 349939 - x11-drivers/nvidia-drivers-260.19.29 cant be installed using a umask 0027 (in /etc/profile /etc/login.defs)
Summary: x11-drivers/nvidia-drivers-260.19.29 cant be installed using a umask 0027 (in...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-28 09:17 UTC by Thomas Jäger
Modified: 2012-06-19 04:19 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Jäger 2010-12-28 09:17:20 UTC
When setting the default umask to 0027 (for example in /etc/profile) nvidia-drivers-260.19.29 (and maybe earlier versions) cant be emerged

...

 * Preparing nvidia module
make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.36-gentoo-r6/build HOST_CC=x86_64-pc-linux-gnu-gcc clean module 
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1
emake failed
 * ERROR: x11-drivers/nvidia-drivers-260.19.29 failed:
 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux 		SYSOUT=/lib/modules/2.6.36-gentoo-r6/build HOST_CC=x86_64-pc-linux-gnu-gcc clean module
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 4204:  Called linux-mod_src_compile
 *   environment, line 3105:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" 			CROSS_COMPILE=${CHOST}- 						LDFLAGS=\"$(get_abi_LDFLAGS)\" 						${BUILD_FIXES} 		${BUILD_PARAMS} 						${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";



Reproducible: Always

Steps to Reproduce:
1. umask 0027
2. /bin/rm -r /lib/modules/xxx
3. cd /usr/src/linux
4. make modules_install
5. emerge -1 -av nvidia-drivers
Comment 1 Thomas Jäger 2010-12-28 09:17:39 UTC
nastassja modules # emerge --info =x11-drivers/nvidia-drivers-260.19.29
Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r6 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-r6-x86_64-AMD_Phenom-tm-_II_X4_940_Processor-with-gentoo-1.12.14
Timestamp of tree: Tue, 28 Dec 2010 06:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11-r1
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 googleearth AdobeFlash-10 AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://de-mirror.org/distro/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/java-overlay /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 apache2 berkdb bidi bluetooth bzip2 cairo cddb cdparanoia cdr cgi chroot cli consolekit cracklib crypt css ctype cups curl cxx dbus dedicated dga dri dvb dvd dvdr encode exif expat fastcgi ffmpeg flac foomaticdb gd geoip gif gimp gnome gnome-keyring gnutls gphoto2 gpm gstreamer gtk iconv imap java java6 jpeg jpeg2k lame lcms libnotify lm_sensors mad matroska mbox mikmod mmx mmxext modules mp3 mpeg mudflap multilib mysql nautilus ncurses nls nntp nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl php png policykit ppds pppd python quicktime readline samba sasl scanner sdl session speex spell sqlite sqlite3 sse sse2 ssl subversion svg sysfs taglib tcpd theora threads tiff truetype unicode usb videos vorbis wmf x264 xattr xcb xinetd xml xorg xpm xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgi cgid charset_lite dav deflate dir disk_cache env file_cache filter ident imagemap include log_config mem_cache mime mime_magic negotiation rewrite version" APACHE2_MPMS="worker" CAMERAS="directory fuji ptp2 template" 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 ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev v4l vesa vga nv 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, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

x11-drivers/nvidia-drivers-260.19.29 was built with the following:
USE="acpi gtk (multilib) -custom-cflags"
Comment 2 Tom Regner 2011-01-10 09:19:18 UTC
I had the same symptoms when emerging this driver; the problem was that I did clean the linux sources after the kernel build.

The nvidia build system compiles a little testprogram to determin the kernel version (2.4 or 2.6). This testprogramm did not compile, because a file generated during the kernel build -- namely generated/asm-offsets.h -- was removed by the make clean.

I just started to compile the kernel again until the file was generated. I then interrupted the kernel build and emerged the nvidia drivers without a problem.

You can play with the build system in /var/tmp/portage/x11-drivers/nvidia-drivers-260.19.29/work/kernel after the emerge failed to test if you have the same problem.
Comment 3 Thomas Jäger 2011-02-26 09:08:13 UTC
Thats the problem. When building a kernel with umask 0027 the emerge process cannot read the appropriate file (permission denied; emerge build will be done with portage user --> no rights to read files generated by root:root with mod 750)

Currently i have to switch the umask before building the kernel

Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2012-06-19 04:19:55 UTC
Nothing we can fix in the NVIDIA drivers. Non-root users can't access your kernel sources, Portage runs things not as root by default. Either config Portage to run as root or fix the perms on your kernel source tree.