[postgis-users] FW: json/json.h: No such file or directory

Paragon Corporation lr at pcorp.us
Sat Aug 16 11:59:51 PDT 2014


Gery,

What OS are you on and what chain are you using to build with?  Looks like
you are building with Cygwin.  I'm not sure we've tested with that. I use
mingw64 and rest of developer group are on Mac, Debian, Ubuntu, EL, CentOS.


Does the 2.1 branch work for you?  You don't need to use 2.2.  The issue
should be fixed in 2.1 branch.

http://postgis.net/source (sorry just realized I don't have the 2.1 dev
source tar ball listed) I'll update shortly

2.1.4dev tar ball is here : http://postgis.net/stuff/postgis-2.1.4dev.tar.gz

Anyway sounds like the issue is your postgres can not be found because its
not in path or not in your ld.  So you should have had the same problem with
2.1 unless we accidentally changed something in 2.2 branch that is affecting
you.


Thanks,
Regina



 

-----Original Message-----
From: postgis-users-bounces at lists.osgeo.org
[mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Gery .
Sent: Saturday, August 16, 2014 2:18 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] FW: json/json.h: No such file or directory

Hi Regina,

I tried with postgis-2.2.0dev, it seems that the json problem is gone, but
'make' didn't find '-lpostgres'. In my system, postgres is in /usr/sbin, and
I put that in LD_LIBRARY_PATH of my .bashrc. Below is the message:

--
Gery at gery /opt/postgis/postgis-2.2.0dev

$ make

/usr/bin/perl utils/svn_repo_revision.pl Can't fetch local revision (neither
.svn nor .git found) Not updating existing rev file at 12889 for s in
liblwgeom libpgcommon postgis regress raster topology loader utils
extensions; do \
        echo "---- Making all in ${s}"; \
        make -C ${s} all || exit 1; \
done;
---- Making all in liblwgeom
make[1]: Entering directory '/opt/postgis/postgis-2.2.0dev/liblwgeom'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/opt/postgis/postgis-2.2.0dev/liblwgeom'
---- Making all in libpgcommon
make[1]: Entering directory '/opt/postgis/postgis-2.2.0dev/libpgcommon'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/opt/postgis/postgis-2.2.0dev/libpgcommon'
---- Making all in postgis
make[1]: Entering directory '/opt/postgis/postgis-2.2.0dev/postgis'
gcc -ggdb -O2 -pipe -Wimplicit-function-declaration -Wall
-Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement
-Wendif-labels -Wmissing-format-attribute -Wformat-security
-fno-strict-aliasing -fwrapv -fexcess-precision=standard   -shared -o
postgis-2.2.dll  -Wl,--out-implib=libpostgis-2.2.a postgis_module.o
lwgeom_accum.o lwgeom_spheroid.o lwgeom_ogc.o lwgeom_functions_analytic.o
lwgeom_inout.o lwgeom_functions_basic.o lwgeom_btree.o lwgeom_box.o
lwgeom_box3d.o lwgeom_geos.o lwgeom_backend_api.o lwgeom_geos_prepared.o
lwgeom_geos_clean.o lwgeom_geos_relatematch.o lwgeom_export.o
lwgeom_in_gml.o lwgeom_in_kml.o lwgeom_in_geohash.o lwgeom_in_geojson.o
lwgeom_in_encoded_polyline.o lwgeom_triggers.o lwgeom_dump.o
lwgeom_dumppoints.o lwgeom_functions_lrs.o long_xact.o lwgeom_sqlmm.o
lwgeom_rtree.o lwgeom_transform.o gserialized_typmod.o gserialized_gist_2d.o
gserialized_gist_nd.o gserialized_estimate.o geography_inout.o
geography_btree.o geography_measurement.o geography_measurement_trees.o
geometry_inout.o -L/usr/lib -Wl,--allow-multiple-definition
-Wl,--enable-auto-import  -L/usr/local/lib -Wl,--as-needed  
../libpgcommon/libpgcommon.a ../liblwgeom/.libs/liblwgeom.a
 -L/usr/local/lib  -lgeos_c -lproj  -ljson-c -L/usr/lib -lxml2 -lz -liconv
-lm  -L/usr/lib -lpostgres -lpgport -lpgcommon -lintl -lssl -lcrypto -lz
-lreadline -lcrypt -lldap
/usr/lib/gcc/i686-pc-cygwin/4.8.3/../../../../i686-pc-cygwin/bin/ld: cannot
find -lpostgres
collect2: error: ld returned 1 exit status
/usr/lib/postgresql/pgxs/src/makefiles/../../src/Makefile.shlib:377: recipe
for target 'postgis-2.2.dll' failed
make[1]: *** [postgis-2.2.dll] Error 1
make[1]: Leaving directory '/opt/postgis/postgis-2.2.0dev/postgis'
GNUmakefile:14: recipe for target 'all' failed
make: *** [all] Error 1
--

Any thoughts?

Gery


----------------------------------------
> From: gamejihou at hotmail.com
> To: postgis-users at lists.osgeo.org
> Date: Sat, 16 Aug 2014 17:10:32 +0000
> Subject: Re: [postgis-users] FW: json/json.h: No such file or 
> directory
>
> Hello Regina,
>
> Thanks for your reply, I have these ones installed in cygwin (latest
version 32-bit):
>
> Gery at gery /opt/postgis/postgis-2.1.3
>
> $ cygcheck -c | grep json
>
> json-c-debuginfo 0.11-2 OK
> libjson-c-common 0.11-2 OK
> libjson-c-devel 0.11-2 OK
> libjson-c2 0.11-2 OK
> libjson-devel 0.11-2 OK
> libjson0 0.9-1 OK
> ruby-json 1.8.0-1 OK
>
> Surprisingly, neither geos nor gdal has given error messages. I read some
posts about that things were not smooth in cygwin with postgis as far as I
remember, but here this has been the only complain. I have installed both
libjson-c2 (version 0.11-2) and libjson0 (version 0.9-1), would that be the
problem?
>
> I'll follow your suggestion and try postgis 2.1.4dev, and send a message
if nothing improves.
>
> Gery
>
>
>
> Sent from Windows Mail
>
> ----------------------------------------
>> From: lr at pcorp.us
>> To: postgis-users at lists.osgeo.org
>> Date: Sat, 16 Aug 2014 12:32:37 -0400
>> Subject: Re: [postgis-users] FW: json/json.h: No such file or 
>> directory
>>
>> It's related to json version. Which version are you building with?
>>
>>
>> I suspect you are running a newer json. This should be fixed in 2.1.4 
>> (2.1
>> trunk)
>>
>> If you are building from source anyway, you might want to use our 
>> 2.1.4dev or cut in the fix from
>>
>> http://trac.osgeo.org/postgis/ticket/2723
>>
>> Hope that helps,
>> Regina
>> http://www.postgis.us
>> http://postgis.net
>>
>>
>>
>>
>> -----Original Message-----
>> From: postgis-users-bounces at lists.osgeo.org
>> [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Gery .
>> Sent: Saturday, August 16, 2014 8:50 AM
>> To: postgis-users at lists.osgeo.org
>> Subject: [postgis-users] FW: json/json.h: No such file or directory
>>
>> Hello,
>>
>> I just received this after 'make' in version 2.1.3:
>>
>> libtool: compile: gcc -g -O2 -DDLL_EXPORT -DPIC -Wall 
>> -Wmissing-prototypes -I/usr/local/include -c lwin_geojson.c 
>> -DDLL_EXPORT -DPIC -o .libs/lwin_geojson.o
>> lwin_geojson.c:20:23: fatal error: json/json.h: No such file or 
>> directory &include <json/json.h> ^ compilation terminated.
>> Makefile:156: recipe for target 'lwin_geojson.lo' failed
>> make[1]: *** [lwin_geojson.lo] Error 1
>> make[1]: Leaving directory '/opt/postgis/postgis-2.1.3/liblwgeom'
>> GNUmakefile:14: recipe for target 'all' failed
>> make: *** [all] Error 1
>>
>> I read that this is a problem related to Geos 3.4.2. My configuration is:
>>
>> -------------- Compiler Info ------------- C compiler: gcc -g -O2
>> C++ compiler: g++ -g -O2
>> SQL preprocessor: /usr/bin/cpp -w -traditional-cpp -P
>>
>> -------------- Dependencies -------------- GEOS config:
>> /usr/local/bin/geos-config GEOS version: 3.4.2 GDAL config:
>> /usr/local/bin/gdal-config GDAL version: 1.11.0 PostgreSQL config:
>> /usr/bin/pg_config PostgreSQL version: PostgreSQL 9.3.5
>> PROJ4 version: 46
>> Libxml2 config: /usr/bin/xml2-config
>> Libxml2 version: 2.9.1
>> JSON-C support: yes
>> PostGIS debug level: 0
>> Perl: /usr/bin/perl
>>
>> --------------- Extensions --------------- PostGIS Raster: enabled 
>> PostGIS
>> Topology: enabled SFCGAL support: disabled
>>
>> -------- Documentation Generation --------
>> xsltproc: /usr/bin/xsltproc
>> xsl style sheets: /usr/share/sgml/docbook/xsl-stylesheets
>> dblatex: /usr/bin/dblatex
>> convert: /usr/bin/convert
>> mathml2.dtd: http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
>>
>> How can I circumvent this json/json.h problem and finish the 
>> installation of postgis?
>>
>> Gery
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
 		 	   		  
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




More information about the postgis-users mailing list