<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>RE: mapserver compile error (gentoo)</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=2>&gt; Subject: mapserver compile error (gentoo)</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; I'm trying to compile mapserver-4.6.0 on Gentoo Linux (on </FONT>
<BR><FONT SIZE=2>&gt; sparc and x86</FONT>
<BR><FONT SIZE=2>&gt; platform) and got a very simple looking error messages on both</FONT>
<BR><FONT SIZE=2>&gt; Gentoo platforms. So, maybe something is misconfigured on my </FONT>
<BR><FONT SIZE=2>&gt; platforms, </FONT>
<BR><FONT SIZE=2>&gt; but I do not have a clue. Hints?</FONT>
</P>

<P><FONT SIZE=2>I had the same problem, and my 'quick and duck' solution was to </FONT>
<BR><FONT SIZE=2>remove postgis support.&nbsp; Perhaps this isn't an option for you. </FONT>
<BR><FONT SIZE=2>If you need postgis, read on.</FONT>
</P>

<P><FONT SIZE=2>&gt; This is what I got when running ./configure</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; jaska@sparcy ~/mapserverin_kaanto/mapserver-4.6.0 $ ./configure</FONT>
<BR><FONT SIZE=2>&gt; --with-postgis=/usr/bin/pg_config --with-proj --with-geos</FONT>
<BR><FONT SIZE=2>...</FONT>
<BR><FONT SIZE=2>&gt; gcc -O2 -fPIC -Wall&nbsp;&nbsp; -DIGNORE_MISSING_DATA&nbsp; -DNEED_STRLCAT&nbsp; </FONT>
<BR><FONT SIZE=2>&gt; -DUSE_EPPL</FONT>
<BR><FONT SIZE=2>&gt; -DUSE_PROJ -DUSE_WMS_SVR -DUSE_WMS_LYR -DUSE_WFS_SVR -DUSE_WFS_LYR</FONT>
<BR><FONT SIZE=2>&gt; -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT</FONT>
<BR><FONT SIZE=2>&gt; -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_PDF&nbsp;&nbsp; -DUSE_OGR</FONT>
<BR><FONT SIZE=2>&gt; -DUSE_GDAL -DUSE_GEOS -DUSE_ICONV&nbsp;&nbsp;&nbsp; -DUSE_POSTGIS&nbsp;&nbsp;&nbsp; -I/usr/include</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -I/usr/include/gdal -I/usr/include&nbsp;&nbsp;&nbsp;&nbsp; -I/usr/include&nbsp;&nbsp; shp2img.o</FONT>
<BR><FONT SIZE=2>&gt; -L. -lmap -lgd -L/usr/lib -lgd -ljpeg -lfreetype -lpng -L/lib </FONT>
<BR><FONT SIZE=2>&gt; -lz -lXpm</FONT>
<BR><FONT SIZE=2>&gt; -lX11&nbsp; -lpdf -ljpeg -lfreetype -lpng -L/lib -lz -lXpm -lX11&nbsp; -lproj</FONT>
<BR><FONT SIZE=2>&gt; -ljpeg&nbsp; /usr/lib/libgdal.a /usr/lib/lib /usr/lib/-lpq </FONT>
<BR><FONT SIZE=2>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</FONT>
<BR><FONT SIZE=2>Here is the problem.</FONT>
</P>

<P><FONT SIZE=2>&gt; /usr/lib/libgdal.a</FONT>
<BR><FONT SIZE=2>&gt; -L/usr/lib -lgeos -logdi31 -ljpeg -lgeotiff -ltiff -lpng -lnetcdf -lz</FONT>
<BR><FONT SIZE=2>&gt; -lm -ldl -L/usr/lib -lpq -L/usr/lib/mysql -lmysqlclient -lz -lcrypt</FONT>
<BR><FONT SIZE=2>&gt; -lnsl -lm -L/usr/lib -lssl -lcrypto&nbsp; -L/usr/lib -lpq&nbsp; </FONT>
<BR><FONT SIZE=2>&gt; -L/usr/lib -lcurl</FONT>
<BR><FONT SIZE=2>&gt; -lidn -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz&nbsp; -L/usr/lib -lgeos</FONT>
<BR><FONT SIZE=2>&gt; -lc&nbsp; -lm -lstdc++&nbsp; -o shp2img</FONT>
<BR><FONT SIZE=2>&gt; gcc: /usr/lib/lib: No such file or directory</FONT>
<BR><FONT SIZE=2>&gt; gcc: /usr/lib/-lpq: No such file or directory</FONT>
</P>

<P><FONT SIZE=2>Try find how mapserver's config is using pg_config's output, and then </FONT>
<BR><FONT SIZE=2>you should be able to fix the problem, or fix the makefile by hand</FONT>
<BR><FONT SIZE=2>after you have configured the mapserver. </FONT>
</P>

<P><FONT SIZE=2>Br, Jani</FONT>
</P>

<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Jani Averbach</FONT>
</P>

</BODY>
</HTML>