[postgis-devel] [postgis-users] Compiling PostGIS under FreeBSD 11

Regina Obe lr at pcorp.us
Sun Nov 26 11:18:10 PST 2017


Well it almost worked.

I have to check and see if the change you had below was necessary.

Cause I noticed that my generated Makefile had

ICONV_LDFLAGS=-lc

So I changed it to 

ICONV_LDFLAGS= -liconv

And that seemed to do the trick. 

Now why the ICONV_LDFLAGS was so wrong is a mystery

-----Original Message-----
From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Sandro Santilli
Sent: Sunday, November 26, 2017 1:29 PM
To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Cc: 'PostGIS Development Discussion' <postgis-devel at lists.osgeo.org>
Subject: Re: [postgis-devel] [postgis-users] Compiling PostGIS under FreeBSD 11

On Sun, Nov 26, 2017 at 01:19:19PM -0500, Regina Obe wrote:

> libtool: link: cc -I ../liblwgeom -g -O2 -fPIC -DPIC -Wall 
> -Wmissing-prototypes -I/usr/local/include shpopen.o dbfopen.o getopt.o 
> shpcommon.o safileio.o shp2pgsql-core.o shp2pgsql-cli.o -o 
> .libs/shp2pgsql -fstack-protector -Wl,--as-needed -Wl,-R/usr/local/lib 
> ../liblwgeom/.libs/liblwgeom.so -L/usr/local/lib -lgeos_c -lproj -lm 
> -lpthread -Wl,-rpath -Wl,/usr/local/lib
> shp2pgsql-core.o: In function `utf8':
> /usr/home/jenkins/workspace/Test_Slave/trunk/loader/shp2pgsql-core.c:69:
> undefined reference to `libiconv_open'

Can you try the following patch ?

diff --git a/loader/Makefile.in b/loader/Makefile.in index 830db51c8..28d5e171d 100644
--- a/loader/Makefile.in
+++ b/loader/Makefile.in
@@ -90,7 +90,7 @@ shp2pgsql-core.o: shp2pgsql-core.c shp2pgsql-core.h shpcommon.h
        $(CC) $(CFLAGS) -c $<

 pgsql2shp-core.o: pgsql2shp-core.c pgsql2shp-core.h shpcommon.h
-       $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
+       $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) $(ICONV_LDFLAGS) -c $<

 pgsql2shp-cli.o: pgsql2shp-cli.c pgsql2shp-core.h shpcommon.h
        $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $< _______________________________________________
postgis-devel mailing list
postgis-devel at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list