#564: python_grass7 compilation
-------------------------+--------------------------------------------------
Reporter: neuba | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: default | Version: unspecified
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
I am trying to compile python_grass7 (i configure grass using this
command: ./configure --with-cxx --with-python=/usr/bin/python2.5-config
--with-wxwidgets=/usr/bin/wx-config --with-postgres --enable-largefile
--with-cairo --with-proj-share=/usr/share/proj/ --without-freetype --with-
gdal=/usr/bin/gdal-config --with-proj-includes=/usr/include/) but i got
the following error:
ake[1]: entrant dans le répertoire «
/home/danho/gis_soft/grass_trunk/swig/python »
make[1]: « /home/danho/gis_soft/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/_utils.so » est à jour.
make[1]: « /home/danho/gis_soft/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/_date.so » est à jour.
make[1]: « /home/danho/gis_soft/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/_grass.so » est à jour.
make[1]: « /home/danho/gis_soft/grass_trunk/dist.i686-pc-linux-
gnu/etc/python/swig/_math.so » est à jour.
gcc -I/home/danho/gis_soft/grass_trunk/dist.i686-pc-linux-gnu/include -g
-O2 -fPIC -I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/home/danho/gis_soft/grass_trunk/dist.i686-
pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/proj_wrap.o -c proj_wrap.c
Dans le fichier inclus à partir de proj_wrap.c:2623:
/home/danho/gis_soft/grass_trunk/dist.i686-pc-linux-
gnu/include/grass/gprojects.h:23:29: erreur: ogr_srs_api.h : Aucun fichier
ou dossier de ce type
In file included from proj_wrap.c:2623:
/home/danho/gis_soft/grass_trunk/dist.i686-pc-linux-
gnu/include/grass/gprojects.h:84: erreur: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘GPJ_grass_to_osr’
/home/danho/gis_soft/grass_trunk/dist.i686-pc-linux-
gnu/include/grass/gprojects.h:88: erreur: expected declaration specifiers
or ‘...’ before ‘OGRSpatialReferenceH’
make[1]: *** [OBJ.i686-pc-linux-gnu/proj_wrap.o] Erreur 1
make[1]: quittant le répertoire «
/home/danho/gis_soft/grass_trunk/swig/python »
make: *** [default] Erreur 2
* status: new => closed
* platform: Unspecified => Linux
* resolution: => fixed
* cpu: Unspecified => x86-32
Comment:
Ok I finally solve my problem. I modified gproject.h and dig_struct.h by
adding gdal like gdal/ogr_api.h or gdal/ogr_srs_api.h and it solve the
problem.
Replying to [comment:2 hamish]:
> I see the bug too on debian/lenny + amd64.
>
> the problem is a missing -I$(GDALCFLAGS) in the Makefile, not user
error.
Glynn:
> Er, right. It's using $(VECT_INC), which is always empty.
> It should be using $(VECT_CFLAGS), which contains $(GDALCFLAGS).
> Try r37944.
Ok, now it gets a little further but fails on vedit_wrap.c:
{{{
gcc -I/usr/src/grass/svn/trunk/dist.x86_64-unknown-linux-gnu/include
-I/usr/src/grass/svn/trunk/dist.x86_64-unknown-linux-gnu/include -ggdb
-march=amdfam10 -Wall -Werror-implicit-function-declaration -fPIC
-I/usr/include/python2.5 -I/usr/include/python2.5
-DPACKAGE=\""grasslibs"\" -I/usr/src/grass/svn/trunk/dist.x86_64-
unknown-linux-gnu/include -I/usr/src/grass/svn/trunk/dist.x86_64-unknown-
linux-gnu/include -o OBJ.x86_64-unknown-linux-gnu/vedit_wrap.o -c
vedit_wrap.c
In file included from /usr/src/grass/svn/trunk/dist.x86_64-unknown-linux-
gnu/include/grass/vect/digit.h:3,
from /usr/src/grass/svn/trunk/dist.x86_64-unknown-linux-
gnu/include/grass/Vect.h:4,
from /usr/src/grass/svn/trunk/dist.x86_64-unknown-linux-
gnu/include/grass/vedit.h:5,
from vedit_wrap.c:2693:
/usr/src/grass/svn/trunk/dist.x86_64-unknown-linux-
gnu/include/grass/vect/dig_structs.h:24:21: error: ogr_api.h: No such file
or directory
}}}
Replying to [comment:6 mlennert]:
> Replying to [comment:5 wenzeslaus]:
> > What is the status of this ticket? Does it apply to the current trunk
(r59060)?
>
> I haven't seen this issue pop up in a long time, so I would consider it
fixed.
>
Compiling works now. This is probably some old bug which does not apply to
current code at all. Closing as worksforme.