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 02-20-2020, 10:56 AM   #1
Framu
Member
 
Registered: Dec 2019
Posts: 36

Rep: Reputation: Disabled
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.
 
Old 02-20-2020, 02:04 PM   #2
ReFracture
Member
 
Registered: Oct 2007
Posts: 209

Rep: Reputation: 222Reputation: 222Reputation: 222
I've never attempted a compile of this so excuse me if this is a really dumb thing to ask you but.. you did install multilib right?
 
Old 02-20-2020, 03:08 PM   #3
Framu
Member
 
Registered: Dec 2019
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReFracture View Post
I've never attempted a compile of this so excuse me if this is a really dumb thing to ask you but.. you did install multilib right?
I don't see multilib anywhere in the distro.
 
Old 02-20-2020, 03:36 PM   #4
ReFracture
Member
 
Registered: Oct 2007
Posts: 209

Rep: Reputation: 222Reputation: 222Reputation: 222
https://docs.slackware.com/slackware:multilib

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.

Happy Slacking!
 
1 members found this post helpful.
Old 02-20-2020, 04:09 PM   #5
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Framu View Post
I don't see multilib anywhere in the distro.
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.
 
1 members found this post helpful.
Old 02-20-2020, 07:07 PM   #6
Framu
Member
 
Registered: Dec 2019
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
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.

Last edited by Framu; 02-20-2020 at 07:55 PM.
 
Old 02-20-2020, 08:56 PM   #7
ReFracture
Member
 
Registered: Oct 2007
Posts: 209

Rep: Reputation: 222Reputation: 222Reputation: 222
Well PAM at least will join Slackware soon, it's currently in /testing on -current. Thanks for the update on your build adventures.
 
Old 02-21-2020, 03:40 PM   #8
Framu
Member
 
Registered: Dec 2019
Posts: 36

Original Poster
Rep: Reputation: Disabled
The latest is that it tells me it has completed the build, but there is no viable executable anywhere that I can see.

Oracle's own documentation claims I can do a make install but in fact there is no Makefile where they claim it should be.
https://www.virtualbox.org/wiki/Linu...20instructions
 
  


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] Exec format error BUT running 64 bit linux on 64 bit machine and file is ELF 64-BIT programming_in_linux Linux - Newbie 1 06-28-2019 10:20 PM
[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
VirtualBox starting as 32 bit on a 64 bit device which doesn't acknowledge the existence of a 32 bit vbox (installed 64bit) QuantumChaos Linux - Virtualization and Cloud 3 02-23-2017 06:49 AM
Need both 32 bit and 64 bit libraries gsahli Mandriva 1 08-28-2007 05:01 AM
libraries/headers locations question (compiling) shilo Slackware 1 10-04-2005 12:01 PM

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

All times are GMT -5. The time now is 12:38 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