My favorites | Sign in
Project Logo
                
Search
for
Updated Oct 24, 2007 by vrehorst
BuildInstructions  
How to build Einstein

General remarks

Einstein relies on K which is available on sourceforge. It is built using Xcode or Perforce Jam.

For now, Einstein ROM Extension can only be built using Apple Newton C++ Tools and Apple Newton ToolKit, available on UNNA as part of the NewtonDev environment and running in MacOS 9 (I actually use Classic and toolserver(1)).

For your convenience, a binary of the Einstein REX is available under the _Data_/ directory.

Building on MacOS X, for MacOS X, using Xcode

  1. Get latest Xcode from Apple Connection website and install it with 10.3.9 and 10.4u cross-SDKs (this is the default).
  2. Get K (preferably from CVS) at http://sourceforge.net/projects/KLibs/
  3. Tell Xcode where to find K by defining a K source tree (in the preferences). On my system, K is set to /Users/paul/Bibliotheques/K/ and I did a cvs co inside /Users/paul/Bibliotheques/
  4. Open the Einstein Xcode project.
  5. Choose your target (I suggest Einstein.app)
  6. Click build.

Building on Unix (including MacOS X) and Cygwin, as a native build, using Jam

  1. Install Jam 2.5. Not btjam, not ftjam, regular jam. You can get it from MacPorts on MacOS X. On Ubuntu, the debian package jam is fine. You can also compile it from source: ftp://ftp.perforce.com/pub/jam/jam-2.5.zip
  2. Make sure you have {{libstdc++-devel}} installed as well.
  3. Get K (preferably from CVS) at http://sourceforge.net/projects/KLibs/
  4. Compile K with Jam with cd <path_to_K>/_Build_/Jam/ && jam
  5. Get libffi. On MacOS X, I suggest getting with MacPorts. There seem to be pre-built copies for various platforms in the Einstein project in svn too.
  6. Compile Einstein with Jam with cd <path_to_einstein>/_Build_/Jam/ && jam -sK=<path_to_K> or cd <path_to_einstein>/_Build_/Jam/ && jam -sK=<path_to_K> -sC++FLAGS=-I/path/to/libffi/include -sCCFLAGS=-I/path/to/libffi/include -sLINKFLAGS=-I/path/to/libffi/include if libffi isn't installed in a standard path that the compiler will find. For example:
jam -sjittarget=generic -sC++FLAGS="-I/usr/local/include -I/root/einstein/Einstein/libffi-linux/include/ -L/root/einstein/Einstein/libffi-linux/lib" -sCCFLAGS="-I/usr/local/include -I/root/einstein/Einstein/libffi-linux/include/ -L/root/einstein/Einstein/libffi-linux/lib"  -sK=/root/K/

Notes

If you got libffi with MacPorts as suggested, you don't need to specify its path on the command line. You will very probably need to edit the Jamfile to cope with your target.

On Unix (including MacOS X), as cross build, using Jam

The general method is the following:

  1. Install Jam 2.5. Not btjam, not ftjam, regular jam. You can get it from MacPorts on MacOS X. On Ubuntu, the debian package jam is fine. You can also compile it from source: ftp://ftp.perforce.com/pub/jam/jam-2.5.zip
  2. Get K (preferably from CVS) at http://sourceforge.net/projects/KLibs/
  3. Edit K's Jamfile so it will work with your setup.
  4. Compile K with Jam with cd <path_to_K>/Build/Jam/ && jam -starget=<cross_target>
  5. Edit Einstein's Jamfile so it will work with your setup.
  6. Compile Einstein with Jam with cd <path_to_einstein>/Build/Jam/ && jam -sK=<path_to_K> -starget=<cross_target>

How I built cross-binaries

  • OpenZaurus 3.4.5: with crosstool compilers, cf OpenZaurusBuildInstructions.
  • Nokia 770 OS 2005: with crosstool compilers (built with gcc3 on the Mac).
  • Debian x86: with crosstool compilers.
  • Nokia 770/800 OS 2006: with Code Sourcery compilers ported with MacPorts, cf NokiaBuildInstructions.

Comment by cai.wingfield, Aug 12, 2008

Building on OS X 10.5 using X Code and K from CVS I got 19 errors relating to missing symbols - fns that were actually in the K source tree , but not being seen... I had to add the K (Static - Release) framework by 1. Going to the 'Targets' tab, 2. Right clicking on the 'link binary with libraries' option 3. Choose 'Add existing frameworks', 4. Add a framework not from the list, select the K (Static - Release) in <K>K/Build/Xcode/build/K.build/Default/K\ OSX\ \(Static\ -\ Release\).build

It does add 70 or so files - so I am sure this isn't really the right solution! It does work, but it'd be nice to know the 'correct' way

Comment by j.m.austin, Feb 13, 2009

Building on Ubuntu 8.10 using the provided ffi didn't work, I had to install libffi-dev and then it built without errors(note that everything except libeinstein and einstein had built before)

I haven't got it to work yet, the emulator runs but no window shows up - but I thought someone else might appreciate the news about building...

Comment by ju...@juddy.org, Jun 12, 2009

Finally built today on Debian Lenny. K libs definately must come from cvs - I could not get another version from another set of build instructions to compile.

Running a 717006 ROM image built from debug, loads and attempts to boot successfully using 2007.07 in wine, but the native Linux build complains about a corrupt Einstein.rex.

Substituting Einstein.rex from Data (included with source) or Einstein.rex from Windows 2007.07 build yield the same result.

Checked permissions, line endings on .source file, where I noticed the requirement for building in MPW.

I'm downloading an MPW image to run under BasiliskII, but I'd like to know this is necessary.

Here's the MD5 sum of my Einstein.rex: 06e0a0a4134e950d561506dda0e1b01a


Sign in to add a comment
Hosted by Google Code