[postgis-users] Encountering error while installing postgis from source?

Andy Colson andy at squeakycode.net
Mon Jun 27 18:31:54 PDT 2016


On 06/27/2016 11:55 AM, sablok wrote:
> I am using the following command to make and make install postgis-2.2.2 from
> source and I have all the other dependencies configured properly -
>
> export POSTGIS_BUILD_VERSION=2.2.2
> cd ${postgis_src_path}/configuration/postgis/postgis-$POSTGIS_BUILD_VERSION
> && ./configure --with-pgconfig=${build_root}/bin/pg_config
> --with-jsondir=${build_root} --with-projdir=${build_root}
> --with-geosconfig=${build_root}/bin/geos-config
> --with-gdalconfig=${build_root}/bin/gdal-config
> cd ${postgis_src_path}/configuration/postgis/postgis-$POSTGIS_BUILD_VERSION
> && make -j 4
> cd ${postgis_src_path}/configuration/postgis/postgis-$POSTGIS_BUILD_VERSION
> && make clean
> cd ${postgis_src_path}/configuration/postgis/postgis-$POSTGIS_BUILD_VERSION
> && make install
> cd
> ${postgis_src_path}/configuration/postgis/postgis-$POSTGIS_BUILD_VERSION/extensions
> && make
> cd
> ${postgis_src_path}/configuration/postgis/postgis-$POSTGIS_BUILD_VERSION/extensions
> && make install
>
> After the above commands execute the configure step terminates gracefully
> with all the configuration files set up properly and I can see the following
> on my screen
>
> PostGIS is now configured for x86_64-unknown-linux-gnu
>
> The make process however fails with make: *** [all] Error 1  and I see the
> following message on my screen
>
> lwout_wkb.c: In function ‘empty_to_wkb_buf’:
> lwout_wkb.c:319:22: error: ‘NAN’ undeclared (first use in this function)
>    static double nn = NAN;
>                       ^
> lwout_wkb.c:319:22: note: each undeclared identifier is reported only once
> for each function it appears in
> make[1]: *** [lwout_wkb.lo] Error 1
> make[1]: *** Waiting for unfinished jobs....
>
>
>
> does anyone have any idea as to why is this happening, I searched about it
> and it seems to be related to GCC erroring out. I am not sure as this is my
> first experience with building postgis. Thanks in advance.
>

Did you get an error/warning about not finding include files?

http://postgis.net/docs/doxygen/2.2/d0/d7a/lwgeodetic_8h.html seems to define NAN.  You don't happen to have multiple versions of the header files (especially lwgeodetic.h) do you?

-Andy



More information about the postgis-users mailing list