Installing OpenDX on Leopard

Posted on November 8, 2009

0


Recently we’ve been using OpenDX in my Visualisation module at uni so I thought I’d install it at home so I could go through the worksheets at my leisure. OpenDX is a visualisation tool that started off as an IBM product but has since been released under an open source license. Despite this OpenDX is only available in binary form for Windows and some Linux systems: Mac owners are required to purchase a commercial version from Vis. Inc.

However, there are numerous projects around that provide easy Mac compatible downloads of many programs that would require complicated installation or building from source. As I’d used Macports previously I set the download of OpenDX and the relevant dependencies going with the following terminal command:

sudo port install opendx

After a considerable amount of time downloading and installing the dependencies the process was finished but had failed to install OpenDX itself. The compilation error given was:

/sw/bin/g++-4 -DHAVE_CONFIG_H -I. -I. -I../../../include -I./../widgets
-I../../../include -Dmacos  -I/sw/include/ImageMagick -I/sw/include
-I/usr/X11/include  -g -O2 -I/usr/X11/include -c -o StartWebBrowser.o
StartWebBrowser.C
In file included from
/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:27,
                 from
/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37,
                 from
/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20,
                 from StartWebBrowser.C:21:

As you can imagine by this time I was almost ready to give up but a quick google returned somebody else with a similar problem. The problem was caused by a bug in the fink gcc compiler. By moving the dx.info and dx.patch files from /sw/fink/dists/unstable/main/finkinfo/sci/ to /sw/fink/dists/local/main/finkinfo/ and changing

SetCXX:%p/bin/g++-4
SetCC:%p/bin/gcc-4

to

SetCXX:/usr/bin/g++-4.2
SetCC:/usr/bin/gcc-4.2

in the dx.info file.

Assuming you have the gcc4.2.pkg installed as part of xcode this will tell Fink to use that version of gcc rather than the buggy version included with Fink. Running the Fink install once more installed OpenDX and it’s been running like clockwork since.

These instructions were found on a Fink users mailing list but I thought they could be useful to others and it never hurts to have helpful instructions repeated.

Advertisements