LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-07-2022, 08:31 PM   #1
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Rep: Reputation: Disabled
VirtualBox kernel module compilation failure


Today I installed the 5.18.2 kernel files that were added to "testing". Everything seems to work fine except compiling the kernel module for VirtualBox. My normal way of doing this is to run the "virtualbox-kernel" Slackbuild after rebooting with a new kernel. Today, for the first time ever, I got the following error:
Code:
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxdrv/generic/uuid-generic.o
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxdrv/VBox/log-vbox.o
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxdrv/common/alloc/heapsimple.o
  LD [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxdrv/vboxdrv.o
  MODPOST /tmp/SBo/virtualbox-kernel-6.1.32/vboxdrv/Module.symvers
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxdrv/vboxdrv.mod.o
  LD [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxdrv/vboxdrv.ko
make[2]: Leaving directory '/usr/src/linux-5.18.2'
make[1]: Leaving directory '/tmp/SBo/virtualbox-kernel-6.1.32/vboxdrv'

=== Building 'vboxnetflt' module ===
make[1]: Entering directory '/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt'
make V= CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C /lib/modules/5.18.2/build M=/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt SRCROOT=/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt -j4 modules
make[2]: Entering directory '/usr/src/linux-5.18.2'
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/linux/VBoxNetFlt-linux.o
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/VBoxNetFlt.o
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/SUPR0IdcClient.o
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/SUPR0IdcClientComponent.o
  CC [M]  /tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/linux/SUPR0IdcClient-linux.o
/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/linux/VBoxNetFlt-linux.c: In function ‘vboxNetFltPortOsXmit’:
/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/linux/VBoxNetFlt-linux.c:2314:23: error: implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration]
 2314 |                 err = netif_rx_ni(pBuf);
      |                       ^~~~~~~~~~~
      |                       netif_rx
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:288: /tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
make[2]: *** [Makefile:1834: /tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt] Error 2
make[2]: Leaving directory '/usr/src/linux-5.18.2'
make[1]: *** [/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/Makefile-footer.gmk:117: vboxnetflt] Error 2
make[1]: Leaving directory '/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt'
make: *** [Makefile:65: vboxnetflt] Error 1

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?:
I am not enough of a (current) programmer to be able to figure out what to do with this, so any help will be appreciated.
Tomorrow morning, I will possibly install the 5.17.13 kernel that also came out today, just to see if it will work.
Thanks,
Bill
 
Old 06-08-2022, 04:10 AM   #2
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 456

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
You could try switching to the latest "testing" version of VirtualBox for the 5.18.x kernels. This LQ thread is a good reference for VB-related stuff on Slackware in general.
 
Old 06-08-2022, 05:31 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,610
Blog Entries: 19

Rep: Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458
Or you could try modifying your slackbuild. There will be a --werror option somewhere on the compile command. It's usually there for a reason but you could try taking it out experimentally.
 
Old 06-09-2022, 05:12 AM   #4
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,976

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
This won't help much with your SlackBuild. I am using the blob, I am also getting those errors with kernel 5.18.2 with version VirtualBox 6.1.34.

I switched the the latest test build and all is well. The test build I am using now is 6.1.35-151573, Extension Pack 6.1.35-151571

https://www.virtualbox.org/wiki/Testbuilds
 
Old 06-10-2022, 02:28 PM   #5
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
Or you could try modifying your slackbuild. There will be a --werror option somewhere on the compile command. It's usually there for a reason but you could try taking it out experimentally.
Thanks for the suggestion, but the virtualbox-kernel module is not compiled. All of the code would have to be searched to find werror. That would be a recipe for disaster in my case! But I really do appreciate the attempt.
 
Old 06-10-2022, 03:01 PM   #6
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Original Poster
Rep: Reputation: Disabled
pghvlaans & chrisretusn:
I did wind up with the 5.18.2 kernel & installed the test build, 6.1.35-151573, as suggested. Something is amiss, however, when I start the program, I get this:
Code:
bill@kirk:~
$ /opt/VirtualBox/VirtualBox

(process:9256): GLib-GObject-WARNING **: 14:53:51.418: cannot register existing type 'NMAgentManagerError'

(process:9256): GLib-CRITICAL **: 14:53:51.418: g_once_init_leave: assertion 'result != 0' failed

(process:9256): GLib-GObject-WARNING **: 14:53:51.418: cannot retrieve class for invalid (unclassed) type '<invalid>'
Segmentation fault
bill@kirk:~
$
I assume that "Segmentation fault" implies a broken download. I will redownload & reinstall shortly.
Thanks a lot.
Bill
 
Old 06-10-2022, 03:04 PM   #7
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
That error cropped up in another thread a while ago, and the solution was to run:
Code:
VBoxManage setextradata global GUI/UpdateDate never
 
Old 06-10-2022, 03:15 PM   #8
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Original Poster
Rep: Reputation: Disabled
Sorry, duplicate post.
 
Old 06-10-2022, 03:25 PM   #9
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by brianL View Post
That error cropped up in another thread a while ago, and the solution was to run:
Code:
VBoxManage setextradata global GUI/UpdateDate never
Thanks! That got things going. Now my virtual machine will not start, because I had the Extension Pack installed in it, but not the new version, yet. That will be easy. I'll post results.
Bill
 
Old 06-10-2022, 03:27 PM   #10
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 977

Rep: Reputation: 666Reputation: 666Reputation: 666Reputation: 666Reputation: 666Reputation: 666
Quote:
Originally Posted by TSquaredF View Post
the virtualbox-kernel module is not compiled.
This is the tricky part with third party kernel modules. They do have to match the source of the kernel. In short you have 3 choices:

1) Choose a kernel version that matches your virtualbox
2) Choose a virtualbox version that matches your kernel
3) Chose a kernel module that ships with your kernel (kvm) and replace virtualbox with something that uses kvm instead (like qemu).

regards Henrik
 
Old 06-11-2022, 08:42 AM   #11
amikoyan
Member
 
Registered: Mar 2021
Distribution: Slackware64 -current
Posts: 316

Rep: Reputation: 169Reputation: 169
I didn't see this post until too late, so this is also posted on https://www.linuxquestions.org/quest...9/page338.html with a solution that worked for me.

Quote:
Originally Posted by amikoyan View Post
virtualbox-kernel (6.1.32) sbo does not build on -current.

Code:
/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/linux/VBoxNetFlt-linux.c: In function ‘vboxNetFltPortOsXmit’:
/tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/linux/VBoxNetFlt-linux.c:2314:23: error: implicit declaration of function ‘netif_rx_ni’; did you mean ‘netif_rx’? [-Werror=implicit-function-declaration]
 2314 |                 err = netif_rx_ni(pBuf);
      |                       ^~~~~~~~~~~
      |                       netif_rx
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:288: /tmp/SBo/virtualbox-kernel-6.1.32/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
A fix was to download the slackbuild and virtualbox-kernel (6.1.32) source from slackbuilds.org and untar source, then edit virtualbox-kernel-6.1.32/vboxnetflt/linux/VBoxNetFlt-linux.c line 2314 to say 'err = 'netif_rx(pBuf)' (ie exactly what the error message says). It then built from the slackbuild and is working fine.
 
1 members found this post helpful.
Old 06-11-2022, 11:48 AM   #12
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,976

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by TSquaredF View Post
Thanks! That got things going. Now my virtual machine will not start, because I had the Extension Pack installed in it, but not the new version, yet. That will be easy. I'll post results.
Bill
I am not seeing that segmentation fault.

I just assumed (dislike that word ) that because VirtualBox successfully installed, it would work. Today I got an error when after starting my Slackware64 virtual machine. I came here to post about it, then read your post.

Extension Pack!

LOL I forgot to upgrade it. All is well. Just thought I'd post this for amusement.
 
Old 06-11-2022, 12:10 PM   #13
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 564

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrisretusn View Post
I am not seeing that segmentation fault.

I just assumed (dislike that word ) that because VirtualBox successfully installed, it would work. Today I got an error when after starting my Slackware64 virtual machine. I came here to post about it, then read your post.

Extension Pack!

LOL I forgot to upgrade it. All is well. Just thought I'd post this for amusement.
Yes, that kind of thing happens. It seems to happen to me more & more as I have slipped past 75. I guess I'll keep having senior moments! I'll mark this solved. Great thanks to all.
Regards,
Bill
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] virtualbox is installed along with virtualbox-dkms and virtualbox-ext-pack and linux-headers-generic, but error for no /dev/vboxdrv Astral Axiom Linux - Software 2 03-04-2019 08:09 PM
Failing to compile VirtualBox module on custom module vladimir1986 Slackware 3 08-12-2016 03:32 PM
[SOLVED] Failure after failure after failure.....etc 69Rixter Linux - Laptop and Netbook 5 04-14-2015 09:58 AM
Module compilation needs kernel header files or kernel sources? baxzius Linux - Newbie 2 08-04-2011 04:12 PM
nvidia module compilation failure General Failure Slackware 14 03-25-2007 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration