Watch out for gcc packages in main-testing regarding building kernel modules

There are new gcc-7.2.1 packages in main-testing repo. Be careful with this a gcc update is not a trivial matter.

At this time VirtualBox kernel modules will not build with this version but still require gcc-6.3.1.

Don’t know about other kernel modules like nVidia as I don’t have their hardware.

Caveat emptor.

Edit: I’m not saying there is anything wrong with the gcc-7.2.1 it’s just a dependency/requires issue as far as I know.

Edit2: I probably need to do a bug report on this but don’t have the time. Hope to do so tomorrow or Friday. Staying up after my bed time just to post this… :weary:

1 Like

Ben nvidia-current is broken too…
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/
cc1: error: fail to initialize plugin ./scripts/gcc-plugins/
cc1: error: incompatible gcc/plugin versions
etc, etc
I don’t see how this can go into the iso it will probably break most dkms packages though I have compiled other things with it and it works fine.

I wonder if the plugins are a separate package and we have the ones for thew previous version installed?

Also opencl needs to be rebuilt due to the new version of gcc.

For information / education.
The gcc plugin problem can be fixed like this:–

Install urpmi gcc-plugin-devel
Make sure you have the kernel-sources and kernel-headers installed

urpmi kernel-release-source-latest
urpmi kernel-release-headers

go to the kernel source directory

cd /usr/src/kernel*

I think ‘make oldconfig’ may be wise but probably not absolutely necessary

I just did “sudo make gcc-plugins”

No install needed. After this I was able to build nvidia-current without issue.


This worked in hardware for VirtualBox host. Unfortunately in VirtualBox guest it did not work:

[ linux-4.13.4-1omv]$ sudo make gcc-plugins
./scripts/ line 19: g++: command not found
Cannot use CONFIG_GCC_PLUGINS: your gcc installation does not support plugins, perhaps the necessary headers are missing?
make: *** [scripts/Makefile.gcc-plugins:68: gcc-plugins-check] Error 1

[ linux-4.13.4-1omv]$ rpm -qa | grep gcc

[ linux-4.13.4-1omv]$ rpm -qa | grep kernel-release

Guest system is installed from ISO 1300 (LXQt only) but is fully updated in addition to having the requested packages installed.

Edit: I tried 'urpmi --replacepkgs virtualbox-guest-additions dkms-vboxadditions:

Building module:
cleaning build area…
make KERNELRELEASE=4.13.4-desktop-1omv -C /lib/modules/4.13.4-desktop-1omv/build M=/var/lib/dkms/vboxadditions/5.1.26-1/build/vboxguest && cp /var/lib/dkms/vboxadditions/5.1.26-1/build/vboxguest/Module.symvers /var/lib/dkms/vboxadditions/5.1.26-1/build/vboxsf && make -C /lib/modules/4.13.4-desktop-1omv/build M=/var/lib/dkms/vboxadditions/5.1.26-1/build/vboxsf && cp /var/lib/dkms/vboxadditions/5.1.26-1/build/vboxsf/Module.symvers /var/lib/dkms/vboxadditions/5.1.26-1/build/vboxvideo && make -C /lib/modules/4.13.4-desktop-1omv/build M=/var/lib/dkms/vboxadditions/5.1.26-1/build/vboxvideo -j4…(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.13.4-desktop-1omv (x86_64)
Consult /var/lib/dkms/vboxadditions/5.1.26-1/build/make.log for more information.

It’s saying it can’t find g++ maybe you should install that and see what happens,
./scripts/ line 19: g++: command not found
Just a thought

g++: command not found
sudo urpmi --no-suggests gcc-c++

Thanks for the suggestion @fedya and @Colin. However today I got to be like a regular user and let things “just work”. This is in VirtualBox LXQt only system (installed from ISO 1300). Ran 'urpmi --auto-update" with the new gcc already installed (and no kernel-release-source package) and the new kernel 4.13.5 installed and the dkms-vboxadditions modules installed auto-magically as well. The output was different from what I was used to seeing but it worked and is working just fine.

So I’ve tested this in hardware (multiple times) and once in VBox and it is all working as far as VirtualBox kernel modules for both host and guest. Yippee Kai Yea! :smiling_imp: