Python mapscript and AGG

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Thu Oct 4 23:59:40 PDT 2007


On my Ubuntu 7.04 using the distro supplied agg ( 2.4+20060719-3 ) and
latest mapserver from svn python mapscript builds and loads fine.

There is probably something wrong with you setup: maybe an old agg
version around. This command will report all agg libraries in your
system:

bash# find / -iname "*libagg*"

on mine it says:

/usr/lib/pkgconfig/libagg.pc
/usr/lib/libaggfontfreetype_pic.a
/usr/lib/libaggplatformsdl_pic.a
/usr/lib/libagg_pic.a
/usr/lib/libagg.a
/usr/lib/libaggplatformX11_pic.a
/usr/lib/libaggplatformX11.a
/usr/lib/libaggplatformsdl.a
/usr/lib/libaggfontfreetype.a

Note the _pic libraries.
Regards,
Umberto


On 10/4/07, James Lindstorff <jlf at eniro.dk> wrote:
> Tried changing the makefile in AGG so it's compiled with
>
> -O3 -I/usr/X11R6/include -L/usr/X11R6/lib -fPIC
>
> But the effect seems to be the same.
>
> Mapserver configuration is :
>
> MapServer is now configured for
>
>  -------------- Compiler Info -------------
>   C compiler:                gcc -O2 -fPIC -Wall
>   C++ compiler:              g++ -O2 -fPIC -Wall
>   Debug:
>   Generic NINT:
>   Threading support:         -DUSE_THREAD
>
>  -------------- Renderer Settings ---------
>   zlib support:              -DUSE_ZLIB
>   png support:
>   jpeg support:
>   iconv support:             -DUSE_ICONV
>   AGG support:               -DUSE_AGG
>   AGG Freetype support:      agg_font_freetype.o
>   Ming(flash) support:
>   PDFLib support:
>
>  -------------- Data Format Drivers -------
>   native tiff support:
>   PostGIS support:
>   Proj.4 support:            -DUSE_PROJ
>   EPPL7 support:             -DUSE_EPPL
>   ArcSDE support:
>   OGR support:
>   GDAL support:              -DUSE_GDAL
>   GEOS support:
>   Oracle Spatial support:
>   FastCGI support:
>
>  -------------- OGC Services --------------
>   WMS Server:                -DUSE_WMS_SVR
>   WMS Client:                -DUSE_WMS_LYR
>   WFS Server:
>   WFS Client:                -DUSE_WMS_LYR
>   WCS Server:
>   SOS Server:
>
>  -------------- MapScript -----------------
>   PHP MapScript:             no
>
>
> /james
>
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Howard Butler
> Sent: 4. oktober 2007 16:37
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Python mapscript and AGG
>
> James,
>
> If I recall correctly, this issue is related to AGG not being built
> with -fPIC.
>
> Howard
>
> On Oct 4, 2007, at 8:10 AM, James Lindstorff wrote:
>
> > Having just compiled and tried out mapserver 5.0 with AGG support
> > in CGI
> > mode (WMS) and being very impressed with the rendering quality I
> > turned to
> > the Python mapscript I use for producing maps for our production
> > environment. Here though I ran into a bit of trouble. I get the
> > following
> > error when doing import mapscript:
> >
> > Python 2.4.4 (#2, Apr 25 2007, 22:41:41)
> > [GCC 4.1.3 20070423 (prerelease) (Debian 4.1.2-4)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import mapscript
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> >   File "/usr/lib/python2.4/site-packages/mapscript.py", line 7, in ?
> >     import _mapscript
> > ImportError: /usr/lib/python2.4/site-packages/_mapscript.so: undefined
> > symbol: _ZN3agg12g_sqrt_tableE
>



More information about the MapServer-users mailing list