Hi
Some updates on this issue:
Thomas Hirsch updated the source of the FYBA library:
https://github.com/kartverket/fyba/commit/a9cd3e740e78f319f73b74348ac71876805d7a5a
Following the instructions there, libfyba can be build on Ubuntu 12.04.
So, now I have the fyba library in /usr/local/lib
As a next step I edited some of the GDAL makefiles analog to the builds hints for windows:
In GDALmake.opt.in I added in the list of libs (line 42):
<pre class="wiki">$(SOSI_LIBS)</pre>
Further down I added a section for SOSI-support:
<pre class="wiki">
#
# SOSI
#
SOSI_INC_DIR = -I/usr/local/include/fyba
SOSI_LIBS = /usr/local/lib/libfyba.a \
/usr/local/lib/libfygm.a \
/usr/local/lib/libfyut.a
HAVE_SOSI = YES
<pre>
In ogr/ogrsf_frmts/GNUmakefile I added
<pre class="wiki">
sosi
</pre>
to the SUBDIRS and
a line
<pre class="wiki">
SUBDIRS-$(HAVE_SOSI) += sosi
</pre>
Finally I added in ogr/ogrsf_frmts/generic/GNUmakefile a line
<pre class="wiki">
-DSOSI_ENABLED \
</pre>
In the list of BASEFORMATS.
Now also 'make' runs, but 'make install' throws an error:
<pre class="wiki">
make -C sosi
make[3]: Entering directory `/data/home/stefan/src/gdal_1_8/gdal/ogr/ogrsf_frmts/sosi'
make[3]: *** No targets specified and no makefile found. Stop.
make[3]: Leaving directory `/data/home/stefan/src/gdal_1_8/gdal/ogr/ogrsf_frmts/sosi'
make[2]: *** [sosi-target] Error 2
make[2]: Leaving directory `/data/home/stefan/src/gdal_1_8/gdal/ogr/ogrsf_frmts'
make[1]: *** [sublibs] Error 2
make[1]: Leaving directory `/data/home/stefan/src/gdal_1_8/gdal/ogr'
make: *** [ogr-target] Error 2
</pre>
So I added a makefile in the sosi subdir containing:
<pre class="wiki">
include ../../../GDALmake.opt
OBJ = ogrsosidriver.o ogrsosidatasource.o ogrsosilayer.o fyba_melding.o \
EXTRAFLAGS = -I.. -I..\.. -I$(SOSI_INC_DIR)
GDAL_ROOT = ..\..\..
default: $(OBJ)
clean:
rm -f $(OBJ)
</pre>
Compiled without libtool (because I got a libtool error on make or make install) I get the following error messages:
<pre class="wiki">
In file included from ogr_sosi.h:34:0,
from ogrsosidatasource.cpp:30:
/usr/local/include/fyba/fyba.h:88:24: fatal error: ../GM/fygm.h: No such file or directory
compilation terminated.
In file included from ogr_sosi.h:34:0,
from ogrsosidriver.cpp:30:
/usr/local/include/fyba/fyba.h:88:24: fatal error: ../GM/fygm.h: No such file or directory
compilation terminated.
In file included from ogr_sosi.h:34:0,
from ogrsosilayer.cpp:30:
/usr/local/include/fyba/fyba.h:88:24: fatal error: ../GM/fygm.h: No such file or directory
compilation terminated.
fyba_melding.cpp:30:21: fatal error: windows.h: No such file or directory
compilation terminated.
make[3]: *** [ogrsosidriver.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [ogrsosilayer.o] Error 1
make[3]: *** [ogrsosidatasource.o] Error 1
make[3]: *** [fyba_melding.o] Error 1
make[2]: *** [sosi-target] Error 2
make[2]: *** Waiting for unfinished jobs....
</pre>
Now it seems some paths in ogr_sosi.h and fyba.h are in the disorder...
Maybe something to be fixed in the FYBA lib?
Cheers
Stefan
P.S.: Sorry for the long post...
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Compile-GDAL-OGR-with-SOSI-support-tp5045207p5045729.html">Re: Compile GDAL/OGR with SOSI support</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html">GDAL - Dev mailing list archive</a> at Nabble.com.<br/>