<div dir="ltr">Jachym,<div><br></div><div>Can you try the attached configure.patch? It was missing -lgrass_raster. Without -I/usr/include/postgresql, what errors did you get?</div><div><br></div><div>Huidae</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Jul 1, 2014 at 4:42 AM, Jachym Cepicky <span dir="ltr"><<a href="mailto:jachym.cepicky@gmail.com" target="_blank">jachym.cepicky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Huidae,<br>
<br>
let me give you short progress report I have. I managed to configure,<br>
make and make install the grass-gdal plugin with the patch you<br>
provided in your last mail without problems:<br>
<br>
./configure --with-gdal=/usr/local/bin/gdal-config<br>
--with-grass=/usr/local/grass-7.1.svn/<br>
<br>
make<br>
g++ -shared grass57dataset.o -L/usr/local/grass-7.1.svn//lib<br>
-lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj<br>
-lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl<br>
-lgrass_dig2 -lgrass_rtree -lgrass_linkm -L/usr/local/lib -lgdal -o<br>
gdal_GRASS.so<br>
g++ -shared ogrgrassdriver.o ogrgrassdatasource.o ogrgrasslayer.o<br>
-L/usr/local/grass-7.1.svn//lib -lgrass_gmath -lgrass_gis<br>
-lgrass_datetime -lgrass_gproj -lgrass_vector -lgrass_dbmibase<br>
-lgrass_dbmiclient -lgrass_dgl -lgrass_dig2 -lgrass_rtree<br>
-lgrass_linkm -L/usr/local/lib -lgdal -o ogr_GRASS.so<br>
<br>
sudo make install<br>
install -d /usr/local/lib/gdalplugins<br>
cp gdal_GRASS.so /usr/local/lib/gdalplugins<br>
cp ogr_GRASS.so /usr/local/lib/gdalplugins<br>
<br>
testing:<br>
<br>
gdalinfo --formats|grep GRASS<br>
GRASS (ro): GRASS Database Rasters (5.7+)<br>
GRASSASCIIGrid (rov): GRASS ASCII Grid<br>
<br>
ogrinfo --formats|grep GRASS<br>
-> "GRASS" (readonly)<br>
<br>
So it seems to be working. However, runing gdalinfo on certain raster<br>
file produces following error :-(<br>
<br>
gdalinfo /home/grass/grassdata/prg/interpolations/cellhd/dmt<br>
gdalinfo: symbol lookup error:<br>
/usr/local/lib/gdalplugins/gdal_GRASS.so: undefined symbol:<br>
Rast_get_cellhd<br>
<br>
Strange thing: vectors (ogr2ogr, ogrinfo) on GRASS vectors works perfectly<br>
<br>
I would say, that it's related to dynamic linker, thought, I have<br>
<br>
$ cat /etc/ld.so.conf.d/grass-7.1.conf<br>
/usr/local/grass-7.1.svn/lib/<br>
<br>
and ldconfig -p |grep grass_raster gives<br>
<br>
<a href="http://libgrass_raster.7.1.svn.so" target="_blank">libgrass_raster.7.1.svn.so</a> (libc6,x86-64) =><br>
/usr/local/grass-7.1.svn/lib/<a href="http://libgrass_raster.7.1.svn.so" target="_blank">libgrass_raster.7.1.svn.so</a><br>
libgrass_raster.so (libc6,x86-64) =><br>
/usr/local/grass-7.1.svn/lib/libgrass_raster.so<br>
<br>
Any hint?<br>
<br>
Thank you<br>
<br>
<br>
2014-06-30 10:12 GMT+02:00 Jachym Cepicky <<a href="mailto:jachym.cepicky@gmail.com">jachym.cepicky@gmail.com</a>>:<br>
<div class="HOEnZb"><div class="h5">> Worked, but had to add -I/usr/include/postgresql/ to CPPFLAGS<br>
><br>
> seems to be compiled and in gdal<br>
><br>
> thank you<br>
><br>
> 2014-06-27 12:13 GMT+02:00 Huidae Cho <<a href="mailto:grass4u@gmail.com">grass4u@gmail.com</a>>:<br>
>> Try the attached patches. The GRASS plugin works for me.<br>
>><br>
>> ./configure --with-autoload=/usr/lib/gdalplugins<br>
>> --with-grass=/your/grass/path<br>
>><br>
>> Huidae<br>
>><br>
>><br>
>> On Fri, Jun 27, 2014 at 3:11 AM, Jachym Cepicky <<a href="mailto:jachym.cepicky@gmail.com">jachym.cepicky@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Hi Martin,<br>
>>><br>
>>> ok, sorry, but I'm a bit confused from amount of patches, which are<br>
>>> attached to the ticket and none of them seems to be working on<br>
>>> gdal-grass-1.4.3.<br>
>>><br>
>>> I'm using GRASS 7.1 btw, so I hope, that is ok in general.<br>
>>><br>
>>> Could you point me please to patches, which should work with<br>
>>> <a href="http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz" target="_blank">http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz</a> ?<br>
>>><br>
>>> Thanks<br>
>>><br>
>>> 2014-06-24 22:27 GMT+02:00 Martin Landa <<a href="mailto:landa.martin@gmail.com">landa.martin@gmail.com</a>>:<br>
>>> > Hi,<br>
>>> ><br>
>>> > 2014-06-24 22:09 GMT+02:00 Jachym Cepicky <<a href="mailto:jachym.cepicky@gmail.com">jachym.cepicky@gmail.com</a>>:<br>
>>> ><br>
>>> >> I wanted to publish some maps via MapServer, using GDAL, like the old<br>
>>> >> days. But I did not succeed to get it compiled with GRASS (at first<br>
>>> >> try). What is the best way you would propose to approach?<br>
>>> >><br>
>>> >> 1 - compile gdal withnout grass<br>
>>> >> 2 - compile grass 7.1 with gdal support<br>
>>> >> 3 - compile gdal again with grass support?<br>
>>> >><br>
>>> >> It worked some years back, but does it still apply?<br>
>>> ><br>
>>> > best is to compile GRASS driver as a plugin, anyway GRASS 7 support in<br>
>>> > GDAL is still open issue [1].<br>
>>> ><br>
>>> > Martin<br>
>>> ><br>
>>> > [1] <a href="http://trac.osgeo.org/gdal/ticket/2953" target="_blank">http://trac.osgeo.org/gdal/ticket/2953</a><br>
>>> ><br>
>>> > --<br>
>>> > Martin Landa * <a href="http://geo.fsv.cvut.cz/gwiki/Landa" target="_blank">http://geo.fsv.cvut.cz/gwiki/Landa</a><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Jachym Cepicky<br>
>>> e-mail: jachym.cepicky gmail com<br>
>>> URL: <a href="http://les-ejk.cz" target="_blank">http://les-ejk.cz</a><br>
>>> GPG: <a href="http://les-ejk.cz/pgp/JachymCepicky.pgp" target="_blank">http://les-ejk.cz/pgp/JachymCepicky.pgp</a><br>
>>> _______________________________________________<br>
>>> grass-dev mailing list<br>
>>> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
>>> <a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
>><br>
>><br>
><br>
><br>
><br>
> --<br>
> Jachym Cepicky<br>
> e-mail: jachym.cepicky gmail com<br>
> URL: <a href="http://les-ejk.cz" target="_blank">http://les-ejk.cz</a><br>
> GPG: <a href="http://les-ejk.cz/pgp/JachymCepicky.pgp" target="_blank">http://les-ejk.cz/pgp/JachymCepicky.pgp</a><br>
<br>
<br>
<br>
--<br>
Jachym Cepicky<br>
e-mail: jachym.cepicky gmail com<br>
URL: <a href="http://les-ejk.cz" target="_blank">http://les-ejk.cz</a><br>
GPG: <a href="http://les-ejk.cz/pgp/JachymCepicky.pgp" target="_blank">http://les-ejk.cz/pgp/JachymCepicky.pgp</a><br>
</div></div></blockquote></div><br></div>