INSTALLATION INSTRUCTION for MacOS X
Note: IPLT is developed on MacOS X.5 "Leopard" and MacOS X.4 "Tiger" and it is only guaranteed to run on these versions of the operating system. If you have any luck to compile an run it on an older version, please let us know.
Basic information about the build and installation process can be found on the InstallationInstructions page. Almost all required libraries can be installed using MacPorts (formerly known as DarwinPorts). You have the possibility to chose between Python version 2.4 and Python 2.5. The advantage of Python 2.5 on Leopard is, that it's already present on the computer and needn't be installed separately. In addition, this allows to use the preinstalled wxWidgets 2.8.4 and wxPython.
On Tiger, issue the command
sudo port install boost +python24 sudo port install fftw-3 gsl python24 py-wxpython scons subversion xercesc libpng
to install all needed libraries including its dependencies. This command is the same for Leopard with Python 2.4. In constrast, when using Python 2.5, use
sudo port install boost +python25 sudo port install fftw-3 gsl scons subversion xercesc tiff libpng
By default, MacPorts installs libraries in /opt/local/lib. It is thus convenient to add the following lines to your .bash_profile or .profile:
#To enable IPLT
export IPLT_ROOT=~/iplt/stage
export DYLD_FALLBACK_LIBRARY_PATH=$IPLT_ROOT/lib:/opt/local/lib
export PATH=${PATH}:$IPLT_ROOT/bin
Because the detection of the link and compile flags for wxWidgets depends on the shell script wx-config, it is mandatory, that /opt/local/bin appears before /usr/bin. Check if this is the case by issuing
echo $PATH
in the terminal and change it appropriatley if you see /usr/bin before /opt/local/bin. This will make sure, that the correct wx-config gets executed and not the one of wxWidgets 2.5 that ships with MacOS X.4
NOTE: On MacOS X, the Command-key (Apple-key) is used as a key/mouse modifier instead of the Control-key.
Settings.py for MacOS X
The file settings.py in the top level IPLT directory should at least contain the following:
# denote extra path entries to search for header files EXTRA_INCLUDE_PATH = '/opt/local/include' # denote extra path entries to search for shared libraries EXTRA_LIBRARY_PATH = '/opt/local/lib' # denotes extra path entries to search for frameworks. Only needed for Python 2.4 EXTRA_FRAMEWORK_PATH = '/opt/local/Library/Frameworks' # if given, overrides the default detection of python. PYTHON_VERSION = '2.4'
Troubleshooting
Troubles with Compilation
- It is possible that you need to add /usr/X11/include to the include path for png.h, and /usr/X11/lib to the library path for the png library, in both your settings.py and your shell setup (see above).
Troubles with Boost Python
- If you get a TypeError: Attribute name must be string error when launching IPLT, you most probably have boost version 1.34 installed. This version is known to cause troubles. Unfortunately, there is no other fix than to install boost version 1.33 which is not in the MacPorts repository. You might want to read Installing Boost on MacOS X as a primer.
- When you see dyld: Library not loaded: libboost_filesystem-1_33_1.dylib at program startup, you most likely forgot to run the script describe here. Make sure you run scons after running the script.
- When using the default wxWidget install on Leopard, you might see a
Fatal Error: Mismatch between the program and library build versions detected. The library used 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6), and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6). Abort trap
Make sure you compile wxWidgets with the same debug settings as you compile iplt. The wxWidgets 2.8.4 shipping with MacOS X.5 is unfortunately compiled with debugging symbols turned on. So if you want to use the default wxWidgets, you mustn't add -DNDEBUG to your compiler settings in settings.py. Otherwise install a wxWidgets without debugging symbols.
Back to InstallationInstructions
