[Mapserver-users] Perl Mapscript (with Mapserver-3.6.3) on Redhat 8 compiles, but returns __gxx_personality_v0 when tested
Dana Quinn
dana at nextbus.com
Tue Dec 17 10:59:03 PST 2002
Jonathan, etal-
I had the same problem using perl mapscript. I think you
basically need to compile the lib with c++ instead of the regular
gcc. The way I did it was really low tech, because I couldn't
figure out what needed to be in Makefile.PL or Makefile.
here is exactly what I did: (my build environment is sorta
strange, don't worry about all the extra -I's)
[prompt]$ perl Makefile.PL
-I/u1/src/ms/mapserver-3.6.3 -I/u1/src/ms/proj/include -I/u1/src/ms/gd
-L/u1/src/ms/mapserver-3.6.3 -lmap -L/u1/src/ms/gd -lgd
-L/u1/src/ms/freetype2/lib -lfreetype -lz -L/u1/src/ms/freetype2/lib
-lfreetype -lz -L/u1/src/ms/proj/lib -lproj -lm
Writing Makefile for mapscript
[prompt]$ make
cp mapscript.pm blib/lib/mapscript.pm
cc -c -I/u1/src/ms/mapserver-3.6.3 -I/u1/src/ms/proj/include
-I/u1/src/ms/gd -fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O3 -DVERSION=\"\"
-DXS_VERSION=\"\" -fpic "-I/usr/local/lib/perl5/5.8.0/i686-linux/CORE"
-DIGNORE_MISSING_DATA -DUSE_EPPL -DUSE_PROJ -DUSE_PROJ_API_H
-DUSE_GD_GIF -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_GDIMAGEGIFPTR
mapscript_wrap.c
Running Mkbootstrap for mapscript ()
chmod 644 mapscript.bs
rm -f blib/arch/auto/mapscript/mapscript.so
LD_RUN_PATH="/u1/src/ms/mapserver-3.6.3:/u1/src/ms/gd:/u1/src/ms/freetype2/lib:/usr/lib:/u1/src/ms/proj/lib:/lib"
cc -shared -L/usr/local/lib mapscript_wrap.o -o
blib/arch/auto/mapscript/mapscript.so -L/u1/src/ms/mapserver-3.6.3
-lmap -L/u1/src/ms/gd -lgd -L/u1/src/ms/freetype2/lib -lfreetype -lz
-L/u1/src/ms/freetype2/lib -lfreetype -lz -L/u1/src/ms/proj/lib -lproj -lm
chmod 755 blib/arch/auto/mapscript/mapscript.so
cp mapscript.bs blib/arch/auto/mapscript/mapscript.bs
chmod 644 blib/arch/auto/mapscript/mapscript.bs
then - I took the last line that ran cc - copy and paste it back onto
the command line, and then edit the 'cc' to be 'c++'
and then run it:
[prompt]$
LD_RUN_PATH="/u1/src/ms/mapserver-3.6.3:/u1/src/ms/gd:/u1/src/ms/freetype2/lib:/usr/lib:/u1/src/ms/proj/lib:/lib"
c++ -shared -L/usr/local/lib mapscript_wrap.o -o
blib/arch/auto/mapscript/mapscript.so -L/u1/src/ms/mapserver-3.6.3
-lmap -L/u1/src/ms/gd -lgd -L/u1/src/ms/freetype2/lib -lfreetype -lz
-L/u1/src/ms/freetype2/lib -lfreetype -lz -L/u1/src/ms/proj/lib -lproj -lm
and as far as I can tell, the lib works fine. sorry for the bad
linewrap, hopefully you get the idea. Hopefully someone smarter than me
can figure out how to include this in configuration. :)
Dana
Jonathan W. Lowe wrote:
> List:
>
> Has anyone successfully compiled and run Perl Mapscript (from the
> Mapserver-3.6.3 distribution) on Redhat 8?
>
> Thanks to the mapserver-user list archive, I was able to install
> mapserver-3.6.3 on redhat 8 successfully by replacing (CC) with (CXX)
> such as in the following example:
>
> Original:
> shp2img: libmap.a shp2img.o map.h
> $(CC) $(CFLAGS) shp2img.o $(LDFLAGS) $(STATIC_LIBS) -o shp2img
>
> Changed to:
> shp2img: libmap.a shp2img.o map.h
> $(CXX) $(CFLAGS) shp2img.o $(LDFLAGS) $(STATIC_LIBS) -o shp2img
>
> Perl Mapscript also compiles when the line...
> SWIGEXPORT(void) boot_mapscript(CV* cv);
> ...is replaced with...
> XS(boot_mapscript);
> ...in the mapscript_wrap.c file.
>
> However, when referencing the resulting mapscript.pm module in a perl
> script (see reference example below), the dreaded __gxx_personality_v0
> raises its ugly head (see error details below). Have any others on the
> list succeeded in compiling and running perl mapscript on redhat 8?
>
> Example of ms_test.pl script reference to perl mapscript:
>
> #!/usr/bin/perl -w
> use lib
> '/home/gisweb/local/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi';
> # Location of mapscript.pm
> use mapscript;
> # --- End of ms_test.pl --- #
>
> The resulting error message when running "perl ms_test.pl":
>
> Can't load
> '/home/gisweb/local/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/mapscript/mapscript.so' for module mapscript: /home/gisweb/local/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/mapscript/mapscript.so: undefined symbol: __gxx_personality_v0 at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229.
> at
> /home/gisweb/local/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/mapscript.pm line 7
> Compilation failed in require at ms_test.pl line 3.
> BEGIN failed--compilation aborted at ms_test.pl line 3.
>
> An advanced thank you for any advice or suggestions,
>
> Jonathan W. Lowe
> jlowe at giswebsite.com
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
--
Dana Quinn, dana at nextbus.com
NextBus Information Systems
(510) 420-3117
More information about the MapServer-users
mailing list