Compile of open-vm-tools-kmod fails on a compiler error. Build log: >>> Emerging (1 of 3) app-emulation/open-vm-tools-kmod-2013.09.16.1328054 * open-vm-tools-2013.09.16-1328054.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found sources for kernel version: * 3.11.6-hardened * Checking for suitable kernel configuration options... [ ok ] >>> Unpacking source... >>> Unpacking open-vm-tools-2013.09.16-1328054.tar.gz to /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work >>> Source unpacked in /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work >>> Preparing source in /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054 ... * Applying vmhgfs-linux-3.11.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054 ... * Preparing vmxnet module make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' auto-build Using kernel build system. make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[1]: Entering directory `/usr/src/linux-3.11.6-hardened' Makefile:1498: .vmlinux.cmd: Permission denied CC [M] /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet/vmxnet.o cc1: error: cannot load plugin /usr/src/linux-3.11.6-hardened/tools/gcc/colorize_plugin.so /usr/src/linux-3.11.6-hardened/tools/gcc/colorize_plugin.so: cannot open shared object file: Permission denied make[2]: *** [/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet/vmxnet.o] Error 1 make[1]: *** [_module_/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet] Error 2 make[1]: Leaving directory `/usr/src/linux-3.11.6-hardened' make: *** [vmxnet.ko] Error 2 * ERROR: app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/temp/environment'. * Working directory: '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet' * S: '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054' Reproducible: Always Steps to Reproduce: 1. emerge open-vm-tools-kmod 2. 3. Actual Results: cc1: error: cannot load plugin /usr/src/linux-3.11.6-hardened/tools/gcc/colorize_plugin.so /usr/src/linux-3.11.6-hardened/tools/gcc/colorize_plugin.so: cannot open shared object file: Permission denied Expected Results: Should compile normally.
*** Bug 489032 has been marked as a duplicate of this bug. ***
Please post your `emerge --info' output in a comment.
Created attachment 361786 [details] emerge --info
Can you give me a build log with MAKEOPTS=-j1?
Sure, no problem. Same error pops up: === <snipped> ~ # MAKEOPTS="-j1" emerge -v open-vm-tools-kmod These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] app-emulation/open-vm-tools-kmod-2013.09.16.1328054 [2012.12.26.958366] 0 kB Total: 1 package (1 upgrade), Size of downloads: 0 kB >>> Verifying ebuild manifests >>> Emerging (1 of 1) app-emulation/open-vm-tools-kmod-2013.09.16.1328054 * open-vm-tools-2013.09.16-1328054.tar.gz 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.11.6-hardened-r1/build * Found sources for kernel version: * 3.11.6-hardened-r1 * Checking for suitable kernel configuration options... [ ok ] >>> Unpacking source... >>> Unpacking open-vm-tools-2013.09.16-1328054.tar.gz to /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work >>> Source unpacked in /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work >>> Preparing source in /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054 ... * Applying vmhgfs-linux-3.11.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054 ... * Preparing vmxnet module make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' auto-build Using kernel build system. make -C /lib/modules/3.11.6-hardened-r1/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[1]: Entering directory `/usr/src/linux-3.11.6-hardened-r1' Makefile:1498: .vmlinux.cmd: Permission denied CC [M] /var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet/vmxnet.o cc1: error: cannot load plugin /usr/src/linux-3.11.6-hardened-r1/tools/gcc/colorize_plugin.so /usr/src/linux-3.11.6-hardened-r1/tools/gcc/colorize_plugin.so: cannot open shared object file: Permission denied make[2]: *** [/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet/vmxnet.o] Error 1 make[1]: *** [_module_/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet] Error 2 make[1]: Leaving directory `/usr/src/linux-3.11.6-hardened-r1' make: *** [vmxnet.ko] Error 2 * ERROR: app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/temp/environment'. * Working directory: '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet' * S: '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054' >>> Failed to emerge app-emulation/open-vm-tools-kmod-2013.09.16.1328054, Log file: >>> '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/temp/build.log' * Messages for package app-emulation/open-vm-tools-kmod-2013.09.16.1328054: * ERROR: app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-emulation/open-vm-tools-kmod-2013.09.16.1328054::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/temp/environment'. * Working directory: '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054/modules/linux/vmxnet' * S: '/var/tmp/portage/app-emulation/open-vm-tools-kmod-2013.09.16.1328054/work/open-vm-tools-2013.09.16-1328054'
Hmm... well the .vmlinux.cmd error does not appear to be fatal. The build is dying on this: cc1: error: cannot load plugin /usr/src/linux-3.11.6-hardened-r1/tools/gcc/colorize_plugin.so Since that is specific to hardened-sources, I'm passing this bug along to the hardened team.
Hello, I just discovered the same bug on '=app-emulation/virtualbox-modules-4.2.22::gentoo', with a lot of "cc1: error: XXX/XXX/file: Permission denied" stored in my actual kernel directory (linux-3.12.8-hardened-r1) because those files have “root:root 440 or 660” rights, and I have the userfetch FEATURE in portage, that's why accessing to those files is returning "Permission denied". The quick (but maybe ugly) solution is to do a "chmod -R o=rX /usr/src/linux", or to disable the "userfetch" feature (I prefer to use chmod). I think there is nothing to do about it, except doing the "chmod" command. Best regards,
userfetch should not affect the mode of files that are unpacked from a tarball.
It is quite likely that the kernel was built with an overly restrictive umask value though. Lacking any other info, I'm going to blame this on user error.
(In reply to Mike Gilbert from comment #9) > It is quite likely that the kernel was built with an overly restrictive > umask value though. Lacking any other info, I'm going to blame this on user > error. Yes, it's about the "umask 027" in /etc/profile (and in my shell's profile too), to avoid lack of security when doing useradd (which set new users' home directory in 755 by default, which is a problem). I knew there is not really a lot to do about it; maybe doing a "chmod -R o=rX /usr/src/linux" before? Not a really good idea too. Then, I think we should to a warning about it, in the ebuild. Then, no actions are doing without the user's agrees and knowledges, and it may be solved easily by the user on his/her own. Best regards.
(In reply to Thibaud "thican" CANALE from comment #10) > (In reply to Mike Gilbert from comment #9) > > It is quite likely that the kernel was built with an overly restrictive > > umask value though. Lacking any other info, I'm going to blame this on user > > error. > > Yes, it's about the "umask 027" in /etc/profile (and in my shell's profile > too), to avoid lack of security when doing useradd (which set new users' > home directory in 755 by default, which is a problem). You can set a default umask for useradd in /etc/login.defs