Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] cc1: error: Fail to initialize plugin ...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
yoosty69
n00b
n00b


Joined: 03 Jan 2004
Posts: 35

PostPosted: Thu Dec 15, 2011 3:19 am    Post subject: [SOLVED] cc1: error: Fail to initialize plugin ... Reply with quote

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
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Sat Mar 31, 2012 4:43 pm    Post subject: Reply with quote

Thanks a lot :!: :P
Back to top
View user's profile Send private message
fpires
n00b
n00b


Joined: 08 Jan 2010
Posts: 15

PostPosted: Sat Apr 14, 2012 1:30 am    Post subject: Thanks! Reply with quote

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
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8938

PostPosted: Sat Apr 14, 2012 2:29 am    Post subject: Reply with quote

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
View user's profile Send private message
Wuodan
n00b
n00b


Joined: 21 May 2012
Posts: 23

PostPosted: Mon Sep 03, 2012 7:39 am    Post subject: Reply with quote

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
View user's profile Send private message
titanofold
Developer
Developer


Joined: 30 Dec 2003
Posts: 226
Location: Bryson City, NC USA

PostPosted: Tue Sep 18, 2012 1:18 pm    Post subject: Reply with quote

Rebuilding the kernel also solved the same issue with virtualbox-guest-additions.
_________________
The best things in life are free.
Guy-1: Surely, you will fold with me...
Guy-2: Alright, but don't call me Shirley
Back to top
View user's profile Send private message
litan
n00b
n00b


Joined: 13 Aug 2012
Posts: 32

PostPosted: Sat Jan 12, 2013 1:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum