Thursday, May 18, 2006

./configure problems - MapServer on FreeBSD

It's very frustrating to be told by a script that something you know is at a particular location, isn't. Like this:

# ./configure --includedir=/usr/local/include --libdir=/usr/local/lib --with-jpeg=/usr/local/lib --with-png=/usr/local/lib --with-gd=/usr/local/lib --with-libiconv=/usr/local/lib --with-tiff=/usr/local/lib --with-xpm=/usr/X11R6/lib/

configure: checking whether we should include JPEG support...
"Could not find jpeglib.h or libjpeg.a/libjpeg.so in /usr/local/lib."

# ls /usr/local/lib | grep libjpeg.so

libjpeg.so
libjpeg.so.9


(It's...right...there)

Anyway it turns out that actually, you have to replace /usr/local/lib (where the libraries are) with /usr/local (where they are not)... which then works fine. So:

./configure --includedir=/usr/local/include --libdir=/usr/local/lib --with-jpeg=/usr/local --with-png=/usr/local --with-gd=/usr/local --with-libiconv=/usr/local --with-tiff=/usr/local --with-xpm=/usr/X11R6/lib/

2 Comments:

Blogger melissa said...

Related: if you're getting a long list of errors involving jenv, jcls, jarg, jresult - try using java 1.4.2 rather than java 1.5. (ie. install the older version than set JAVA_HOME to point to the directory containing the bin/folder containing the java executable you just installed)

11:47 AM  
Blogger melissa said...

And again: seems java mapscript compilation is very sensitive to the jdk you use. On freeBSD, jre1.4 from the ports collection didn't work at all, but linux-sun-jre1.4.2 (using linux compatibility mode) did. Aargh!

9:42 AM  

Post a Comment

<< Home