Opened 16 years ago

Closed 11 years ago

#564 closed defect (worksforme)

python_grass7 compilation

Reported by: neuba Owned by: grass-dev@…
Priority: major Milestone: 7.0.0
Component: Compiling Version: svn-trunk
Keywords: swig Cc:
CPU: x86-32 Platform: Linux

Description

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

Change History (7)

comment:1 by neuba, 16 years ago

CPU: Unspecifiedx86-32
Platform: UnspecifiedLinux
Resolution: fixed
Status: newclosed

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.

comment:2 by hamish, 16 years ago

Component: defaultCompiling
Keywords: swig added
Priority: normalmajor
Resolution: fixed
Status: closedreopened
Version: unspecifiedsvn-trunk

I see the bug too on debian/lenny + amd64.

the problem is a missing -I$(GDALCFLAGS) in the Makefile, not user error.

...
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/vector_wrap.o -c vector_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 vector_wrap.c:2731:
/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
...

the vars seem to be set correctly:

Platform.make:GDALCFLAGS          = -I/usr/include/gdal
Platform.make:PROJINC             =  $(GDALCFLAGS)

source:grass/trunk/swig/python/Makefile@#L31 :

vector_wrap_c_FLAGS = $(VECT_INC)
proj_wrap_c_FLAGS = $(PROJINC) $(GDALCFLAGS)

Hamish

in reply to:  2 comment:3 by mlennert, 16 years ago

Replying to hamish:

I see the bug too on debian/lenny + amd64.

the problem is a missing -I$(GDALCFLAGS) in the Makefile, not user error.

Also see this thread: http://lists.osgeo.org/pipermail/grass-dev/2009-June/044588.html

Moritz

comment:4 by hamish, 16 years ago

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

Hamish

comment:5 by wenzeslaus, 11 years ago

What is the status of this ticket? Does it apply to the current trunk (r59060)?

in reply to:  5 ; comment:6 by mlennert, 11 years ago

Replying to 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.

Moritz

in reply to:  6 comment:7 by wenzeslaus, 11 years ago

Resolution: worksforme
Status: reopenedclosed

Replying to mlennert:

Replying to 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.

Note: See TracTickets for help on using tickets.