On 13/09/16 16:03, Laurentiu Pancescu wrote:
The advice from #vbox-dev is to install the Guest Additions in a VM using their installer on the .iso image they provide. This should leave all the necessary sources and Makefiles for building the kernel modules in /usr/src, which I could use for the RPMs instead of the original source.
Over the last few days, I installed the Guest Additions in a Vagrant box and took a closer look at the installer. The source for the kernel modules that it copies in /usr/src compiles without any issues on both CentOS 6 and 7 and doesn't even require kBuild like the regular build process.
Besides the kernel modules' source, the Guest Additions .iso delivers a few binaries, precompiled for i386 and x86_64, as well as a quite extensive runtime, implementing memory allocation, pseudo-random numbers, math routines, a crypto library, etc. [1] We are unable to compile the userland on CentOS due to the unfixed bug in GCC 4.8 (which seems to be triggered by our own kernel headers, not the VirtualBox source), as well as having kernels older than 3.11. Vagrant's check for the guest additions still passes if I remove the userland files, but the shared folders stop working - having just the kernel modules is not enough.
Regards, Laurențiu
[1] https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Runtime/common