[SOLVED] Slackware 14.2 64bit, virtualbox-kernel fails to build.;
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Slackware 14.2 64bit, virtualbox-kernel fails to build.;
Yesterday I had a new graphics card installed in my computer. I've got a Windows 7 installation on virtualbox that I booted up yesterday and installed new updates in preparation for the new card being installed. When I booted my computer after the graphics card was installed, virtualbox gripes about vboxdrv not being found. I tried to rebuild it, but the build fails. Here's the build phase:
Code:
virtualbox-kernel-5.0.30/vboxnetflt/math/gcc/udivdi3.c
virtualbox-kernel-5.0.30/vboxnetflt/math/gcc/divdi3.c
virtualbox-kernel-5.0.30/vboxnetflt/math/gcc/umoddi3.c
virtualbox-kernel-5.0.30/vboxnetflt/math/gcc/moddi3.c
virtualbox-kernel-5.0.30/vboxnetflt/SUPDrvIDC.h
*** Building 'vboxdrv' module ***
make[1]: Entering directory '/tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv'
make KBUILD_VERBOSE= SUBDIRS=/tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv SRCROOT=/tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv CONFIG_MODULE_SIG= -C /lib/modules/4.9.26/build modules
make[2]: Entering directory '/usr/src/linux-4.9.26'
CC [M] /tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv/linux/SUPDrv-linux.o
In file included from ./arch/x86/include/asm/acpi.h:33:0,
from ./arch/x86/include/asm/fixmap.h:19,
from ./arch/x86/include/asm/apic.h:11,
from ./arch/x86/include/asm/smp.h:12,
from ./include/linux/smp.h:59,
from ./include/linux/topology.h:33,
from ./include/linux/gfp.h:8,
from ./include/linux/slab.h:14,
from /tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv/linux/../SUPDrvInternal.h:104,
from /tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv/linux/SUPDrv-linux.c:32:
./arch/x86/include/asm/realmode.h: In function ‘real_mode_size_needed’:
./arch/x86/include/asm/realmode.h:66:9: error: implicit declaration of function ‘ALIGN’ [-Werror=implicit-function-declaration]
return ALIGN(real_mode_blob_end - real_mode_blob, PAGE_SIZE);
^
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:294: /tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** [Makefile:1490: _module_/tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv] Error 2
make[2]: Leaving directory '/usr/src/linux-4.9.26'
make[1]: *** [Makefile:298: vboxdrv] Error 2
make[1]: Leaving directory '/tmp/SBo/virtualbox-kernel-5.0.30/vboxdrv'
make: *** [Makefile:40: all] Error 2
virtualbox-kernel:
Would you like to continue processing the rest of the
queue or would you like to abort? If this failed
package is a dependency of another package in the queue
then it may not make sense to continue.
(Y)es to continue, (N)o to abort, (R)etry the build?:
What can I do to make this thing build correctly? Thank you in advance for any advice you can offer in resolving this.
This is the bug #16286, which has been fixed in VirtualBox 5.0.32 (released 2017-01-17). Upgrade to the most recent bug fix release of the 5.0 branch (5.0.40 at time of writing) or preferably 5.1.22 as the 5.1 branch is actively maintained whilst the 5.0 branch will only receive security fixes from now.
Last edited by Didier Spaier; 05-14-2017 at 03:26 PM.
I have 5.0.30. I'm still trying to learn the Slackware culture, and I've been told by many experienced Slackware users that if I want something, I should get it through either slackpkg or sbopkg. slackpkg doesn't even offer virtualbox, while sbopkg only offers 5.0.30. Please advise if there is a way around this or if there is a way to have this thread moved to the Slackware subforum of the Distributions forum.
And yes this thread would better fit in the Slackware forum. Just click on the Report button at the bottom of your initial post then request a moderator to move it.
Last edited by Didier Spaier; 05-15-2017 at 07:06 AM.
OK. I found a fix at https://www.virtualbox.org/changeset/64872/vbox, but I can seem to Control+Z the build fast enough to extract the files and make the necessary changes, then resume the build before it fails again. Is there an easier way to do this?
I think you just need the below in your SlackBuild, just right before the make is called.
Code:
# Fix Linux 4.9 compiling
sed -ie '92,94d' vboxdrv/SUPDrvInternal.h
I posted about this in the SBo Scripts for -current thread. I only mentioned it there because only -current has the 4.9 kernel, but any other versions of Slackware running that kernel would also be affected by this issue.
I have 5.0.30. I'm still trying to learn the Slackware culture, and I've been told by many experienced Slackware users that if I want something, I should get it through either slackpkg or sbopkg. slackpkg doesn't even offer virtualbox, while sbopkg only offers 5.0.30.
When I used Vbox I never had a problem installing the file available at the official website. Just download and run. Same with the Nvidia driver - I never used the slackbuild. Always the file available at nvidia.com. And never a problem. If you keep track of the software you install this way there's no reason not to use this method. I've had problems with slackbuilds so the advice to use just them is absurd. Use what works. That is the Slackware culture.
Last edited by Gerard Lally; 05-17-2017 at 10:57 AM.
I've had problems with slackbuilds so the advice to use just them is absurd. Use what works.
I can understand the desire to keep everything tracked by pkgtool. That is why I personally use SlackBuilds for everything I can (including VirtualBox, which is why I created that patch when I upgraded my 14.1 system to 4.9). Yes, sometimes installers work well enough that you can use them on Slackware, but some may break your system if not handled properly... and if you're not someone familiar with Linux and/or Slackware components, it could be very difficult to restore your system without installing. Not to mention the difficulty of removing some of those programs not installed with pkgtool.
This user is already using a newer kernel than what's included in Slackware 14.1, which is why this issue presented itself. On a stock 14.1 system, the virtualbox and virtualbox-kernel SlackBuilds work fine. So, for someone who has installed a newer kernel, it may not be bad if they use an installer instead of a SlackBuild, but that isn't the case for everyone.
But I know this opinion is not shared by everyone on the forum. Some feel it's perfectly acceptable to use installers, while others despise them and will only use Slackware packages. This will likely always be something that is debated on in the forum.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.