Opened 10 years ago

Closed 10 years ago

#5473 closed defect (worksforme)

Error Building GDAL 1.11.0 on Ubuntu 14.04

Reported by: drewlesueur Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.11.0
Severity: normal Keywords: build error
Cc: drewalex@…

Description

I get a error: 'error_ptr' was not declared in this scope after running "./configure", then "make". Larger output:

make[2]: Entering directory `/root/gdal-1.11.0/frmts/arg'
/bin/bash /root/gdal-1.11.0/libtool --mode=compile --tag=CXX g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME  -Wall  -I/usr/local/include/json-c -I../raw -I/root/gdal-1.11.0/port -I/root/gdal-1.11.0/gcore -I/root/gdal-1.11.0/alg -I/root/gdal-1.11.0/ogr -I/root/gdal-1.11.0/ogr/ogrsf_frmts -DOGR_ENABLED -I/root/gdal-1.11.0/port  -c -o ../o/argdataset.lo argdataset.cpp
libtool: compile:  g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -I/usr/local/include/json-c -I../raw -I/root/gdal-1.11.0/port -I/root/gdal-1.11.0/gcore -I/root/gdal-1.11.0/alg -I/root/gdal-1.11.0/ogr -I/root/gdal-1.11.0/ogr/ogrsf_frmts -DOGR_ENABLED -I/root/gdal-1.11.0/port -c argdataset.cpp  -fPIC -DPIC -o ../o/.libs/argdataset.o
argdataset.cpp: In function 'json_object* GetJsonObject(CPLString)':
argdataset.cpp:142:57: error: 'error_ptr' was not declared in this scope
     if (pJSONObject == (struct json_object*)error_ptr(-1) || pJSONObject == NULL) {
                                                         ^
argdataset.cpp: In function 'const char* GetJsonValueStr(json_object*, CPLString)':
argdataset.cpp:156:31: warning: 'json_object* json_object_object_get(json_object*, const char*)' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
     json_object * pJSONItem = json_object_object_get(pJSONObject, pszKey.c_str());
                               ^
argdataset.cpp:156:81: warning: 'json_object* json_object_object_get(json_object*, const char*)' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
     json_object * pJSONItem = json_object_object_get(pJSONObject, pszKey.c_str());
                                                                                 ^
make[2]: *** [../o/argdataset.lo] Error 1
make[2]: Leaving directory `/root/gdal-1.11.0/frmts/arg'
make[1]: *** [arg-install-obj] Error 2
make[1]: Leaving directory `/root/gdal-1.11.0/frmts'
make: *** [frmts-target] Error 2

Thank you, Drew

Change History (2)

comment:1 by Even Rouault, 10 years ago

I see a /usr/local/include/json-c, so you're probably using an unexpected version. There's a libjson-c provided by Ubuntu 14.04. Why not using it ? Otherwise you could ./configure --with-libjson-c=internal

comment:2 by Even Rouault, 10 years ago

Resolution: worksforme
Status: newclosed

I've just compiled succesfully GDAL against the standard libjson-c provided by Ubuntu 14.04. So I do suspect an older version installed in your /usr/local

Note: See TracTickets for help on using tickets.