Hi,
after the recent update I can no longer compile the GRASS 6 SWIG interface
(one bug just fixed, now got this):
make
...
c++ -shared -o _grass.so
-L/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/lib
-Wl,--no-undefined -Wl,--export-dynamic -L/usr/lib64
-Wl,-rpath-link,/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/lib
-L/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/lib
-lpthread -ldl -lutil -lm -lpython2.6
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o -lgrass_gis -lgrass_datetime
-lz
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_alloc_vector':
/home/neteler/grass64/swig/python/grass_wrap.c:26147: undefined
reference to `G_alloc_vector'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_alloc_matrix':
/home/neteler/grass64/swig/python/grass_wrap.c:26178: undefined
reference to `G_alloc_matrix'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_alloc_fvector':
/home/neteler/grass64/swig/python/grass_wrap.c:26200: undefined
reference to `G_alloc_fvector'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_alloc_fmatrix':
/home/neteler/grass64/swig/python/grass_wrap.c:26231: undefined
reference to `G_alloc_fmatrix'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_free_vector':
/home/neteler/grass64/swig/python/grass_wrap.c:26252: undefined
reference to `G_free_vector'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_free_matrix':
/home/neteler/grass64/swig/python/grass_wrap.c:26273: undefined
reference to `G_free_matrix'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_free_fvector':
/home/neteler/grass64/swig/python/grass_wrap.c:26294: undefined
reference to `G_free_fvector'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_free_fmatrix':
/home/neteler/grass64/swig/python/grass_wrap.c:26315: undefined
reference to `G_free_fmatrix'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_tqli':
/home/neteler/grass64/swig/python/grass_wrap.c:26817: undefined
reference to `G_tqli'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function
`_wrap_G_tred2':
/home/neteler/grass64/swig/python/grass_wrap.c:26865: undefined
reference to `G_tred2'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_alloc_ivector':
/home/neteler/grass64/swig/python/grass_wrap.c:31553: undefined
reference to `G_alloc_ivector'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_alloc_imatrix':
/home/neteler/grass64/swig/python/grass_wrap.c:31584: undefined
reference to `G_alloc_imatrix'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_free_ivector':
/home/neteler/grass64/swig/python/grass_wrap.c:31605: undefined
reference to `G_free_ivector'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_free_imatrix':
/home/neteler/grass64/swig/python/grass_wrap.c:31626: undefined
reference to `G_free_imatrix'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_ludcmp':
/home/neteler/grass64/swig/python/grass_wrap.c:33659: undefined
reference to `G_ludcmp'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_lubksb':
/home/neteler/grass64/swig/python/grass_wrap.c:33707: undefined
reference to `G_lubksb'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_svdcmp':
/home/neteler/grass64/swig/python/grass_wrap.c:42439: undefined
reference to `G_svdcmp'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_svbksb':
/home/neteler/grass64/swig/python/grass_wrap.c:42515: undefined
reference to `G_svbksb'
OBJ.x86_64-unknown-linux-gnu/grass_wrap.o: In function `_wrap_G_svelim':
/home/neteler/grass64/swig/python/grass_wrap.c:42546: undefined
reference to `G_svelim'
collect2: ld returned 1 exit status
Apparently GMATHlib isn't found? (it is compiled)
Ah, or in 7 the headers are in
grass70/include/gmath.h
while in 6 they are in
grass6/include/gisdefs.h
Swig seems to get that wrong... need to move the declarations?
thanks
Markus
Markus Neteler wrote:
after the recent update I can no longer compile the GRASS 6 SWIG interface
Apparently GMATHlib isn't found? (it is compiled)
Ah, or in 7 the headers are in
grass70/include/gmath.h
while in 6 they are in
grass6/include/gisdefs.h
Swig seems to get that wrong... need to move the declarations?
This was changed in r35274:
http://trac.osgeo.org/grass/changeset/35274
It's no coincidence that r35275 (which was comitted less than two
minutes later) was the one which added the SWIG files for the other
libraries:
http://trac.osgeo.org/grass/changeset/35275
Hmm; you could probably just add $(GMATHLIB) to grass_LIBS, but that
means that anything which wants to use libgis from Python ends up
pulling in the gmath library, possibly along with BLAS/LAPACK and
FFTW. And BLAS/LAPACK can have some fairly obscure issues related to
gcc's Fortran support.
--
Glynn Clements <glynn@gclements.plus.com>
On Fri, May 29, 2009 at 4:58 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:
Markus Neteler wrote:
after the recent update I can no longer compile the GRASS 6 SWIG interface
Apparently GMATHlib isn't found? (it is compiled)
Ah, or in 7 the headers are in
grass70/include/gmath.h
while in 6 they are in
grass6/include/gisdefs.h
Swig seems to get that wrong... need to move the declarations?
This was changed in r35274:
http://trac.osgeo.org/grass/changeset/35274
I see... (somewhat)
It's no coincidence that r35275 (which was comitted less than two
minutes later) was the one which added the SWIG files for the other
libraries:
http://trac.osgeo.org/grass/changeset/35275
Hmm; you could probably just add $(GMATHLIB) to grass_LIBS, but that
That helps but ends in
/home/neteler/grass64/swig/python/raster_wrap.c:3777: undefined
reference to `unlock_driver'
Adding $(RASTERLIB) won't solve that.
means that anything which wants to use libgis from Python ends up
pulling in the gmath library, possibly along with BLAS/LAPACK and
FFTW. And BLAS/LAPACK can have some fairly obscure issues related to
gcc's Fortran support.
That's definitely undesired...
Markus
Markus Neteler wrote:
/home/neteler/grass64/swig/python/raster_wrap.c:3777: undefined
reference to `unlock_driver'
Fixed in r37598 (in 6.5).
> means that anything which wants to use libgis from Python ends up
> pulling in the gmath library, possibly along with BLAS/LAPACK and
> FFTW. And BLAS/LAPACK can have some fairly obscure issues related to
> gcc's Fortran support.
That's definitely undesired...
In which case, the declarations for the gmath functions need to be
moved from gis.h to gmath.h. Code which uses the functions may need to
be updated accordingly. See the aforementioned r35274 (or you might
just want to merge that in its entirety).
--
Glynn Clements <glynn@gclements.plus.com>
On Sat, May 30, 2009 at 6:54 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:
Markus Neteler wrote:
/home/neteler/grass64/swig/python/raster_wrap.c:3777: undefined
reference to `unlock_driver'
Fixed in r37598 (in 6.5).
I still see
cd lib/raster
[neteler@host550 raster]$ svn up
At revision 37598.
[neteler@host550 raster]$ grep unlock_dr *
rem_io.c:extern int unlock_driver(int);
Also a leftover?
> means that anything which wants to use libgis from Python ends up
> pulling in the gmath library, possibly along with BLAS/LAPACK and
> FFTW. And BLAS/LAPACK can have some fairly obscure issues related to
> gcc's Fortran support.
That's definitely undesired...
In which case, the declarations for the gmath functions need to be
moved from gis.h to gmath.h. Code which uses the functions may need to
be updated accordingly. See the aforementioned r35274 (or you might
just want to merge that in its entirety).
OK, I'll check with Martin.
Markus
On Sat, May 30, 2009 at 7:08 AM, Markus Neteler <neteler@osgeo.org> wrote:
On Sat, May 30, 2009 at 6:54 AM, Glynn Clements
...
In which case, the declarations for the gmath functions need to be
moved from gis.h to gmath.h. Code which uses the functions may need to
be updated accordingly. See the aforementioned r35274 (or you might
just want to merge that in its entirety).
OK, I'll check with Martin.
I have reviewed r35274 and (with a few modifications due to the changed
directory structure of i.smap) backported it:
- 6.5: r37599
- 6.4: 37600
The gmath troubles are fixed.
After deleting D_translate_or_add_color() and D_allocate_color()
from include/display.h, swig/python/ compiles again in GRASS 6.5/6.4.
Nice.
Markus
Markus Neteler wrote:
>> /home/neteler/grass64/swig/python/raster_wrap.c:3777: undefined
>> reference to `unlock_driver'
>
> Fixed in r37598 (in 6.5).
I still see
cd lib/raster
[neteler@host550 raster]$ svn up
At revision 37598.
[neteler@host550 raster]$ grep unlock_dr *
rem_io.c:extern int unlock_driver(int);
Also a leftover?
Yes; it no longer exists anywhere in the code.
--
Glynn Clements <glynn@gclements.plus.com>