All Systems |
On all platforms, if you do not have swig version 1.1
build 883 installed, you will need to provide the
--skip-swig argument to the build command,
and will also need to build and install in one step,
like this:
python setup.py build --skip-swig [other build args] install [install args]
The README file for versions before 2.0.beta 8 did not
make this clear.
Also, before version 2.0.beta8, the python
setup.py clean command would delete the swig
output files. If you don't have swig 1.1 build 883,
you'll have to extract these files from the
distributed tar file in order to restore them.
|
Macintosh OS X |
The tricky part of installing oof2 on OS X can be
getting the requisite third party libraries.
Generally, it's easy to do this using a package
manager, such
as fink.
Our experience with fink and OS X 10.4 and 10.5 is
that most everything works smoothly, but there are a
few points to be careful about.
Because we're familiar with fink and not with other
Macintosh package managers, these notes are very
fink-centric. That's not meant to disparage the other
package managers in any way, nor is it any kind of
official endorsement of fink.
-
Before you do anything else, make sure that you
have installed Apple's X11, which comes in two
optional packages on the OS X 10.4 system disks:
X11User.pkg and X11SDK.pkg. In principle, it's
possible to use other X11 implementations, such as
xfree86 from fink, but we don't have any
experience with them and find that Apple's X11
works well.
-
If you're using OS X 10.5, the X11 on the Apple
system DVDs is broken. The latest development
release of X11 is much better, and can be
downloaded from
from Mac
OS Forge.
-
If you use fink to download and install python
packages, it's convenient to use fink's python,
rather than the python that comes as part of OS X.
So install python (version 2.4 or 2.5) along
with the other required packages described in the
README file.
-
OOF2's setup.py script will use the compilers that
were used to build python. It's sometimes
important that all C++ components of a program be
built by the same compiler. In particular, it's
not good to mix g++ 3.3 and g++ 4.0.
-
If you're using OS X 10.4 or later, make sure
you're using fink 0.81 or later. Then
everything will use gcc/g++ 4.0, and you don't
have to worry.
-
If you're using OS X 10.4 and an
earlier version of fink, then you'll
have to use gcc_select to set the
compiler version to 3.3, and don't
use fink to install ImageMagick. Fink will
use the wrong compiler. See the note below
about installing
ImageMagick.
-
If you're using OS X 10.3 or earlier, you'll
also probably have to install ImageMagick from
source code. See below.
No special treatment seems to be necessary in order to
install oof2 on Intel-based Macs. Just make sure
you're using the right version of fink.
Installing ImageMagick on a Mac.
These steps should not be necessary with modern
versions of fink and OS X! Don't follow them unless
you're having trouble with ImageMagick.
Some combinations of OS X and fink will require you to
build ImageMagick by hand, because otherwise you'll
end up with ImageMagick libraries compiled with g++
4.0 and oof2 code compiled with g++ 3.3, which will
cause the program to crash, or even fail to load.
Download the ImageMagick source code from http://www.imagemagick.org,
and build it using its configure and
make scripts. Some of the libraries that
ImageMagick uses can be obtained from fink. If you do
want to link to the fink libraries, configure
ImageMagick like this:
configure LDFLAGS=-L/sw/lib CPPFLAGS=-I/sw/include
Make sure that you're using the correct C++ compiler
before running configure and make!
Use gcc_select (in an administrator account)
to query and change the compiler to 3.3.
Building SWIG 1.1 on a Mac
The only obstacle to installing swig 1.1 build 883 on
a Mac is that the Mac's file system is not case
sensitive, and swig's build procedure tries to make a
subdirectory named SWIG and a file named
swig in the same directory. You can install
swig on a case-insensitive disk, you just can't build
it there. There are at least three ways to get around
this inconvenience:
-
Build swig on a disk with a different type of file
system. Format the disk with the Unix File
System, using Apple's Disk Utility application.
-
Use Disk Utility to create a disk image, formatted
with the Unix File System. After you open the disk
image, it will act just like a real disk, and you
can use it to build swig.
-
Hack the swig source files so that it doesn't have
a case problem. If you don't mind a second hand
swig, you can download our modified version here:
|