[Mapserver-users] _gxx_personality_v0

Frank Warmerdam warmerdam at pobox.com
Wed Mar 12 08:52:00 PST 2003


> gcc -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL    -DUSE_TIFF -DUSE_JPEG 
> -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT        -I/usr/include              
> shp2img.o  -L. -lmap -lgd -L/usr/lib -lgd -ljpeg -lttf -lpng -lz  -ltiff 
> -ljpeg -lttf -lpng -lz  -ljpeg          -lm   -o shp2img
> ./libmap.a(mapogr.o)(.eh_frame+0x11): undefined reference to 
> `__gxx_personality_v0'
> collect2: ld returned 1 exit status
> make: *** [shp2img] Error 1

Folks,

Just in case it isn't in other responses from earlier, a solution to this
(presumably) is to use the C++ compiler as the linker instead of the C
compiler.  This can be accomplished by editing the makefile and changing
"LD=gcc" to "LD=c++" or more generally to "LD=$(CXX)".  Or just do the
same on the command line "make LD=c++".

Presumably the 3.7 configure scripts will produce a Makefile with this
done if they don't already.

Actually, I don't get this error myself on Red Hat 8, with gcc 3.2.  It would
appear to be because the libgdal.1.1.so is already linked against
/usr/lib/libstdc++.so.5 which provides the C++ support.

If anyone running into this problem finds that my suggested change to LD
does not solve their problem, I would encourage them to contact me directly
by email, and we will resolve the problem and I will try to see the fix gets
into 3.7 (and perhaps a 3.6.5) if it has not already.

PS. If you don't need OGR just configure without it and you won't run into
this problem.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the MapServer-users mailing list