[GRASS-dev] compiling today's grass7 trunk: ogr_srs_api.h: No such file or directory

Moritz Lennert mlennert at club.worldonline.be
Thu Jun 18 16:17:43 EDT 2009


On 18/06/09 20:12, Glynn Clements wrote:
> Moritz Lennert wrote:
> 
>>>> In swig/python/Makefile, I see
>>>>
>>>> proj_wrap_c_FLAGS = $(PROJINC) $(GDALCFLAGS)
>>>>
>>>> but I don't really understand where this comes into play.
>>> This should ensure that proj_wrap.c can find the PROJ and GDAL 
>>> headers.
>> Yes, but what I meant is that I don't see where the proj_wrap_c_FLAGS
>> variable is read.
> 
> include/Make/Compile.make:
> 
> $(OBJDIR)/%.o : %.c $(LOCAL_HEADERS) $(EXTRA_HEADERS) $($*_c_FLAGS) | $(OBJDIR)
> 	$(call compiler_c)
> 
> $* is the stem, i.e. the part of the name which the % matches, so if
> the target is $(OBJDIR)/proj_wrap.c, $* is proj_wrap and $*_c_FLAGS is
> proj_wrap_c_FLAGS.

Thanks and sorry, should have been able to find this myself...

> 
> Except ... variables in dependency lines are substituted when the file
> is read, and proj_wrap_c_FLAGS hasn't been defined at that point. I'll
> change the compilation rules to move this into the actions.
> 
> Try r37929; I can't easily test it, as neither PROJ nor GDAL require
> any -I switches on my system.
> 

Now it get's further, but fails with apparently the same problem at:

gcc
-I/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include
-I/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include
-Wall -g -O2    -fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
  -DPACKAGE=\""grasslibs"\"
-I/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include
-I/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include -o
OBJ.i486-pc-linux-gnu/vector_wrap.o -c vector_wrap.c
In file included from
/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include/grass/vect/digit.h:3,
                  from
/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include/grass/Vect.h:4,
                  from vector_wrap.c:2731:
/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include/grass/vect/dig_structs.h:24:21: 

error: ogr_api.h: No such file or directory
In file included from
/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include/grass/vect/digit.h:3,
                  from
/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include/grass/Vect.h:4,
                  from vector_wrap.c:2731:
/home/mlennert/SRC/GRASS/grass_trunk/dist.i486-pc-linux-gnu/include/grass/vect/dig_structs.h:183: 

error: expected specifier-qualifier-list before 'OGRDataSourceH'
vector_wrap.c: In function '_wrap_Format_info_ogr_ds_set':
vector_wrap.c:18561: error: 'struct Format_info_ogr' has no member named
'ds'
[...]

Moritz


More information about the grass-dev mailing list