virtual box fails to compile modules - Requesting help

I am running latest Tumbleweed.

I have kernel and C/C++ build environment through respective PATTERNS. Also,complete kernel sources.

I have installed Virtualbox 5.1.14(opensuse-152 version) from their website. I am trying to compile the modules with ‘/sbin/vboxconfig’ as root.

**P.S. ** I know that is two year old version and I can install the latest TW-version which I have uninstalled as it is producing inexplicable freezes on winxp guest on serial port. Before uninstalling official VB versions, I have tried VB 6.1.2 (over current 6.0.4) from unofficial build too.Both produce the same result. But 5.1.4 had been working for me on another machine till recently. Serial port use is part of my work ]

The compilation itself generates no error till the end,but the module does not get built. I have looked up their scripts,but do not see anything amiss.I blame it on my inexpert eye.

I am attaching the install log here.[It seems I am not allowed, I only include the last part] Any help will be much appreciated. Thanks in advance.

{ cat drivers/irqchip/modules.order; cat drivers/bus/modules.order; cat drivers/phy/modules.order; cat drivers/pinctrl/modules.order; cat drivers/g
pio/modules.order; cat drivers/pwm/modules.order; cat drivers/pci/modules.order; cat drivers/video/modules.order; cat drivers/idle/modules.order; c
at drivers/char/ipmi/modules.order; cat drivers/acpi/modules.order; cat drivers/pnp/modules.order; cat drivers/amba/modules.order; cat drivers/clk/mo
dules.order; cat drivers/dma/modules.order; cat drivers/soc/modules.order; cat drivers/virtio/modules.order; cat drivers/xen/modules.order; cat dri
vers/regulator/modules.order; cat drivers/reset/modules.order; cat drivers/tty/modules.order; cat drivers/char/modules.order; cat drivers/iommu/modul
es.order; cat drivers/gpu/modules.order; cat drivers/connector/modules.order; cat drivers/lightnvm/modules.order; cat drivers/base/modules.order; c
at drivers/block/modules.order; cat drivers/misc/modules.order; cat drivers/mfd/modules.order; cat drivers/nfc/modules.order; cat drivers/dax/modules
.order; cat drivers/dma-buf/modules.order; cat drivers/macintosh/modules.order; cat drivers/scsi/modules.order; cat drivers/nvme/modules.order; cat
drivers/ata/modules.order; cat drivers/spi/modules.order; cat drivers/net/modules.order; cat drivers/message/modules.order; cat drivers/firewire/mod
ules.order; cat drivers/cdrom/modules.order; cat drivers/auxdisplay/modules.order; cat drivers/usb/modules.order; cat drivers/usb/modules.order; ca
t drivers/usb/modules.order; cat drivers/input/serio/modules.order; cat drivers/input/modules.order; cat drivers/rtc/modules.order; cat drivers/i2c/m
odules.order; cat drivers/i3c/modules.order; cat drivers/media/modules.order; cat drivers/pps/modules.order; cat drivers/ptp/modules.order; cat dri
vers/power/modules.order; cat drivers/hwmon/modules.order; cat drivers/thermal/modules.order; cat drivers/watchdog/modules.order; cat drivers/md/modu
les.order; cat drivers/isdn/modules.order; cat drivers/edac/modules.order; cat drivers/opp/modules.order; cat drivers/cpufreq/modules.order; cat dr
ivers/cpuidle/modules.order; cat drivers/mmc/modules.order; cat drivers/leds/modules.order; cat drivers/firmware/modules.order; cat drivers/crypto/mo
dules.order; cat drivers/clocksource/modules.order; cat drivers/hid/modules.order; cat drivers/staging/modules.order; cat drivers/platform/modules.or
der; cat drivers/mailbox/modules.order; cat drivers/hwspinlock/modules.order; cat drivers/soundwire/modules.order; cat drivers/virt/modules.order;
cat drivers/devfreq/modules.order; cat drivers/extcon/modules.order; cat drivers/memory/modules.order; cat drivers/powercap/modules.order; cat driver
s/perf/modules.order; cat drivers/ras/modules.order; cat drivers/hwtracing/intel_th/modules.order; cat drivers/nvmem/modules.order; cat drivers/rapid
io/modules.order; cat drivers/parport/modules.order; cat drivers/nvdimm/modules.order; cat drivers/target/modules.order; cat drivers/mtd/modules.orde
r; cat drivers/spmi/modules.order; cat drivers/hsi/modules.order; cat drivers/atm/modules.order; cat drivers/uio/modules.order; cat drivers/vfio/mo
dules.order; cat drivers/pcmcia/modules.order; cat drivers/block/aoe/modules.order; cat drivers/block/paride/modules.order; cat drivers/input/gamepor
t/modules.order; cat drivers/w1/modules.order; cat drivers/bluetooth/modules.order; cat drivers/memstick/modules.order; cat drivers/infiniband/module
s.order; cat drivers/dca/modules.order; cat drivers/ssb/modules.order; cat drivers/bcma/modules.order; cat drivers/vhost/modules.order; cat drivers
/vhost/modules.order; cat drivers/rpmsg/modules.order; cat drivers/hv/modules.order; cat drivers/iio/modules.order; cat drivers/ipack/modules.order;
cat drivers/ntb/modules.order; cat drivers/thunderbolt/modules.order; cat drivers/hwtracing/stm/modules.order; cat drivers/fpga/modules.order; cat
drivers/visorbus/modules.order; cat drivers/gnss/modules.order; cat drivers/interconnect/modules.order; :; }
| awk ‘!x$0]++’ - > drivers/modules.order
awk ‘!x$0]++’ init/modules.order usr/modules.order arch/x86/modules.order kernel/modules.order certs/modules.order mm/modules.order fs/modules.order ipc/mod
ules.order security/modules.order crypto/modules.order block/modules.order drivers/modules.order sound/modules.order include/modules.order arch/x86/pci/modul
es.order arch/x86/power/modules.order arch/x86/video/modules.order arch/x86/oprofile/modules.order net/modules.order lib/modules.order arch/x86/lib/modules.o
rder virt/modules.order > modules.order
make -f /usr/src/linux-5.4.14-1/scripts/Makefile.modpost
sed ‘s/ko$/o/’ modules.order | scripts/mod/modpost -m -a -o ./Module.symvers -s -T -
make -f /usr/src/linux-5.4.14-1/scripts/Makefile.modfinal
sh /usr/src/linux-5.4.14-1/scripts/modules-check.sh
install: cannot stat ‘vboxdrv.ko’: No such file or directory

Hi
I would suspect that it maybe old code vs new kernel (even though you output doesn’t show much), have you tried the openSUSE latest Tumbleweed version, if so then you might be better off creating a bug report, else the latest upstream version and create a bug with Oracle…

Post the full log on SUSE Paste

Confirming what Malcolm suggests, VBox 5.1.14 was meant for kernel 4.10 and it is unlikely that it will build on a 5.4 kernel in Tumbleweed. You may try the latest 5.2.36 that is apparently the first 5.xx supporting a 5.4 kernel.
Also please note that you don’t need full kernel sources (those are unconfigured unless you properly configured them) but instead the kernel-devel and kernel-default-devel packages in a version matching your running kernel.
Maybe post in the Virtualization subforum if you still have problems, to attract specialist answers from experts hanging there…

@malcolmlewis,

have you tried the openSUSE latest Tumbleweed version

Yes. Latest VB has a serial port forward issue.

@OrsoBruno,

VBox 5.1.14 was meant for kernel 4.10 and it is unlikely that it will build on a 5.4 kernel in Tumbleweed. You may try the latest 5.2.36 that is apparently the first 5.xx supporting a 5.4 kernel.

I had thought VB code is not tied to kernel version and can freely be built against any kernel. VB-5.1.14 forwarded serial port well which is out of my excperience, but VB 5.2.6 is again a ‘shoot-in-the-dark’.

I will try posting in VB forum as well as try building 5.2.6.

Thanks both.

[Re-posted here as per advise in Applications Forum]

Hello All,

I am running latest Tumbleweed.

I have kernel and C/C++ build environment through respective PATTERNS. Also,complete kernel sources.

I have installed Virtualbox 5.1.14(opensuse-152 version) from their website. I am trying to compile the modules with ‘/sbin/vboxconfig’ as root.

P.S.** I know that is two year old version and I can install the latest TW-version which I have uninstalled as it is producing inexplicable freezes on winxp guest on serial port. Before uninstalling official VB versions, I have tried VB 6.1.2 (over current 6.0.4) from unofficial build too.Both produce the same result. But 5.1.4 had been working for me on another machine till recently. Serial port use is part of my work ]

The compilation itself generates no error till the end,but the module does not get built. I have looked up their scripts,but do not see anything amiss.I blame it on my inexpert eye****.

I am attaching the install log here****. https://susepaste.org/9071220 **Any help will be much appreciated. Thanks in advance.

You asked exactly the same question and got answer on this very forum an hour ago. Any reason you repeat it again?

Install Leap 15.1 and it may build.

Your kernel is too new…

The two threads are merged to avoid confusion.

To @pbhat. Please note that double posting is not allowed. When you by incident posted in the wrong sub-forum, then please ask for it to be moved. The Triangle with ! report button below each post.

Oh,my apologies.

I don’t know that you should have a problem installing Virtualbox from the Oracle website on any current kernel (maybe, maybe not), but IIRC that is a <very> old version of Virtualbox you’re trying to install which is likely what’s causing your problem.

You have several choices…
If you want to install Virtualbox 5, you should install the latest available version (5.2.x).
If you do that, your existing VMs should probably launch without a problem but their Guest Additions will need to be upgraded to whatever version that’s necessary (included in the main download/install).

You can also install Virtualbox 6.x with all its new features and improvements.
Your VMs will also need to be upgraded but that’s usually a fairly automatic thing (When you launch the VM, you’ll be informed and suggest you upgrade), and of course your Guest Additions will also need to be upgraded.
I wouldn’t see any point to installing 6.0, you should just install the latest which is 6.1.2 as of today.

The above options are all available on the following Oracle Virtualbox Download page, if you have any questions about what is on that page or need further explanation, post again

https://www.virtualbox.org/wiki/Downloads

Besides the above options,
You can also install Virtualbox from the openSUSE repos.
If you do this, although documentation says might not be necessary I still recommend removing as much Oracle Virtualbox from your system first just so you start with a clean system with least chance of contention between the two different installs. The advantage to this option is that your Virtualbox is pre-compiled before downloading to your system, you’ll never need to compile anything. When you update your system, you’ll also update your Virtualbox automatically.
Whichever source you prefer (Install from the Oracle Virtualbox website or from the openSUSE repos), you should stick with that method and don’t mix things up unless you really know what you are doing or ask in these Forums.

IIRC and don’t know if anything has changed, the current version of Virtualbox from the openSUSE repos is 6.0, not 6.1.

Lastly,
I don’t think the log file you’re trying to post is important to your decision how to move forward but in the future when you need to post something very large, first upload (or paste into) a pastebin, then post a link to your pastebin in your Forum post.
Common pastebins people use are

www.pastebin.com
paste.opensuse.org

TSU

Thought I should add some additional…

The installation and installation choices…

  • If you want to try to continue with your existing install (not recommended, should at try latest 5.2.x if you want to stay with v5), you really do need to post your log to a pastebin because the actual root problem came long before what you posted.
  • There are at least 3 options how to install VBox from very simple/easy using a script to very controlled, manual commands. It’s hard to say what you actually did, you describe steps which might fall into the latter 2 options which although give you more control but also leave more possibility for error. The following is the Linux Install section of the VBox User Manual generally for latest VBox, but should generally apply to all versions
    https://www.virtualbox.org/manual/ch02.html#install-linux-host

IMO you should try to install VBox the easiest way first and only if you’re very certain it won’t work for you to try one of the other installation methods which won’t improve your chances of success, only identify exactly what is going wrong and then maybe fix that.

  • You say you installed all necessarry dependencies by pattern. You should check whether the following packages were installed. Note that you do not use any kernel source which would be used to build a kernel, you use kernel headers in the “devel” packages to build Loadable Kernel Modules like the Virtualbox modules
zypper si gcc make kernel-default-devel kernel-devel

The serial port problem
Don’t know how you’re implementing serial port access since today true rs-232 ports are rather uncommon. Usually a rs-232 to USB converter is involved, and if this is the case you need to have the VB Extensions installed and working in your HostOS for best support.

Generally speaking,
You should not have any problems installing any version of VBox on latest openSUSE, TW or LEAP.
That’s what or compilation of the kernel modules are supposed to do, do a custom build for whatever is in your system whether it’s new or old.

TSU

Hello
I compile the kernel modules with this command:
/usr/lib/virtualbox/vboxdrv.sh setup

Are you building Guest modules or HostOS modules?

Assuming you have whatever version of VBox installed on your HostOS and you’re building Guest modules, you’re not describing the recommended way to build your Guest modules…

  1. Install your Guest.
    1a. If you intend to manually build your Guest Modules instead of using the pre-built modules provided by openSUSE (for various reasons including you’re not running latest support VBox), then you should go into your YaST Software Manager, do a search on “virtualbox” and uncheck every package to uninstall the packages from openSUSE.

  2. Remove whatever may be in your virtual cdrom so it’s empty

  3. In the graphical console (window) menu of your Guest, click on the “Insert Guest Additions CD” or if it’s worded differently should be similar.

  4. Open your DE File Manager in your OS and click to open your CDROM

  5. Note the path to your CDROM, it should generally be similar to the following but that last part “vbox_id” will have the version of your Guest Additions.

/run/media/user_name/vbox.id/
  1. That location should have a number of “vboxrun…” executables for various different OS.
    If your Guest is Linux including openSUSE you are looking for the following command
./VBoxLinuxAdditions.run
  1. Depending on your system, you might be able to execute the command for your OS from your File Manager, but I instead recommend opening a terminal console to that location and then executing the appropriate binary.
  2. Don’t ignore the stdout in your terminal as the binary is executed… Watch for any errors. There may be non-critical errors which only mean that a particular routine will have to be invoked, but what you are watching for are any show-stopper errors, particularly anything that says “can’t be built” or similar.

The above instructions should be generic enough to apply no matter what OS your Guest may be (Windows, Linux, etc)

TSU

Thanks tsu2
i am considering installing vmware, i am reading the guide then i see if it satisfies me.
Thank you so much

OK,
But don’t shy away from this because it might seem complicated or confusing…
This particular routine will show up in a number of different installs, so it’s worth knowing.

If something is unclear or confusing,
Best to get that cleared up this time so that when the situation shows up again (needing to compile kernel modules) you’ll have this in your toolbox and can get that working quickly.

TSU