Build From Package OSX

From Emergent

Jump to: navigation, search
Emergent Logo
Building and Installing Emergent

These are step-by-step directions for building emergent from the source code under OS X after having installed the pre-built packages as documented in Installation. This saves several steps and a lot of time!

Installing emergent's prerequisites

Build Tools OSX has a full list of packages that are needed for compiling software on OSX. Double check that your versions of the autotools are set as described on that page.

After that, you will need to grab the GNU Scientific Library and the Open Dynamics Engine, and create symlinks so that emergent recognizes them:

port install gsl ode
cd /usr/local/include
ln -s /opt/local/include/gsl .
ln -s /opt/local/include/ode .

Download the emergent source code

This will download the latest source code to ~/emergent. Do the following logged in as the regular user, not the root user:

svn checkout --username anonymous --password emergent http://grey.colorado.edu/svn/emergent/emergent/trunk ~/emergent

Build Emergent

To build emergent, run these commands as the regular user:

cd ~/emergent && autoreconf && ./configure && make
sudo make install

With the default install, emergent will be in /usr/local/bin, and you can just type emergent to run it. Support files, including demos, test cases and standard library files for css are located in /usr/local/share/emergent

Optional: Uninstalling a Qt .dmg Package (to Revert to an Earlier Version)

In the event that you need to revert to an earlier version of the Qt library for mac, which comes in a convenient .dmg install package, you will need to uninstall the previous version. (Emergent 4.0.7 reverted to Qt 4.2.3 to avoid serious drag-and-drop and other layout bugs with Qt 4.3.1.)

cd /Developer/Tools
sudo python uninstall-qt.py

Optional: Uninstalling manually

If the script does not work, you will need to nuke a bunch of directories.

/bin/rm -rf /Library/Frameworks/Qt*.framework
/bin/rm -rf /Developer/Applications/Qt
/bin/rm -rf /Developer/Documentation/Qt
/bin/rm -rf /Developer/Examples/Qt
/bin/rm -rf /Developer/Tools/Qt
/bin/rm -rf /Library/Receipts/Qt_*
cd /usr/bin/
/bin/rm findtr* lrelease* lupdate* moc* qmake* qt3to4* rcc* uic* uic3*

If you have compiled and installed Qt 4.3.1 from scratch following the old wiki instructions (prior to Aug 2007), you'll need to remove the line
export QTDIR=/usr/local/Trolltech/Qt-4.3.1
from your /etc/profile file and then do the following:

$ cd /usr/local/Trolltech/qt-mac-opensource-src-4.3.1
$ sudo make uninstall
$ sudo /bin/rm -rf /usr/local/Trolltech/Qt-4.3.1
$ cd /usr/local/Trolltech
$ sudo /bin/rm -rf /usr/local/Trolltech/qt-mac-opensource-src-4.3.1

Optional: If you've installed KDE using MacPorts

If you have installed kde under macports, it is possible that you have an incorrect moc program in your path prior to the correct one. You can check like so:

which moc # output should be: /usr/bin/moc

If you don't have a moc on your path, you likely need to install the Qt disk image. The QT dmg installs the correct moc in /usr/bin/moc. If you see something like /opt/local/bin/moc, then that is likely a problem. You can either mv /opt/local/bin/moc /opt/local/bin/moc-3.x to get it out of the way, or change your path order in .bashrc or .cshrc, or if you're actually doing kde/Qt 3.x development in addition to emergent, you'll be able to figure out a better solution.

Optional: emergent application bundles for developers

There are .app bundles (Mac application directories) in src/emergent/bin. You can go to that directory and type, open emergent.app to run the software. If you configured with --enable-debug it is emergent_debug.app. You can then navigate to this directory in the finder, Meta+Shift+o, and drag emergent.app into your dock (or Applications directory) to make it executable from the dock in the usual way.

Note for google about gcc stabs libtool convenience libraries on mac leopard.

Personal tools