"incompatible gcc/plugin versions" errors in compiling chipsec's kernel module

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

"incompatible gcc/plugin versions" errors in compiling chipsec's kernel module

Postby sth0R » Mon Jan 02, 2017 11:40 pm

Hi,

I tried to build chipsec's kernel module( https://github.com/chipsec/chipsec) on a system with PaX/Grsecurity and I got the some errors:

Code: Select all
chipsec/build/lib.linux-x86_64-2.7/drivers/linux $ sudo make
[sudo] password for johndoe:
make -C /lib/modules/`uname -r`/build SUBDIRS=/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux clean
make[1]: Entering directory '/usr/src/linux-headers-4.7.10-grsec'
  CLEAN   /johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/.tmp_versions
make[1]: Leaving directory '/usr/src/linux-headers-4.7.10-grsec'
rm -f amd64/cpu.o
nasm -f elf64 -o amd64/cpu.o amd64/cpu.asm
make -C /lib/modules/`uname -r`/build SUBDIRS=/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.7.10-grsec'
  CC [M]  /johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/chipsec_km.o
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/size_overflow_plugin/size_overflow_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/stackleak_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/colorize_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/kernexec_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/latent_entropy_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
scripts/Makefile.build:289: recipe for target '/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/chipsec_km.o' failed
make[2]: *** [/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/chipsec_km.o] Error 1
Makefile:1465: recipe for target '_module_/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux' failed
make[1]: *** [_module_/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.7.10-grsec'
Makefile:24: recipe for target 'chipsec' failed
make: *** [chipsec] Error 2
johndoe@johndoe-fortress /johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux $ sudo make
make -C /lib/modules/`uname -r`/build SUBDIRS=/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux clean
make[1]: Entering directory '/usr/src/linux-headers-4.7.10-grsec'
  CLEAN   /johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/.tmp_versions
make[1]: Leaving directory '/usr/src/linux-headers-4.7.10-grsec'
rm -f amd64/cpu.o
nasm -f elf64 -o amd64/cpu.o amd64/cpu.asm
make -C /lib/modules/`uname -r`/build SUBDIRS=/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.7.10-grsec'
  CC [M]  /johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/chipsec_km.o
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/size_overflow_plugin/size_overflow_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/stackleak_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/colorize_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/kernexec_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/latent_entropy_plugin.so
cc1: error: incompatible gcc/plugin versions
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/structleak_plugin.so
scripts/Makefile.build:289: recipe for target '/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/chipsec_km.o' failed
make[2]: *** [/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux/chipsec_km.o] Error 1
Makefile:1465: recipe for target '_module_/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux' failed
make[1]: *** [_module_/johndoe/chipsec/build/lib.linux-x86_64-2.7/drivers/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.7.10-grsec'
Makefile:24: recipe for target 'chipsec' failed
make: *** [chipsec] Error 2


Any idea how to fix it? Thanks.
sth0R
 
Posts: 9
Joined: Fri May 09, 2014 11:03 am

Re: "incompatible gcc/plugin versions" errors in compiling chipsec's kernel module

Postby spender » Tue Jan 03, 2017 1:19 am

What are your gcc and g++ versions?

-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm

Re: "incompatible gcc/plugin versions" errors in compiling chipsec's kernel module

Postby sth0R » Mon Jan 09, 2017 9:20 am

Code: Select all
#gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

#g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
sth0R
 
Posts: 9
Joined: Fri May 09, 2014 11:03 am

Re: "incompatible gcc/plugin versions" errors in compiling chipsec's kernel module

Postby sth0R » Thu Jan 19, 2017 11:16 pm

Seems vanilla kernel have the same issue:
https://github.com/chipsec/chipsec/issues/140
sth0R
 
Posts: 9
Joined: Fri May 09, 2014 11:03 am

Re: "incompatible gcc/plugin versions" errors in compiling chipsec's kernel module

Postby PaX Team » Thu Jan 26, 2017 10:19 pm

is that the only gcc version you have installed?
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity support

cron