Version 3 (modified by 17 years ago) ( diff ) | ,
---|
Building NOM on Darwin aka OS X
Note: you need an Intel machine to build and run NOM.
It's unlikely this will change in the future.
This is a first draft.
If you have problems visit the #netlabs channel on the eCS IRC network and try to catch Cinc.
Prerequisites
Macports
Macports (http://www.macports.org) has to be installed to get the necessary libraries. Download the dmg for your OS release and run the included installer. You have to supply an administrator password during installation.
The installer is supposed to add the necessary directories to your path environment variable. At least on my system this failed, maybe because I don't have any .profile file but use .bashrc and bash_profile. Try man port in a new terminal window (make sure the terminal app was not yet running). If this fails you have to add the necessary info by hand. See the Macports page for further info.
- Update your Macports installation by typing sudo port selfupdate in the terminal.
- Install GLib2 by typing sudo port install glib2.
kBuild
The build system is built on kBuild. To get it running just checkout the trunk:
svn co http://svn.netlabs.org/repos/kbuild/trunk .
Maybe this is kind of overkill but it works and you have everything to build the most recent version on your own (note that it's generally not advised to use the trunk version for production stuff).
Note that there is no need to build kBuild because the trunk is coming with binaries for your platform.
After you have kBuild just run
kBuild/env.sh
to setup the environment and you're set to compile NOM.
Compiling It
Make sure you have setup the environment by running kBuild/env.sh.
Cd into the root of NOM, the trunk directory.
Run
./kmk
Compilation should succeed without errors.
Compile a debug build
Set the following environment variable to create a debug build:
BUILD_TYPE=debug
Compile a release build
Set the following environment variable to create a debug build:
BUILD_TYPE=release
Note that release builds are default.
The output can be found here:
out/$(BUILD_TARGET).$(BUILD_TARGET_ARCH)/$(BUILD_TYPE)/kBuild/bin/$(BUILD_TARGET_ARCH).$(BUILD_TARGET)/.
Misc information
Garbage Collector
NOM uses garbage collected memory only. Go to http://www.hpl.hp.com/personal/Hans_Boehm/gc/index.html if you want to learn more about the GC. The GC will be statically linked to the NOM runtime.
IDL Compiler
The IDL compiler used for the object system is named nom-idl-compiler.
NOM Kernel and Runtime
No further info.
Test program
The executable nom-test performs some basic tests of the object system.
Running it shouldn't show any errors.