Thursday, October 1, 2009

MegaWave2 V3.01 in OS X 10.5.7

Megawave is an image processing library from for UNIX, developed at CMLA Cachan.
Compiling it's current version (3.01) under OS X is a truly painful task.
From the experiences of Said, Jeremie and Rafa, I've managed to stitch
together a version that works under OS X 10.5.7 and 10.5.8 using the gcc-4.0.1 compiler.

Requieres Xtool, and a lot of Fink/MacPorts packages i.e. libtiff y libjpeg, (I should someday compile a complete list of dependences).

During the installation process:
when asked for X11 path, answer : /usr/X11/lib/ ,
when asked for the libtiff & libjpeg paths, answer: /sw/lib/ or /opt/local/lib/ or wherever these libraries are in your system.
  • In case you are running 10.5.8 the default compiler is gcc-4.2 and it will not work. So the trick is to link cc to gcc-4.0 ( 'ln -s /usr/bin/cc /usr/bin/gcc-4.0' ) during the installation process. 
  • A common cause of problems is the specification of the include directories for libtiff and libjpeg (/opt/local/include or /sw/include or whatever), these are hardcoded in the installation. In this case just modify the CFLAGS parameter in ./kernel/lib/src/Makefile.in to reflect your configuration.
  • A VERY IMPORTANT TIP. During the installation process some configuration files are generated, and they are not overwritten by running the installation again. So if the compilation fails, any change of parameters/files should be performed on the clean unpacked version
Good luck with it : MegaWave2_V3.01.osx10.5.8.tgz

No comments:

Post a Comment