[mapserver-users] Building MapScript 5.4: linker errors

Daniel Morissette dmorissette at mapgears.com
Thu Feb 3 16:08:53 EST 2011


On 11-02-03 04:03 PM, Gregor at HostGIS wrote:
> On 2/3/2011 12:59 PM, Daniel Morissette wrote:
>> are you sure there you didn't trim any warning/errors in-between
>  > the two that could provide a hint?
>
> Positive.

I think I found it, see below:

>
> gcc -fPIC -O2 -fPIC -Wall -DCOMPILE_DL=1 -DPHP4
> -DNEED_NONBLOCKING_STDERR -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_SOS_SVR
> -DUSE_LIBXML2 -DUSE_CURL -DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR
> -DUSE_MYGIS -DUSE_POSTGIS -DUSE_GDAL -DUSE_OGR -DUSE_GEOS -DUSE_THREAD
> -DUSE_PROJ -DUSE_EPPL -DUSE_RGBA_PNG -DUSE_AGG -DUSE_PDF -DUSE_GD_GIF
> -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW
> -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_ICONV -DUSE_ZLIB
> -I/tmp/mapserver-5.4.2 -I/usr/include/libxml2 -I/usr/include/mysql
> -I/usr/include -I/usr/include -I/usr/include -I/usr/include/agg2
> -I/usr/include/freetype2 -I/usr/include -I/usr/include
> -I/usr/include/php -I/usr/include/php/dl -I/usr/include/php/main
> -I/usr/include/php/Zend -I/usr/include/php/include
> -I/usr/include/php/TSRM -I -c -o php_mapscript_util.o php_mapscript_util.c

Notice the "-I -c -o ..." sequence

"-I" expects an argument which is an include directory, in this case 
it's missing and the "-c" is eaten by the -I so gcc ends up interpreting 
this as a compile+link command (default behavior). Since the required 
dependencies to link php_mapscript.c are not provided you get those 
linker errors.

You need to identify which configure option ended up inserting "-I" 
without the required arg ... look in your configure output, or in the 
main Makefile...

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/


More information about the mapserver-users mailing list