How to Build VirtualBox on Linux

When I first tried to build VirtualBox, the configure script returned a number of errors: missing as86, missing IDL, missing SDL, and so on. I had to add these packages on a Mandriva system (and see this page for how to add and manage packages):

dev86
iasl
libIDL-config
lib64IDL2-devel
libcurl-devel
lib64SDL
lib64SDL-devel
lib64python2.6-devel
makeself 

That allowed the configure script to run, but now the next step failed:

% make kmk
[ ... much output deleted ... ]
/usr/bin/ld: cannot find -lstdc++

Depending on the sequence of events, the missing libraries may be listed as -lcrypt, -lpthread, etc., even though /lib64 and /usr/lib64 contain libcrypto.so*.

But the libstdc++-devel package is installed...

I eventually realized that I needed the libstdc++-static-devel package. After installing that and re-running the configure script I got a different error. Actually a bunch of errors along these general lines:

/home/cromwell/VirtualBox-4.1.8_OSE/src/libs/xpcom18a4/java/src/nsJavaXPCOMBindingUtils.cpp:57:
		error: 'jclass' does not name a type

My solution was to solve the problem by avoiding it:

% ./configure --disable-java
% kmk all 

That cleanly built the VirtualBox binaries. Then I was able to build and install the Linux kernel module:

% out/linux.amd64/release/bin/src
% make
% su
Password: ################
# make install
# for f in VirtualBox VBoxHeadless VBoxSDL VBoxBFE VBoxNetDHCP VBoxNetAdpCtl; do
>    chown root.root $f
>    chmod 4511 $f
>  done 

Now I can run virtual machines with VirtualBox!

% ~/VirtualBox-4.1.8_OSE/bin/VirtualBox & 

VMware Networking

How to install the QEMU emulator and Linux on a USB device, so you can run Linux within a window on a hosting machine running Linux or BSD or Windows

How to install and run Windows within the QEMU emulator on an OpenBSD or Linux desktop

Back to the Unix page...

Click here to inquire about advertising on this or any page on this site.
Home Unix/Linux Networking Cybersecurity Travel Technical Radio Site Map Contact


Use /bin/vi! Manipulate images with ImageMagick! Hosted on OpenBSD
Hosted on Apache This site is viewable with any browser Valid XHTML 1.0! Valid CSS!
© Bob Cromwell May 2012. Created with /bin/vi and ImageMagick, hosted on OpenBSD with Apache.    Root password available here, privacy policy here.