Posts Tagged ‘geekery’

SWI-Prolog from MacPorts on OS X 10.5

Wednesday, December 23rd, 2009

Tried installing the binary of SWI-Prolog (swi-prolog-5.8.2-leopard-intel.mpkg) on my Mac OS X 10.5 box.  For whatever reason, it was bombing out with some nasty errors (Libary not loaded … image not found).  Read about others’ troubles and decided to try MacPorts.  Couldn’t get SWI-Prolog to install using a standard:

$ sudo port -v install swi-prolog

Ended up getting lots of BS errors on the lines of “ERROR: Could not load/find library -lXpm.”

*****************************************************************
* ERROR: Could not load/find library -lXpm.         *
* Please install the XPM library and rerun configure.       *
* The primary source for libXpm is at:              *
*                               *
*     http://www-sop.inria.fr/koala/lehors/xpm.html     *
*                               *
* NOTE: If your system has libXpm, check the following:     *
*                               *
*   - Do you have the development version of the library?   *
*   - Is the library you have of the right architecture?    *
*   - Could it be that other parts of X11 are missing?  *
*     (typically the case if -lXext is also missing)    *
*                               *
*   Examine packages/xpce/src/config.log for details    *
*   Linux users: check README.debian for dependencies   *
*   (note that the exact package names vary between     *
*   distributions).                     *
*****************************************************************

Long story short: For various reasons, the MacPorts installed software wasn’t finding my Apple Developer X11 libraries, and it also wasn’t appropriately requiring the software as dependencies for the swi-prolog package.  Had to do the following:

$ sudo port -v install xpm
$ sudo port -v install xorg-libXt
$ sudo port -v install Xft2

to get the prereqs installed (warning: those libs, in turn, have some mongo big dependencies, like Perl itself, so be ready for some serious compiling).  After that, installing swi-prolog worked just fine.