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

Sandro Santilli strk at kbt.io
Sun Nov 26 10:29:28 PST 2017


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 $<


More information about the postgis-devel mailing list