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
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

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: 235
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: 51

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
archenroot
Apprentice
Apprentice


Joined: 13 Dec 2011
Posts: 218
Location: Lake Macha, Czech republic

PostPosted: Mon May 15, 2017 2:46 pm    Post subject: Reply with quote

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


Joined: 13 Dec 2011
Posts: 218
Location: Lake Macha, Czech republic

PostPosted: Tue May 16, 2017 11:47 am    Post subject: Reply with quote

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


Joined: 26 Jul 2019
Posts: 1

PostPosted: Fri Jul 26, 2019 8:03 pm    Post subject: Reply with quote

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


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sat Jul 27, 2019 12:12 am    Post subject: Reply with quote

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


Joined: 11 Dec 2004
Posts: 258

PostPosted: Tue Aug 20, 2019 7:06 pm    Post subject: Reply with quote

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


Joined: 21 Mar 2015
Posts: 2

PostPosted: Sun Oct 20, 2019 12:01 am    Post subject: Reply with quote

Your 2011 post just saved my butt too! Thanks for posting! :D
Back to top
View user's profile Send private message
jagdpanther
l33t
l33t


Joined: 22 Nov 2003
Posts: 729

PostPosted: Sun Apr 19, 2020 7:30 pm    Post subject: Reply with quote

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


Joined: 03 Feb 2015
Posts: 27

PostPosted: Mon Aug 10, 2020 10:36 am    Post subject: Reply with quote

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
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