Hello, Go easy on me here - first time reporting what looks like a bug. I was on 9.1 and had a disaster hardware crash (2 drives - what luck - in RAID 5). Anyhow, my data was backed up. I reinstalled 9.1 from CD but had issues with re-installing Postgis and Geos. So I upgraded (might as well) to 10.1 release but still get the issue below. I tried compiling Geos pkg from source (no luck). It's the gcc linker that keeps complaining about the lstdc++ library not being there and it is correct. If I look in /usr/bin, I do not see that library. ??? Any help is appreciated. om.a geomgraph/.libs/libgeomgraph.a index/.libs/libindex.a io/.libs/libio.a linearref/.libs/liblinearref.a noding/.libs/libnoding.a operation/.libs/liboperation.a planargraph/.libs/libplanargraph.a precision/.libs/libprecision.a simplify/.libs/libsimplify.a triangulate/.libs/libtriangulate.a util/.libs/libutil.a -Wl,--no-whole-archive -L/usr/lib -lstdc++ -lm -lc -lgcc_s /usr/lib/crtendS.o /usr/lib/crtn.o -Wl,-soname -Wl,libgeos-3.4.2.so -o .libs/libgeos-3.4.2.so /usr/bin/ld: cannot find -lstdc++ c++: error: linker command failed with exit code 1 (use -v to see invocation) gmake[7]: *** [libgeos.la] Error 1
In my post, I put /usr/bin, I meant /usr/lib but I figure anyone reading this would see it was a typo.
I wanted to add a couple of things that I have tried: - Checked the Makefiles for lstdc++ to comment it out and try again but the ports to not have this at all in the Makefile - Tried doing a deinstall of libtool, verified I had the latest ports and then reinstalled libtools - no difference. Unless I did something wrong here. - FreeBSD database 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 22:51:51 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 - Finally, I also setenv: LDFLAGS=-lstdc++ Martin
Here are the two packages in question and the libtool version: libtool-2.4.2.418 Generic shared library support script geos-3.4.2.tar.bz2 postgis-1.5.3.tar.gz Martin
Ok, I made headway on this... VERY STRANGE ... I found some packages that were installed to support GEOS showed a certain version with the "pkg info" command but when I tried to deinstall and make clean inside that version, it said the package was not installed. I would then go into another port version... and THEN I could deinstall even though pkg info showed a different version. I don't get it. Anyhow, I deinstalled all Postgis dependencies, make clean and then reinstalled them. NOW, the pkg info command shows the correct version and all dependencies installed without a problem (including geos). However, I have one remaining problem: "./liblwgeom/.libs/liblwgeom.so: undefined reference to `geos::operation::valid::IsValidOp::getValidationError()' ../liblwgeom/.libs/liblwgeom.so: undefined reference to `geos::io::WKBReader::read(std::__1::basic_istream<char, std::__1::char_traits<char> >&)' ../liblwgeom/.libs/liblwgeom.so: undefined reference to `std::terminate()' ../liblwgeom/.libs/liblwgeom.so: undefined reference to `geos::triangulate::DelaunayTriangulationBuilder::setSites(geos::geom::Geometry const&)' ../liblwgeom/.libs/liblwgeom.so: undefined reference to `geos::geom::GeometryFactory::createMultiPolygon() const' cc: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:103: recipe for target 'shp2pgsql' failed gmake[4]: *** [shp2pgsql] Error 1 gmake[4]: Leaving directory '/usr/ports/databases/postgis21/work/postgis-2.1.3/loader' GNUmakefile:14: recipe for target 'all' failed gmake[3]: *** [all] Error 1 gmake[3]: Leaving directory '/usr/ports/databases/postgis21/work/postgis-2.1.3' " I cannot explain this. This is on make install clean for: /usr/ports/database/postgis21 Martin
Woops... I said: "installed to support GEOS showed a certain" I meant: "installed to support Postgis21 showed a certain"
I just tried postgis20 and I get: usr/local/include/iconv.h:83:48: note: passing argument to parameter 'inbuf' here extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); ^ shp2pgsql-core.c:108:3: warning: implicit declaration of function 'iconvctl' is invalid in C99 [-Wimplicit-function-declaration] iconvctl(cd, ICONV_SET_TRANSLITERATE, &on); ^ shp2pgsql-core.c:108:16: error: use of undeclared identifier 'ICONV_SET_TRANSLITERATE' iconvctl(cd, ICONV_SET_TRANSLITERATE, &on); ^ shp2pgsql-core.c:109:18: warning: passing 'char **' to parameter of type 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] if ( iconv(cd, &inputbuf, &inbytesleft, &outputptr, &outbytesleft) == -1 ) ^~~~~~~~~ /usr/local/include/iconv.h:83:48: note: passing argument to parameter 'inbuf' here extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); ^ shp2pgsql-core.c:112:17: error: use of undeclared identifier 'ICONV_SET_DISCARD_ILSEQ' iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, &on); ^ shp2pgsql-core.c:113:19: warning: passing 'char **' to parameter of type 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers] if ( iconv(cd, &inputbuf, &inbytesleft, &outputptr, &outbytesleft) == -1 ) ^~~~~~~~~ /usr/local/include/iconv.h:83:48: note: passing argument to parameter 'inbuf' here extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); ^ 4 warnings and 2 errors generated. Makefile:90: recipe for target 'shp2pgsql-core.o' failed gmake[4]: *** [shp2pgsql-core.o] Error 1 gmake[4]: Leaving directory '/usr/ports/databases/postgis20/work/postgis-2.0.6/loader' GNUmakefile:14: recipe for target 'all' failed gmake[3]: *** [all] Error 1 gmake[3]: Leaving directory '/usr/ports/databases/postgis20/work/postg
Postgis ticket opened as well: http://trac.osgeo.org/postgis/ticket/2999#comment:1
fix Synopsis and notify maintainers.
Hi Mark, Not sure by what you mean to fix synopsis. I can definitely reduce this now to the following issue: Makefile:90: recipe for target 'shp2pgsql-core.o' failed gmake[4]: *** [shp2pgsql-core.o] Error 1 I've attempted Postgis 2.0, 2.1.3 and even 2.1.4 (from source). They all give me the same error. I can contact the port maintainer but seeing it is failing from Source (downloaded from the Postgis website), I don't think it is s port issue. Martin
A commit references this bug: Author: sunpoet Date: Mon Nov 24 18:30:07 UTC 2014 New revision: 373304 URL: https://svnweb.freebsd.org/changeset/ports/373304 Log: - Remove hard-coded -lstdc++ PR: ports/195090 Submitted by: Martin Laflamm <martin@marketbridge.com> Changes: head/graphics/geos/Makefile
For some reason, I had managed to get geos installed after all. However, thank you sunpoet for addressing the goes issue anyways. Now, I have verified every single dependency (including gtk+ for shp2pgsql) for Postgis21 install. But I still keep getting: ../liblwgeom/.libs/liblwgeom.so: undefined reference to `geos::geom::GeometryFactory::createMultiPolygon() const' cc: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:103: recipe for target 'shp2pgsql' failed gmake[4]: *** [shp2pgsql] Error 1 gmake[4]: Leaving directory '/usr/ports/databases/postgis21/work/postgis-2.1.3/loader' GNUmakefile:14: recipe for target 'all' failed At this time, the Postgis folks believe it is a Port problem. It'd be great if we could assign this to trevor at bitba.se (port maintainer) Martin
Here is the full paste bin: http://pastebin.com/HfNZ4NPS
I know the shp2pgsql requires GTK so that could be the issue but it IS installed...sigh. checking for GTK+ - version >= 2.8.0... no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GTK+ is incorrectly installed. CPPFLAGS: -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include -I/usr/local/include But it is installed: oot@database:/usr/ports/databases/postgis21 # pkg info | grep gtk gtk-update-icon-cache-2.24.25 Gtk-update-icon-cache utility from the Gtk+ toolkit gtk3-3.14.3_1 Gimp Toolkit for X11 GUI (current stable version)
See Postgis bug at: http://trac.osgeo.org/postgis/report/3 Bug #3003 I don't know if it's a Port issue, OS issue, source issue. Need Help. MArtin
I've decided to do a fresh install a freebsd on a newer 64-bit server. Will update this ticket when it is done.
Ok, I ended up doing a fresh install on a 32-bit system (because I had the chassis) of FreeBSD 9.3. I installed Postgres 9.3 and then installed Postgis21. It went off without a hitch! There was definitely an issue with either the upgrade from 9.1 to 10.1 or an issue with 10.1 period. Anyways, I'm glad it's working now!! Martin