[mapserver-users] Fail to build Mapscript Python with current source

Umberto Nicoletti umberto.nicoletti at gmail.com
Fri Apr 27 09:22:57 EDT 2012


I just built it on Ubuntu 10.04 x86, perhaps you should try this build
process:

./configure [your options] --enable-python-mapscript
make
sudo make install

make/make install will also build and install python mapscript, no need to
cd, swig, etc.

Umberto

On Fri, Apr 27, 2012 at 3:04 PM, Peter Hopfgartner <
peter.hopfgartner at r3-gis.com> wrote:

> I'm on a CentOS 6.2, x86_64 bit system:
>
> /configure --with-gd --with-zlib --with-tiff --with-agg
> --with-experimental-png --with-freetype=/usr/bin/**freetype-config
> --with-gdal=/usr/bin/gdal-**config --with-ogr=/usr/bin/gdal-**config
> --with-geos=/usr/bin/geos-**config --with-cairo=yes --with-proj
> --with-wfs --with-wcs --with-sos --with-wmsclient --with-wfsclient
> --with-xpm --with-postgis=/usr/bin/pg_**config
> --with-mygis=/usr/bin/mysql_**config --with-curl-config=/usr/bin/**curl-config
> --with-xml2-config=/usr/bin/**xml2-config --with-php=/usr/bin/php-config
> --with-fribidi-config=/usr/**lib64/pkgconfig/fribidi.pc
> --with-fastcgi=/usr --without-pdf --without-eppl --with-threads
> --enable-debug --disable-runpath
>
> cd mapscript/python
> swig -python -shadow -modern -o mapscript_wrap.c ../mapscript.i
> cd ../..
> make
> cd mapscript/python
> python setup.py build
>
> The build fails with:
>
> gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv
> -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
> -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DUSE_FASTCGI=1 -DUSE_CAIRO=1
> -DUSE_FRIBIDI=1 -DUSE_FRIBIDI2=1 -DUSE_WMS_LYR=1 -DUSE_WFS_LYR=1
> -DUSE_SOS_SVR=1 -DUSE_LIBXML2=1 -DUSE_CURL=1 -DUSE_CURLOPT_PROXYAUTH=1
> -DUSE_WCS_SVR=1 -DUSE_WFS_SVR=1 -DUSE_WMS_SVR=1 -DUSE_POSTGIS=1
> -DPOSTGIS_HAS_SERVER_VERSION=1 -DUSE_GDAL=1 -DUSE_OGR=1 -DUSE_GEOS=1
> -DUSE_THREAD=1 -DUSE_PROJ=1 -DUSE_GD=1 -DUSE_GD_GIF=1 -DUSE_GD_PNG=1
> -DUSE_GD_JPEG=1 -DUSE_GD_WBMP=1 -DUSE_GD_FT=1 -DGD_HAS_FTEX_XSHOW=1
> -DGD_HAS_GDIMAGEGIFPTR=1 -DGD_HAS_GETBITMAPFONTS=1
> -DGD_HAS_GET_TRUE_COLOR_PIXEL=**1 -DUSE_ICONV=1 -DUSE_JPEG=1 -DUSE_GIF=1
> -DUSE_PNG=1 -DUSE_ZLIB=1 -DUSE_FREETYPE=1 -DHAVE_VSNPRINTF=1
> -DNEED_STRLCPY=1 -DNEED_STRLCAT=1 -DNEED_STRRSTR=1 -DDISABLE_CVSID=1
> -I../.. -I/usr/include/freetype2 -Irenderers/agg/include
> -I/usr/include/gdal -I/usr/include -I/usr/include/fastcgi
> -I/usr/include/libxml2 -I/usr/include/fribidi -I/usr/include/cairo
> -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/python2.6
> -I/home/rpmbuild/tmp/**mapserver-6.1.20120426 -c pygdioctx/pygdioctx.c -o
> build/temp.linux-x86_64-2.6/**pygdioctx/pygdioctx.o
> pygdioctx/pygdioctx.c: In function ‘PyFileIfaceObj_IOCtx_GetBuf’:
> pygdioctx/pygdioctx.c:84: warning: passing argument 3 of
> ‘PyString_AsStringAndSize’ from incompatible pointer type
> /usr/include/python2.6/**stringobject.h:172: note: expected ‘Py_ssize_t
> *’ but argument is of type ‘int *’
> gcc -pthread -shared build/temp.linux-x86_64-2.6/**mapscript_wrap.o
> build/temp.linux-x86_64-2.6/**pygdioctx/pygdioctx.o -L../../ -L/usr/lib64
> -L/usr/lib64 -L/usr/lib -L/usr/lib64 -L/home/rpmbuild/tmp/**mapserver-6.1.20120426
> -lpython2.6 -lmapserver -lfreetype -lgd -ljpeg -lpng -lz -lXpm -lX11 -lproj
> -lgif -lgdal -lpq -lcurl -lgeos_c -lpthread -lc -lfcgi -lxml2 -lm -lfribidi
> -lstdc++ -lfontconfig -lcairo -lpng12 -lmapserver -o
> build/lib.linux-x86_64-2.6/_**mapscript.so
> /usr/bin/ld: cannot find -lmapserver
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
>
> Anyway, there is a file libmapserver.la in the source directory.
>
> What is it, that I'm mising?
>
> Thanks,
>
> Peter
>
> --
> Peter Hopfgartner
> web  : http://www.r3-gis.com
>
> ______________________________**_________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.**org <mapserver-users at lists.osgeo.org>
> http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120427/c8cc7b27/attachment.html


More information about the mapserver-users mailing list