#2723 closed defect (fixed)
failure to build against external json-c 0.12
Reported by: | landry | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.1.4 |
Component: | postgis | Version: | 2.1.x |
Keywords: | history | Cc: | brunofriedmann |
Description
Similar to http://trac.osgeo.org/gdal/ticket/5449, postgis as is fails to build against json-c 0.12 since they removed the extern json_tokener_errors array, deprecated in favor of json_tokener_error_desc() present since 0.10.
I've fixed it locally using http://www.openbsd.org/cgi-bin/cvsweb/ports/geo/postgis/patches/patch-liblwgeom_lwin_geojson_c?rev=1.1 but maybe a better fix could be commited upstream, depending if we want to require json 0.10 or still want to support older versions.
I can provide a patch if needed.
Attachments (1)
Change History (16)
comment:1 by , 11 years ago
Milestone: | → PostGIS 2.2.0 |
---|
comment:2 by , 11 years ago
slackware has 0.10, gentoo has 0.11 with 0.12 available as alternative, archlinux has 0.11, fedora has 0.11, redhat/centos 6 (and 5?) has 0.10, debian stable has 0.10 and 0.11 in testing/unstable.. so i think 0.10 is a safe bet at that point.
comment:3 by , 11 years ago
okay then I think for cleanness we should probably make 0.10+ a requirement for PostGIS 2.2 (especially since newer stable GDAL has that as a minimum too). For 2.1 we'd need an uglier hack that supports older.
comment:4 by , 11 years ago
Milestone: | PostGIS 2.2.0 → PostGIS 2.1.3 |
---|
I run into the same issue on Debian, where I need the postgis package to compile against both, old and new json(-c). While r12347 (fixing #2539) is a step in the right direction, it's clearly not sufficient.
I've attached the patch that I'm going to use for Debian to allow postgis to compile if a new json-c is installed.
comment:5 by , 10 years ago
I've applied a patch to trunk that works for me, and hopefully others, trying to support json-c 12, which has removed some symbols and re-located where the install is.
In terms of supporting older versions, I'll have to get the source and see what's changed. I did check back to 0.10 and this fix should work back to there.
comment:6 by , 10 years ago
We're documenting minimum requirement to be 0.9 for the 2.1 branch — The 2.2 branch I marked as requiring 0.10 minimum with r12653.
A patch is still needed to add support for 0.12 in 2.1 w/out breaking support for 0.9
comment:7 by , 10 years ago
I just noticed Travis build is failing for trunk due to the json-c version used by travis not having json_tokener_error_desc: https://travis-ci.org/postgis/postgis/builds/28394436#L1330
comment:10 by , 10 years ago
Cc: | added |
---|
comment:11 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:13 by , 10 years ago
Keywords: | history added |
---|
comment:14 by , 10 years ago
for the record, PostGIS 2.0 cannot build with libjson-0.12, PostGIS 2.1 can (cc robe)
landry,
I think for PostGIS 2.2 json 0.10 or above as an option is probably okay. For 2.1 we still need to support the older versions (which I think is like 0.8 or somethig). I'm also not quite clear how easy it is for folks to upgrade their json-c on Linux so I'm even a bit leary about requiring a higher version in 2.2.
pramsey, dustymugs, strk — have an opinion on this?