[gdal-dev] Error while compiling gdal 1.9.2 in Ubuntu16.04

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Error while compiling gdal 1.9.2 in Ubuntu16.04

Farook
I am trying to compile and build gdal 1.9.2 in Ubuntu 16.04.3. I am doing the
below steps

sudo wget http://download.osgeo.org/gdal/gdal192.zip
unzip gdal192.zip -d gdal
cd gdal
cd gdal-1.9.2/
sudo ./configure
make
When i run make, i am getting the below error

In file included from /usr/include/string.h:630:0,
             from /home/kcube/gdal/gdal-1.9.2/port/cpl_port.h:132,
             from /home/kcube/gdal/gdal-1.9.2/port/cpl_conv.h:34,
             from json_object.c:12:
json_object.c:29:9: error: expected identifier or '(' before '__extension__'
char* strndup(const char* str, size_t n);
     ^
GNUmakefile:23: recipe for target '../../o/json_object.lo' failed
make[4]: *** [../../o/json_object.lo] Error 1
make[4]: Leaving directory
'/home/kcube/gdal/gdal-1.9.2/ogr/ogrsf_frmts/geojson/jsonc'
../../../GDALmake.opt:539: recipe for target 'jsonc-target' failed
make[3]: *** [jsonc-target] Error 2
make[3]: Leaving directory
'/home/kcube/gdal/gdal-1.9.2/ogr/ogrsf_frmts/geojson'
../../GDALmake.opt:539: recipe for target 'geojson-target' failed
make[2]: *** [geojson-target] Error 2
make[2]: Leaving directory '/home/kcube/gdal/gdal-1.9.2/ogr/ogrsf_frmts'
GNUmakefile:51: recipe for target 'sublibs' failed
make[1]: *** [sublibs] Error 2
make[1]: Leaving directory '/home/kcube/gdal/gdal-1.9.2/ogr'
GNUmakefile:56: recipe for target 'ogr-target' failed
make: *** [ogr-target] Error 2
Any idea how to solve this error? I badly needs gdal 1.9.2 compilation to
setup ECW suuport in geoserver.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling gdal 1.9.2 in Ubuntu16.04

Even Rouault-2

On jeudi 7 septembre 2017 06:53:06 CEST Farook wrote:

> I am trying to compile and build gdal 1.9.2 in Ubuntu 16.04.3. I am doing

> the below steps

 

Be aware that this is a totally unsupported combination. 1.9.2 is really anciant, but yes I'm aware that Geoserver still requires it...

 

Anyway, I think you should probably first install the libjson-c dev package with

sudo apt-get install libjson-c-dev

(note: I didn't try with gdal 1.9.2 + ubuntu 16.04, so this might fail)

 

before ./configure again (you don't need / shouldn't do ./configure as sudo by the way)

 

For ECW support, read carefully https://trac.osgeo.org/gdal/wiki/ECW

 

Remember to do "make clean" before make each time you re-run configure

 

Even

 

 

>

> sudo wget http://download.osgeo.org/gdal/gdal192.zip

> unzip gdal192.zip -d gdal

> cd gdal

> cd gdal-1.9.2/

> sudo ./configure

> make

> When i run make, i am getting the below error

>

> In file included from /usr/include/string.h:630:0,

> from /home/kcube/gdal/gdal-1.9.2/port/cpl_port.h:132,

> from /home/kcube/gdal/gdal-1.9.2/port/cpl_conv.h:34,

> from json_object.c:12:

> json_object.c:29:9: error: expected identifier or '(' before '__extension__'

> char* strndup(const char* str, size_t n);

> ^

> GNUmakefile:23: recipe for target '../../o/json_object.lo' failed

> make[4]: *** [../../o/json_object.lo] Error 1

> make[4]: Leaving directory

> '/home/kcube/gdal/gdal-1.9.2/ogr/ogrsf_frmts/geojson/jsonc'

> ../../../GDALmake.opt:539: recipe for target 'jsonc-target' failed

> make[3]: *** [jsonc-target] Error 2

> make[3]: Leaving directory

> '/home/kcube/gdal/gdal-1.9.2/ogr/ogrsf_frmts/geojson'

> ../../GDALmake.opt:539: recipe for target 'geojson-target' failed

> make[2]: *** [geojson-target] Error 2

> make[2]: Leaving directory '/home/kcube/gdal/gdal-1.9.2/ogr/ogrsf_frmts'

> GNUmakefile:51: recipe for target 'sublibs' failed

> make[1]: *** [sublibs] Error 2

> make[1]: Leaving directory '/home/kcube/gdal/gdal-1.9.2/ogr'

> GNUmakefile:56: recipe for target 'ogr-target' failed

> make: *** [ogr-target] Error 2

> Any idea how to solve this error? I badly needs gdal 1.9.2 compilation to

> setup ECW suuport in geoserver.

>

>

>

> --

> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html

> _______________________________________________

> gdal-dev mailing list

> [hidden email]

> https://lists.osgeo.org/mailman/listinfo/gdal-dev

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error while compiling gdal 1.9.2 in Ubuntu16.04

Farook
I tried installing libjson as per the suggestion
sudo apt-get install libjson-c-dev
and did
wget http://download.osgeo.org/gdal/gdal192.zip
unzip gdal192.zip -d gdal
cd gdal
cd gdal-1.9.2/
./configure
make clean
make
again am getting the same error



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev