Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5755 closed defect (fixed)

failure to build against json-c master

Reported by: Jeff McKenna Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: ConfigBuild Version: unspecified
Severity: normal Keywords: libjson-c
Cc:

Description

  • issue seems similar to ticket#5449
  • using json-c master and gdal-trunk
  • platform: Ubuntu 14.04.1 LTS
  • error during compile of GDAL:
libtool: compile:  g++ -I/home/jmckenna/src/gdal-trunk/port -I/home/jmckenna/src/gdal-trunk/gcore -I/home/jmckenna/src/gdal-trunk/alg -I/home/jmckenna/src/gdal-trunk/ogr -I/home/jmckenna/src/gdal-trunk/ogr/ogrsf_frmts -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -Wunused-parameter -I/usr/local/include/json-c -I../raw -DOGR_ENABLED -I/home/jmckenna/src/gdal-trunk/port -DGDAL_COMPILATION -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:295) [-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:295) [-Wdeprecated-declarations]
     json_object * pJSONItem = json_object_object_get(pJSONObject, pszKey.c_str());

Change History (3)

comment:1 by Even Rouault, 9 years ago

Component: defaultConfigBuild
Keywords: libjson-c added
Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r28021 "ARG: remove test against error_ptr(-1) that is historical value, no longer returned by libjson-c >= 0.11 (#5755)"

I didn't actually try compiling against json-c master, so other errors could potentially popup. Reopen if needed.

comment:2 by Jeff McKenna, 9 years ago

verified with json-c master. Thanks!!!

comment:3 by Even Rouault, 9 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.