wiki:BuildNomDarwin

Version 2 (modified by cinc, 16 years ago) (diff)

Added instructions to get kBuild

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

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

After successfully building the compiler you should have a bin directory holding the executable (nom-idl-compiler).

/source_base/bin

NOM Kernel and Runtime

Nothing yet

Test program

The resulting executable nom-test.exe can be found in /source_base/bin.

Running it shouldn't show any errors.