[Gdal-dev] Re: swig/perl CVS compile issue

Ari Jolma ari.jolma at tkk.fi
Tue Oct 31 13:30:04 EST 2006


Ethan Alpert kirjoitti:
> Ari, et al,
>
> I downloaded the CVS version of gdal yesterday and got a compile error
> in the swig perl directory. The problem is with gdalconst_wrap.c . Since
> it's a .c and not a .cpp it is compiled with gcc (I'm using version gcc
> 3.2.3 and perl 5.8.0). When I manually compile with g++ I get no errors.
>   

Ok, my fault. The CCFLAGS=>"-fpic" which I added to Makefile.PL last 
June is the culprit. I don't remember why I added it, in the Makefile.PL 
I comment "needed for SELinux". The problem is that "-fpic" should be 
probably added to CFLAGS for SELinux, now it overrides the default contents.

I don't know how to add to CCFLAGS, so maybe this line should be 
commented out and SELinux dealt separately somehow.

Renaming the file to gdalconst_wrap.cpp seems to help too.

Ari

> Below is the error:
>
> gcc -c  -I../../gcore -I../../alg -I../../ogr -I../../port -fpic -O2 -g
> -pipe -march=i386 -mcpu=i686   -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC
> "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   gdalconst_wrap.c
> In file included from
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/op.h:480,
>                  from
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/perl.h:2268,
>                  from gdalconst_wrap.c:705:
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/reentr.h:602: field
> `_crypt_struct' has incomplete type
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/reentr.h:747: confused
> by earlier errors, bailing out
> make[1]: *** [gdalconst_wrap.o] Error 1
> make[1]: Leaving directory
> `/home/ealpert/src/geo_build_mongoose/base_libraries/gdal/swig/perl'
> make: *** [build] Error 2
>
>
> Compiling with g++ creates the .o successfully:
>
> -bash-2.05b$ g++ -c  -I../../gcore -I../../alg -I../../ogr -I../../port
> -fpic -O2 -g -pipe -march=i386 -mcpu=i686   -DVERSION=\"\"
> -DXS_VERSION=\"\" -fPIC
> "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE"   gdalconst_wrap.c
> -bash-2.05b$
>
>   


-- 
Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka
Geoinformation and positioning technology
Teknillinen Korkeakoulu / Helsinki University of Technology
POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma




More information about the Gdal-dev mailing list