Main Page | Recent changes | View source | Page history

Printable version | All content dual-licensed under the GNU FDL and the Creative Commons Share-alike Attribution license. | Privacy policy

Not logged in
Log in | Help
 

Swarm FAQ:Macintosh installation

From SwarmWiki

Q: Can I use Swarm on Tiger MacOS X 10.4?

A: Tiger is preferred version of MacOS X on which to run Swarm. The current binary libraries although built on Panther work perfectly well on Tiger.

There will be Tiger packages soon, but decisions are still being made about how they should be built.

Meanwhile the default gcc-4.0 compiler in Xcode 2.3 should have no issues with Swarm code on PowerPC. So libraries built with this compiler should be better than the current binaries.

Q: Can I use Swarm on an Intel Mac?

A: Yes, but it is a bit of a kluge.

We are working on proper Intel packages, but this will take some time.

Meanwhile: First install Swarm and its prerequisites as described below.

Then you need to make two small changes in the file /usr/local/swarm2.2/etc/swarm/Makefile.common. On line 27 you will find the definition of CFLAGS and on line 34 the definition of OBJCFLAGS. Just add '-arch ppc' (without the quotes) to both lines.

You can then build and run Objective-C Swarm code as described in other documentation. Java code will not work because Java using JNI is not supported by Rosetta.

The extra compiler flag causes the compiler to build ppc code. Without it, the compiler defaults to i386 code which will fail at link time because there is no i386 code in the current Swarm library binaries. However, a ppc binary, once built, runs happily due to the magic of Rosetta, and Apple's helpfulness in making all the system and X11 libraries on the Intel Macs fat binaries.

Q: How do I install Swarm on MacOS X?

A: Before installing the Swarm Mac packages you need to install Apple's X11 software and Xcode (1.5 on Panther only) or 2.3.

See:


Swarm binaries for MacOS X 10.3 (panther) are supplied as Apple Installer packages compressed with Stuffit. (the file names end in .sit) These packages will work on MacOS X 10.4 Tiger.

  1. Download the packages from [1]. Checkout Swarm: MacOS X binaries for details of which files to take.
  2. With most browsers the the packages will be unstuffed automatically and you should have package files with names like swarmx2.2.pkg. If so go to 3. below. If the files still have .sit extensions like swarmx2.2.pkg.sit, then try double clicking. This should launch Stuffit Expander and remove the Stuffit compression. If this still does not work, you need to reinstall the free verion of Stuffit which can be found at www.stuffit.com and try again.
  3. Once you have the package files, just double click them to launch the Apple package installer and follow the instructions. You will need an administrator password.

Once the packages are installed you need to set the SWARMHOME environment variable to "/usr/local/swarm2.2", the DISPLAY environment variable to ":0.0" and add "/usr/local/swarm2.2/bin" to your PATH environment variable.

Within a 'shell' (when you type in the Terminal application /Applications/Utilities/Terminal) you can change environment variables using the following commands:

If you use the bash shell (the default in Panther) use commands like:

set DISPLAY=:0.0
export DISPLAY

If you use the tcsh shell (the default in Jaguar and before) use commands like:

setenv DISPLAY :0.0

For further information see:Apple documentation

To make the appropriate changes to all new shells make the following changes to the shell initialisation files. (You may need to create the files if they do not exist, and remember files beginning with '.' are invisible!)

For bash: The initialisation file is ~/.profile and it should contain a line like:

source /usr/local/swarm2.2/etc/swarm/swarmrc

For tcsh: The initialisation file is ~/.tcshrc and it should contain a line like:

source /usr/local/swarm2.2/etc/swarm/swarmtrc

Once these files are set up, you should be be able to open a new terminal window and follow the instructions given in Swarm tutorials to build and run models.

Last updated 29 August 2006


[Main Page]
Main page
About SwarmWiki
News
Recent changes
Random page
Help

View source
Discuss this page
Page history
What links here
Related changes

Special pages