Version 54 (modified by 15 years ago) ( diff ) | ,
---|
Mac OS X build instructions
The Mac OS X port is not yet completed. These instructions are here for those who wish to help out.
Prerequisites on Mac OS X
- Mac OS X 10.4.x (Tiger), 10.5.x (Leopard) or 10.6.x (Snow Leopard) running on Intel hardware (PowerPC hardware is not supported). Please note that Tiger support was dropped with the 3.1 release.
- Xcode matching your Mac OS X version (http://developer.apple.com/tools/download/):
- 2.4.1 or later for Tiger
- 3.1.0 or later for Leopard
- 3.2.0 or later for Snow Leopard
- Some things from MacPorts (http://www.macports.org/).
After installing MacPorts, do not forget to add the following two lines to your ~/.profileexport PATH=/opt/local/bin:/opt/local/sbin:$PATH export MANPATH=/opt/local/share/man:$MANPATH
On Snow Leopard MacPorts combiles in 64 bit mode by default. Although this is no general problem, it might be a good idea to enable the universal flag as default. Therefor add +universal to /opt/local/etc/macports/variants.conf, before building anything.
Then perform the following command:
sudo port install libidl doxygenDoxygen is optional. On 10.4 & 10.5 you may need a newer OpenSSL version than the one provided by the system. If so, perform:
sudo port install openssl
- Qt/Mac (http://qt.nokia.com/downloads/mac-os-cpp)
Carbon 4.4.x upwards for Tiger
Cocoa 4.5.x upwards for Leopard/Snow Leopard
- Latex ("sudo port install teTeX") for building the documentation
Building VirtualBox
- Change to the root directory of the sources and execute the configure script:
./configure --disable-hardening
You can manually set the target architecture with --target-arch=x86 or amd64, if some architecture related problems occur.
If it finds everything it needs, it will create a file called 'AutoConfig.kmk' containing paths to the various tools on your system. Also, it will create an environment setup script called env.sh. This step only has to be done once (if something changes in your build tool setup, you might have to repeat it but keep in mind that both output files will be overwritten). For additional options like providing a path to the OpenSSL library see './configure --help'.
- Whenever you want to build VirtualBox, you have to open a shell and source the generated environment setup script 'env.sh', i.e. do
. ./env.sh
- To build type
kmk
The default is to a release build, should you wish to do a debug or profile build addBUILD_TYPE=debug
orBUILD_TYPE=profile
as argument to kmk or export it as an environment variable in your shell.
Running VirtualBox
As mentioned elsewhere, the Mac OS X port of VirtualBox is work in progress. Things might therefore not work as expected and break at random times.
- Load the kernel extension module. This can be found in
out/darwin.x86/release/dist
along with a small script (load.sh
) to load it. Execute and make sure the module loads successfully. - Enter
out/darwin.x86/release/dist/VirtualBox.app/Contents/MacOS/
. - Run
./VirtualBox