LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   cannot build virtualbox-kernel-5.0.40 in -current (https://www.linuxquestions.org/questions/slackware-14/cannot-build-virtualbox-kernel-5-0-40-in-current-4175625306/)

tramni1980 03-10-2018 01:48 AM

cannot build virtualbox-kernel-5.0.40 in -current
 
Hello,
I am running Slackware64-current with kernel 4.14.24. I cannot install the
virtualbox-kernel-5.0.40 package because of the following compilation errors:
Code:

*** Building 'vboxdrv' module ***
make[1]: Entering directory '/tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv'
make KBUILD_VERBOSE= SUBDIRS=/tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv SRCROOT=/tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv CONFIG_MODULE_SIG= -C /lib/modules/4.14.24/build modules
make[2]: Entering directory '/usr/src/linux-4.14.24'
  CC [M]  /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrv.o
  CC [M]  /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvGip.o
In file included from ./include/linux/atomic.h:5:0,
                from ./include/linux/jump_label.h:186,
                from ./arch/x86/include/asm/string_64.h:6,
                from ./arch/x86/include/asm/string.h:5,
                from ./include/linux/string.h:19,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/include/iprt/string.h:37,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/linux/../SUPDrvInternal.h:43,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/linux/SUPDrv-linux.c:32:
./arch/x86/include/asm/atomic.h: In function ‘atomic_try_cmpxchg’:
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
  return try_cmpxchg(&v->counter, old, new);
  ^~~~~~
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
In file included from ./arch/x86/include/asm/atomic.h:276:0,
                from ./include/linux/atomic.h:5,
                from ./include/linux/jump_label.h:186,
                from ./arch/x86/include/asm/string_64.h:6,
                from ./arch/x86/include/asm/string.h:5,
                from ./include/linux/string.h:19,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/include/iprt/string.h:37,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/linux/../SUPDrvInternal.h:43,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/linux/SUPDrv-linux.c:32:
./arch/x86/include/asm/atomic64_64.h: In function ‘atomic64_try_cmpxchg’:
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
  return try_cmpxchg(&v->counter, old, new);
  ^~~~~~
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
  CC [M]  /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvSem.o
In file included from ./include/linux/atomic.h:5:0,
                from ./include/linux/jump_label.h:186,
                from ./arch/x86/include/asm/string_64.h:6,
                from ./arch/x86/include/asm/string.h:5,
                from ./include/linux/string.h:19,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/include/iprt/string.h:37,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvInternal.h:43,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrv.c:33:
./arch/x86/include/asm/atomic.h: In function ‘atomic_try_cmpxchg’:
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
  return try_cmpxchg(&v->counter, old, new);
  ^~~~~~
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
In file included from ./arch/x86/include/asm/atomic.h:276:0,
                from ./include/linux/atomic.h:5,
                from ./include/linux/jump_label.h:186,
                from ./arch/x86/include/asm/string_64.h:6,
                from ./arch/x86/include/asm/string.h:5,
                from ./include/linux/string.h:19,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/include/iprt/string.h:37,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvInternal.h:43,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrv.c:33:
./arch/x86/include/asm/atomic64_64.h: In function ‘atomic64_try_cmpxchg’:
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
  return try_cmpxchg(&v->counter, old, new);
  ^~~~~~
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
In file included from ./include/linux/atomic.h:5:0,
                from ./include/linux/jump_label.h:186,
                from ./arch/x86/include/asm/string_64.h:6,
                from ./arch/x86/include/asm/string.h:5,
                from ./include/linux/string.h:19,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/include/iprt/string.h:37,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvInternal.h:43,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvGip.c:33:
./arch/x86/include/asm/atomic.h: In function ‘atomic_try_cmpxchg’:
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
  return try_cmpxchg(&v->counter, old, new);
  ^~~~~~
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
In file included from ./arch/x86/include/asm/atomic.h:276:0,
                from ./include/linux/atomic.h:5,
                from ./include/linux/jump_label.h:186,
                from ./arch/x86/include/asm/string_64.h:6,
                from ./arch/x86/include/asm/string.h:5,
                from ./include/linux/string.h:19,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/include/iprt/string.h:37,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvInternal.h:43,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvGip.c:33:
./arch/x86/include/asm/atomic64_64.h: In function ‘atomic64_try_cmpxchg’:
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
  return try_cmpxchg(&v->counter, old, new);
  ^~~~~~
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
In file included from ./include/linux/atomic.h:5:0,
                from ./include/linux/jump_label.h:186,
                from ./arch/x86/include/asm/string_64.h:6,
                from ./arch/x86/include/asm/string.h:5,
                from ./include/linux/string.h:19,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/include/iprt/string.h:37,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvInternal.h:43,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvSem.c:33:
./arch/x86/include/asm/atomic.h: In function ‘atomic_try_cmpxchg’:
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
  return try_cmpxchg(&v->counter, old, new);
  ^~~~~~
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:193:2: error: undefined named operand ‘new’
In file included from ./arch/x86/include/asm/atomic.h:276:0,
                from ./include/linux/atomic.h:5,
                from ./include/linux/jump_label.h:186,
                from ./arch/x86/include/asm/string_64.h:6,
                from ./arch/x86/include/asm/string.h:5,
                from ./include/linux/string.h:19,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/include/iprt/string.h:37,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvInternal.h:43,
                from /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvSem.c:33:
./arch/x86/include/asm/atomic64_64.h: In function ‘atomic64_try_cmpxchg’:
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
  return try_cmpxchg(&v->counter, old, new);
  ^~~~~~
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:183:2: error: undefined named operand ‘new’
make[3]: *** [scripts/Makefile.build:320: /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvSem.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:320: /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrvGip.o] Error 1
make[3]: *** [scripts/Makefile.build:320: /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/SUPDrv.o] Error 1
make[3]: *** [scripts/Makefile.build:320: /tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** [Makefile:1508: _module_/tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv] Error 2
make[2]: Leaving directory '/usr/src/linux-4.14.24'
make[1]: *** [Makefile:299: vboxdrv] Error 2
make[1]: Leaving directory '/tmp/SBo/virtualbox-kernel-5.0.40/vboxdrv'
make: *** [Makefile:40: all] Error 2

Any sugestions will be appreciated.

Best regards,
Martin

business_kid 03-10-2018 02:46 AM

To compile virtual box-like them I always had to put the config of the kernel I was running in the kernel source and run
Code:

make clean && make
. Then don't do a make clean

That said, your problems appear to be with
./arch/x86/include/asm/atomic.h which is probably a kernel header file. Have you tried updating the kernel headers?
Code:

make headers_install
does it, iirc. You can always install the package over it again if needed.

tramni1980 03-10-2018 03:15 AM

Hi,
thank you for your reply. I do not understand, how can I update the headers, when they are the latest that came with the new 4.14.24 kernel? Aren't they already updated?

business_kid 03-10-2018 04:16 AM

Linux copy or install commands from the terminal simply overwrite the existing file.

You can do it with packages if you can find them. Otherwise, install old headers where the files exist,followed by a 'make headers_install' from the new That should work. Your headers will be out of synch with your installed package, but I imagine that the sky will not fall in.

EDIT: Do not use upgradepkg in slackware which deletes the old package. Use installing and install both. I would use an old headers package and run the 'make headers_install' with an old package containing your missing firmware installed. Do not install the 'current' firmware or use upgradepkg to install the old headers.

bassmadrigal 03-10-2018 10:53 PM

Personally, I would just recommend using the installer to install the latest 5.2.x version. It is designed to work with these newer kernels. Normally, I prefer to use the SlackBuilds from SBo, but trying to get it to work with a newer kernel was really frustrating, so I eventually just switched to using their installer, and it worked great with no fuss.

Grab the AMD64 "All distributions" version from their download page and then run the installer as root in the terminal.

tramni1980 03-13-2018 03:22 AM

Thank you very much for your replies. As I hate having orphan files on my system, I guess I have no choice but wait until the next stable release of Slackware comes, so that I can use the slackbuilds to build the virtualbox driver and the additional packages. I only use current now, because my laptop is new and the kernels in the stable Slackware releases do not support it.

linuxbawks 03-13-2018 06:31 PM

It is possible to build it on -14.2. I only just did it recently. The finicky mature of the SB process allows one to forget.

bassmadrigal 03-13-2018 07:05 PM

Quote:

Originally Posted by linuxbawks (Post 5830717)
It is possible to build it on -14.2. I only just did it recently. The finicky mature of the SB process allows one to forget.

OP stated they are running -current due to the newer kernels. The SlackBuild for 14.2 fails if you're using a more modern kernel, so OP either needs to use the installer for a more recent version of VirtualBox, downgrade to 14.2 (which they can't due to needing the newer hardware support the newer kernels bring), or not use it until the SlackBuild is updated.


All times are GMT -5. The time now is 09:53 AM.