Compiling VirtualBox but need 32-bit headers and libraries
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.
Compiling VirtualBox but need 32-bit headers and libraries
I decided to try to build VirtualBox, but I've discovered that it has a special requirement for 32-bit support on my 64-bit Slackware pre-15 setup:
Code:
$ ./configure --with-qt-dir=/usr/local/Qt-5.14.1/
...
Checking for 32-bit support:
Cannot compile 32-bit applications (missing headers and/or libraries)!
Check the file /home/me/Downloads/VirtualBox-6.1.2/configure.log for detailed error information.
Check /home/me/Downloads/VirtualBox-6.1.2/configure.log for details
Does anywhere know where I can get these headers and libraries?
Here is the end of the configure log:
Code:
***** Checking 32-bit support *****
compiling the following source file:
#include <stdint.h>
int main(void)
{
return 0;
}
using the following command line:
gcc -m32 -O -Wall -o /home/me/Downloads/VirtualBox-6.1.2/.tmp_out /home/me/Downloads/VirtualBox-6.1.2/.tmp_src.c
In file included from /usr/include/features.h:474,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdint.h:26,
from /usr/lib64/gcc/x86_64-slackware-linux/9.2.0/include/stdint.h:9,
from /home/me/Downloads/VirtualBox-6.1.2/.tmp_src.c:1:
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
7 | # include <gnu/stubs-32.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
Slackware64 is a pure 64 bit operating system, not just in the sense that you cannot run it on x86 only CPUs but in the sense that it completely lacks support for it, there isn't a single 32 bit library. Have a read at the slackware doc referenced, it's not too much work to setup and maintain multilib. It's one of the first things I do on a fresh Slackware64 install.
This is only necessary because VirtualBox has a lot of 32 bit underpinnings, what with a major function being the ability to run 32 bit operating systems.
Multilib is not included in the distro but as a 3rd-party add-on provided by Alien Bob (who is a core Slackware team member). But some software is going to require 32bit support. For VirtualBox, the README on SBo states the following:
Code:
On x86_64, this by default builds without software virtualization. This
means you need hardware virtualization in order to run 32bit guests on
64bit hosts. To enable software virtualization, pass
SOFTWARE_VIRTUALIZATION=yes to the script. Note that this will require
a compiler that can generate 32bit code, and thus will not build on a
stock x86_64 system. This switch has no effect on x86 systems.
Looking through the SlackBuild, if you want to prevent software virtualization (thus, not requiring multilib), you would need to pass --disable-vmmraw to the ./configure when building VirtualBox, otherwise, you'd need to follow the instructions ReFracture posted above me to get multilib installed.
Looking through the SlackBuild, if you want to prevent software virtualization (thus, not requiring multilib), you would need to pass --disable-vmmraw to the ./configure when building VirtualBox, otherwise, you'd need to follow the instructions ReFracture posted above me to get multilib installed.
That helps thanks. I did follow the advice and I installed multilib, just in case I want to run something 32-bit like ReactOS.
For anyone interested in building Virtualbox, some notes:
- I did run into issues with Qt5-- Virtualbox required a component that my fresh build of Qt didn't have, so I have disabled Qt.
- Similarly the Java part of the build is broken so I disabled that.
- Don't build the documentation-- it tried to download files that don't exist.
- Virtualbox expects makeself and PAM to be there, which Slackware didn't have and these have to be installed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.