I've recently updated to gentoo-sources-3.13.1. I built the new kernel, I rebooted into it, and I ran 'emerge @modules-rebuild' but the emerge fails. Reproducible: Always Steps to Reproduce: 1. install sys-kernel/gentoo-sources-3.13.1 having virtualbox installed already 2. build it, install it, reboot into it 3. emerge @module-rebuild Actual Results: See attached build log Expected Results: It should have emerged Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.18-r1, 3.13.1-gentoo x86_64) ================================================================= System uname: Linux-3.13.1-gentoo-x86_64-Intel-R-_Core-TM-_i5-3210M_CPU_@_2.50GHz-with-gentoo-2.2 KiB Mem: 8069860 total, 5990116 free KiB Swap: 8912892 total, 8912892 free Timestamp of tree: Fri, 31 Jan 2014 08:00:01 +0000 ld GNU ld (GNU Binutils) 2.24 distcc 3.1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.2_p45-r1 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.6, 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, 1.14.1 sys-devel/binutils: 2.24-r2 sys-devel/gcc: 4.8.2 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.13 (virtual/os-headers) sys-libs/glibc: 2.18-r1 Repositories: gentoo enlightenment x-portage ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core-avx-i -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb" 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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=core-avx-i -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build" FCFLAGS="-march=core-avx-i -O2 -pipe -fomit-frame-pointer" FEATURES="assume-digests binpkg-logs cgroup clean-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=core-avx-i -O2 -pipe -fomit-frame-pointer" GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" 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="/var/lib/layman/enlightenment /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi adns alsa amd64 ao apache2 avahi bash-completion berkdb bidi bluetooth bzip2 cairo caps cdda cddb cdio cdparanoia cdr cjk cli consolekit cracklib crypt cscope css cups curl cvs cxx dbus dhcp directfb djvu dri drm dts dv dvd emotion encode ethumb exif fam fftw filecaps flac fortran ftp gd gdbm geoip ggi gif git gnome-keyring gnutls gpg gpm gtkstyle gzip iconv icu idn inotify introspection ipv6 javascript jbig jit jpeg kerberos lame lapack latex ldap libass libnotify libsamplerate lzma mmap mms mmx mmxext modemmanager modules mp3 mp4 mpeg multilib mysql ncurses network networkmanager nls nptl nsplugin ogg openal opencl opengl openmp pam pcre pdf png policykit postgres postscript ppds python quicktime raw readline samba session slang smp sna sound spell sqlite sqlite3 sse sse2 sse3 sse4_1 ssh ssl ssse3 startup-notification subversion svg syslog taglib tcpd theora threads tiff truetype udev unicode usb uxa v4l vaapi vcd vdpau vim-syntax vorbis vpx webkit wifi wmf x264 xattr xcb xcomposite xetex xinerama xinetd xscreensaver xv xvid xvmc zeroconf zlib" ABI_X86="64" ALSA_CARDS="seq-dummy intel-hda-snd" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_ZA en_GB en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="intel" 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" USE_PYTHON="2.7" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Build log, sorry had to paste. Attachment doesn't seem to be working * Package: app-emulation/virtualbox-modules-4.3.6 * Repository: gentoo * Maintainer: polynomial-c@gentoo.org patrick@gentoo.org * USE: amd64 elibc_glibc kernel_linux userland_GNU * FEATURES: preserve-libs sandbox userpriv usersandbox * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /usr/src/linux * Found sources for kernel version: * 3.13.1-gentoo >>> Unpacking source... >>> Unpacking vbox-kernel-module-src-4.3.6.tar.xz to /var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work >>> Source unpacked in /var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work >>> Preparing source in /var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work ... ln: failed to create symbolic link ‘Module.symvers’: File exists * Preparing vboxdrv module make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KERN_DIR=/usr/src/linux KERNOUT=/usr/src/linux all *** Building 'vboxdrv' module *** make[1]: Entering directory '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv' make KBUILD_VERBOSE= SUBDIRS=/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv SRCROOT=/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv CONFIG_MODULE_SIG= -C /usr/src/linux modules make[2]: Entering directory '/usr/src/linux-3.13.1-gentoo' make -C /usr/src/linux-3.13.1-gentoo \ KBUILD_SRC=/usr/src/linux-3.13.1-gentoo \ KBUILD_EXTMOD="/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv" -f /usr/src/linux-3.13.1-gentoo/Makefile \ modules ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. make[4]: stat: include/config/auto.conf: Permission denied CC [M] /var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv/linux/SUPDrv-linux.o /bin/sh: scripts/basic/fixdep: Permission denied /usr/src/linux-3.13.1-gentoo/scripts/Makefile.build:308: recipe for target '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv/linux/SUPDrv-linux.o' failed make[4]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv/linux/SUPDrv-linux.o] Error 1 /usr/src/linux-3.13.1-gentoo/Makefile:1249: recipe for target '_module_/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv' failed make[3]: *** [_module_/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv] Error 2 Makefile:133: recipe for target 'sub-make' failed make[2]: *** [sub-make] Error 2 make[2]: Leaving directory '/usr/src/linux-3.13.1-gentoo' Makefile:289: recipe for target 'vboxdrv' failed make[1]: *** [vboxdrv] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work/vboxdrv' Makefile:39: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: app-emulation/virtualbox-modules-4.3.6::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-emulation/virtualbox-modules-4.3.6::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-emulation/virtualbox-modules-4.3.6::gentoo'`. * The complete build log is located at '/var/log/portage/build/app-emulation/virtualbox-modules-4.3.6:20140202-124649.log'. * The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/temp/environment'. * Working directory: '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work' * S: '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.6/work'
Is there perhaps a workaround for this at the moment?
This issue still exists with app-emulation/virtualbox-modules-4.3.10, it is not possible to build the modules.
ping - same problem with 4.3.12 - can anyone build virtualbox-modules at all?
OK, the solution seems to be along the lines of setfacl -R -m u:portage:rx /usr/src/ (give the portage user access to the kernek src)
I don't think there is a bug here. Your kernel sources should be world readable, if you lock down the permissions then you should expect build failures since portage drops to non-root during the compile phase.
virtualbox-modules-4.3.18 :Bug still persists. I don't touched sources at all.. Portage only downloaded it and unpacked it. Genkernel compiled it. Nvidia driveres compiled successfully. So why virtualbox-modules just crashes..?
Can you do "ls -lh /usr/src/linux/include/config/auto.conf" to check the permissions on that file? This is assuming you still have the EXACT same error, "stat: include/config/auto.conf: Permission denied". If it has problems on a different file, check the permissions on that other file.
alnagon ~ # ls -lh /usr/src/linux/include/config/auto.conf -rw-r-x---+ 1 root root 44K 8. bře 22.01 /usr/src/linux/include/config/auto.conf (i have already solved this by --> setfacl -R -m u:portage:rx /usr/src/)
That is not how the permissions will look on a 'vanilla' gentoo setup. I know that doesn't really mean much since you're encouraged to do whatever you like with gentoo, but you each seem to be doing SOMETHING special to get your permissions to end up funky. On a typical out of the box gentoo, these files will all be 644 root:root, any idea how you're ending up with 640 root:root *plus ACLs*, straight from emerge?
Scratch the "straight from emerge" part, these are generated files. So it has to do with the way you configure/prepare/build the sources, not how you emerge. Your generated files are ending up with these special perms when they should be plain 644.
Oki, maybe really some kind of my own faulut... I will try with next kernel version again... Thanx for now.
I keep getting this problem, and I've narrowed it down to sudo. Emerging the kernel sources, whether via sudo or su'ing to root, sets the permissions correctly, but if I use sudo to compile the kernel, example $ sudo make oldconfig $ sudo make vs # make oldconfig # make Then the permissions of the generated files get affected by my users umask (0220) through sudo. The way around this is run 'make clean' and 'make mrproper' in the kernel sources directory, and then configure, compile and install the kernel as root proper, not via sudo.
Correction, my umask is 0007 (Sorry)
Here's how things work out sirlark@volundr ~$ umask 0007 sirlark@volundr ~$ sudo su root@volundr /home/sirlark$ umask 0002 root@volundr /home/sirlark$ exit sirlark@volundr ~$ su pam_mount password: root@volundr /home/sirlark$ umask 0002 root@volundr /home/sirlark$ exit sirlark@volundr ~$ echo "umask" > /tmp/umask.sh sirlark@volundr ~$ chmod a+x /tmp/umask.sh sirlark@volundr ~$ /tmp/umask.sh 0007 sirlark@volundr ~$ sudo /tmp/umask.sh 0027 sirlark@volundr ~$
There is no bug in virtualbox-modules here, right? Do you want to close this and file a bug against sudo or the kernel build system?
Yeah, from my side you can close it. I checked the sudo man pages, and the umask behaviour is documented and expected, so there's no need for another bug report.