virtualbox-host-dkms: Compile only for GCC kernels: module freezes clang kernels 22 November 2024, 16:27:55 Ahoj,according to this comment from VirtualBox upstream:QuoteWe do not officially support CLANG on Linux host (only GCC is supported).clang compiled Linux kernels are not supported by the VirtualBox host kernel modules.And I experience kernel freeze when I actually do that.So I suggest to add some logic to the virtualbox PKGBUILD that the package virtualbox-host-dkms only compiles a module for Linux kernels compiled with gcc, not with clang.Regards!
Re: virtualbox-host-dkms: Compile only for GCC kernels: module freezes clang kernels Reply #1 – 22 November 2024, 18:43:14 I don't know if I get it right, but we're already using gcc. You can check on the same PKGBUILD you left on the link.marzosh
Re: virtualbox-host-dkms: Compile only for GCC kernels: module freezes clang kernels Reply #2 – 23 November 2024, 00:17:54 Quote from: marzosh – on 22 November 2024, 18:43:14I don't know if I get it right, but we're already using gcc. You can check on the same PKGBUILD you left on the link.I mean when someone has a custom compiled kernel, and has this compiled using CLANG.As I have.And then install virtualbox-host-dkms.It then, _after_ installing the package, builds virtualbox host modules via DKMS also for CLANG compiled kernels, and it builds them with CLANG.And when I then launch a VirtualBox VM, the system hard-freezes.
Re: virtualbox-host-dkms: Compile only for GCC kernels: module freezes clang kernels Reply #3 – 23 November 2024, 02:50:45 Briefly looking, this seems like upstream and intended behavior by dkms If it detects that the kernel is compiled with clang, it will use clang for dkms so nothing in that package would change this.I'm not even sure if what you are attempting would even work anyway. I thought all modules need to be compiled by the same compiler. At the very least, I know things go wrong if gcc versions mismatch so mixing clang and gcc sounds like a recipe for failure. If you need this module, I would suggest just sticking to gcc for your kernel. But regardless, this is beyond our control AFAIK. Artix is a gnu distro so we use gcc for everything by default.
Re: virtualbox-host-dkms: Compile only for GCC kernels: module freezes clang kernels Reply #4 – 24 November 2024, 15:18:44 Quote from: Dudemanguy – on 23 November 2024, 02:50:45Briefly looking, this seems like upstream and intended behavior by dkms If it detects that the kernel is compiled with clang, it will use clang for dkms so nothing in that package would change this.This is correct, and the resulting module makes the system freeze once a virtual machine is launched.Quote from: Dudemanguy – on 23 November 2024, 02:50:45I'm not even sure if what you are attempting would even work anyway. I thought all modules need to be compiled by the same compiler.Yes.What I want to achieve is that the module should not build at all in the clang case.Here is a report to Arch Linux' official extra/virtualbox-host-dkms package with a patch suggestion for that package. It should result in that the host modules are only build if the kernel is compiled with gcc, and not built at all otherwise. Last Edit: 24 November 2024, 20:27:38 by dreieck
Re: virtualbox-host-dkms: Compile only for GCC kernels: module freezes clang kernels Reply #5 – Yesterday at 16:36:06 Quote from: dreieck – on 24 November 2024, 15:18:44Here is a report to Arch Linux' official extra/virtualbox-host-dkms package with a patch suggestion for that package.Arch Linux has added it in a much more elegant way:They addedCode: [Select]BUILD_EXCLUSIVE_CONFIG="CONFIG_CC_IS_GCC"to the dkms.conf.
Re: virtualbox-host-dkms: Compile only for GCC kernels: module freezes clang kernels Reply #6 – Today at 03:28:25 Hi, dreieck. Ok, I pushed another version to gremlins with that fix.Can you test it, please? Thx.marzosh