View previous topic :: View next topic |
Author |
Message |
yoosty69 n00b
Joined: 03 Jan 2004 Posts: 35
|
Posted: Thu Dec 15, 2011 3:19 am Post subject: [SOLVED] cc1: error: Fail to initialize plugin ... |
|
|
Just had a bit of a *facepalm* moment which wasn't easily solved by search or Google so I thought I'd document it for future generations (myself included).
While installing open-vm-tools the compile process got stuck on open-vm-tools-kmod with the following error:
Code: |
Using 2.6.x kernel build system.
make -C /lib/modules/3.0.4-hardened-r5/build SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-3.0.4-hardened-r5'
CC [M] /var/tmp/portage/app-emulation/open-vm-tools-kmod-2011.11.20.535097/work/open-vm-tools-2011.11.20-535097/modules/linux/vmblock/linux/filesystem.o
cc1: error: incompatible gcc/plugin versions
cc1: error: Fail to initialize plugin /usr/src/linux-3.0.4-hardened-r5/tools/gcc/constify_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: Fail to initialize plugin /usr/src/linux-3.0.4-hardened-r5/tools/gcc/kernexec_plugin.so
make[2]: *** [/var/tmp/portage/app-emulation/open-vm-tools-kmod-2011.11.20.535097/work/open-vm-tools-2011.11.20-535097/modules/linux/vmblock/linux/filesystem.o] Error 1
make[1]: *** [_module_/var/tmp/portage/app-emulation/open-vm-tools-kmod-2011.11.20.535097/work/open-vm-tools-2011.11.20-535097/modules/linux/vmblock] Error 2
make[1]: Leaving directory `/usr/src/linux-3.0.4-hardened-r5'
make: *** [vmblock.ko] Error 2
|
After a bit of head-banging I remembered that I had recently re-built the toolchain thus everything in the kernel directory was compiled before the running version of gcc, constify_plugin.so included. The fix? Rebuild the kernel and viola! The kernel rebuild will re-compile the stuff under /usr/src/linux/tools/gcc and gcc will stop complaining.
To be more specific, I actually let genkernel rebuild the kernel, but I'm pretty sure the end result is the same.
The key words here are "Fail to initialize plugin" and "gcc", possibly even "constify_plugin.so", and I'm guessing that it's not specific to open-vmtools-kmod but any kernel module that's built out of the kernel tree.
edit: Added [SOLVED] to subject |
|
Back to top |
|
|
Rexilion Veteran
Joined: 17 Mar 2009 Posts: 1044
|
Posted: Sat Mar 31, 2012 4:43 pm Post subject: |
|
|
Thanks a lot |
|
Back to top |
|
|
fpires n00b
Joined: 08 Jan 2010 Posts: 15
|
Posted: Sat Apr 14, 2012 1:30 am Post subject: Thanks! |
|
|
I ran into this problem while compiling virtualbox modules. I'm surprised we are the only ones, since this might be a very common issue. Anyway, you saved me hours of debugging and compiling, so thanks a lot!!! |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Sat Apr 14, 2012 2:29 am Post subject: |
|
|
Those plugins are part of the hardened patchset. People using gentoo-sources kernels do not have those plugins, and therefore do not have this problem. I expect most hardened-sources users do not use out-of-tree modules. |
|
Back to top |
|
|
Wuodan n00b
Joined: 21 May 2012 Posts: 23
|
Posted: Mon Sep 03, 2012 7:39 am Post subject: |
|
|
Happened here on Gentoo hardened with world-update.
gcc was updated before net-wireless/compat-wireless from the Pentoo overlay.
Compat-wireless brings a bunch of modules for wlan and some Atheros eth ... which I need.
Rebuilding the kernel seemed to fix it.
Thanks a lot! |
|
Back to top |
|
|
titanofold Developer
Joined: 30 Dec 2003 Posts: 235 Location: Bryson City, NC USA
|
|
Back to top |
|
|
litan n00b
Joined: 13 Aug 2012 Posts: 51
|
Posted: Sat Jan 12, 2013 1:44 am Post subject: |
|
|
I had the same problem compiling the net-misc/dahdi package with my hardened-sources.
Thanks a lot for this post!
It was the only useful thing I found on the web. |
|
Back to top |
|
|
archenroot Apprentice
Joined: 13 Dec 2011 Posts: 218 Location: Lake Macha, Czech republic
|
Posted: Mon May 15, 2017 2:46 pm Post subject: |
|
|
I encountered same/similar symptoms while being on testing versions of gcc and kernel as well, so I rebuild latest ~amd64 kernel:
Code: | =sys-kernel/gentoo-sources-4.11.1 |
With latest GCC:
Code: | ares ~ # gcc-config -l
[1] x86_64-pc-linux-gnu-4.8.5
[2] x86_64-pc-linux-gnu-4.9.4
[3] x86_64-pc-linux-gnu-5.4.0
[4] x86_64-pc-linux-gnu-6.2.0
[5] x86_64-pc-linux-gnu-6.3.0
[6] x86_64-pc-linux-gnu-7.1.0 *
|
In my case I wasn't able to build nvidia-drivers while failing on
Code: | cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/cyc_complexity_plugin.so
|
_________________ Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force
Last edited by archenroot on Tue May 16, 2017 11:48 am; edited 1 time in total |
|
Back to top |
|
|
archenroot Apprentice
Joined: 13 Dec 2011 Posts: 218 Location: Lake Macha, Czech republic
|
Posted: Tue May 16, 2017 11:47 am Post subject: |
|
|
Similar issue occured on virtualbox:
Code: | app-emulation/virtualbox-5.1.22-r1 |
After rebuilding kernel all works fine... _________________ Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force |
|
Back to top |
|
|
Penguin-Guru n00b
Joined: 26 Jul 2019 Posts: 1
|
Posted: Fri Jul 26, 2019 8:03 pm Post subject: |
|
|
Same issue with nvidia-drivers. Really appreciate the help!
Just a note: I don't have a "/usr/src/linux/tools/gcc".
Code: | find /usr/src/linux/tools/ -iname '*gcc*' |
- /usr/src/linux/tools/include/asm-generic/atomic-gcc.h
- /usr/src/linux/tools/include/linux/compiler-gcc.h
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21619
|
Posted: Sat Jul 27, 2019 12:12 am Post subject: |
|
|
Penguin-Guru wrote: | Same issue with nvidia-drivers. Really appreciate the help! | Are you posting to tell us that you read this thread, applied its advice, and that the advice solved your problem, or are you posting to tell us that you have similar symptoms and need our assistance to correct the problem? |
|
Back to top |
|
|
donmartio Apprentice
Joined: 11 Dec 2004 Posts: 258
|
Posted: Tue Aug 20, 2019 7:06 pm Post subject: |
|
|
Penguin-Guru wrote: | Same issue with nvidia-drivers. Really appreciate the help!
Just a note: I don't have a "/usr/src/linux/tools/gcc".
Code: | find /usr/src/linux/tools/ -iname '*gcc*' |
- /usr/src/linux/tools/include/asm-generic/atomic-gcc.h
- /usr/src/linux/tools/include/linux/compiler-gcc.h
|
Recompiling the kernel worked for me. _________________ Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live. |
|
Back to top |
|
|
aauren n00b
Joined: 21 Mar 2015 Posts: 2
|
Posted: Sun Oct 20, 2019 12:01 am Post subject: |
|
|
Your 2011 post just saved my butt too! Thanks for posting! |
|
Back to top |
|
|
jagdpanther l33t
Joined: 22 Nov 2003 Posts: 729
|
Posted: Sun Apr 19, 2020 7:30 pm Post subject: |
|
|
Thanks for the post. I just had the same issue when going from virtualbox-6.1.4 to 6.1.6 after upgrading from gcc-9.2.0-r2 to 9.3.0. Recompiling the kernel fixed the issue. I am using gentoo-sources not hardened.
Code: | portage/app-emulation/virtualbox-modules-6.1.6/work/vboxdrv/r0drv/linux/assert-r0drv-linux.o /dev/shm/portage/app-emulation/virtualbox-modules-6.1.6/work/vboxdrv/r0drv/linux/assert-r0drv-linux.c
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
cc1: error: incompatible gcc/plugin versions |
|
|
Back to top |
|
|
maxxim n00b
Joined: 03 Feb 2015 Posts: 27
|
Posted: Mon Aug 10, 2020 10:36 am Post subject: |
|
|
I encountered the same issue when trying to update x11-drivers/nvidia-drivers and app-emulation/virtualbox-modules.
I had enabled those GCC plugins when hardening the kernel (https://forums.gentoo.org/viewtopic-p-8480530.html#8480264).
Recompiling the kernel fixed it. |
|
Back to top |
|
|
|