Hi, On Sat, Jul 28, 2012 at 02:07:17PM +0100, peter green wrote:
> While working on a derivative distribution I discovered that > spatialite from testing FTBFS with the following error > > checking for geos_c.h... yes > configure: error: 'libgeos_c' is required but it doesn't seems to be > installed on this system. > checking for library containing GEOSTopologyPreserveSimplify... no > dh_auto_configure: ./configure --build=arm-linux-gnueabihf > --prefix=/usr --includedir=${prefix}/include > --mandir=${prefix}/share/man --infodir=${prefix}/share/info > --sysconfdir=/etc --localstatedir=/var > --libexecdir=${prefix}/lib/spatialite --disable-maintainer-mode > --disable-dependency-tracking --enable-geos --enable-proj > --disable-geosadvanced returned exit code 1 > make[1]: *** [override_dh_auto_configure] Error 2 > make[1]: Leaving directory `/«PKGBUILDDIR»' > make: *** [build-arch] Error 2 > dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2 > > This was initially discovered on raspbian but I was able to > reproduce it locally on debian wheezy amd64. The attached patch is also an fix for that issue. > I discovered that this failure was due to libgeos.so moving from > libgeos-dev to libgeos++-dev so I added > libgeos++-dev to build-depends, unfortunately after doing so the > build failed with That sadly holds :/ > libtool: compile: gcc -DPACKAGE_NAME=\"libspatialite\" > -DPACKAGE_TARNAME=\"libspatialite\" -DPACKAGE_VERSION=\"3.0.0-beta\" > "-DPACKAGE_STRING=\"libspatialite 3.0.0-beta\"" > -DPACKAGE_BUGREPORT=\"a.furi...@lqt.it\" -DPACKAGE_URL=\"\" > -DPACKAGE=\"libspatialite\" -DVERSION=\"3.0.0-beta\" > -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 > -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 > -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 > -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STDIO_H=1 > -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_MATH_H=1 -DHAVE_FLOAT_H=1 > -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDDEF_H=1 > -DHAVE_STDINT_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 > -DHAVE_SQLITE3_H=1 -DHAVE_SQLITE3EXT_H=1 -DHAVE_DLFCN_H=1 > -DLT_OBJDIR=\".libs/\" -DTIME_WITH_SYS_TIME=1 > -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 > -DHAVE_STRFTIME=1 -DHAVE_MEMSET=1 -DHAVE_STRCASECMP=1 > -DHAVE_STRERROR=1 -DHAVE_STRNCASECMP=1 -DHAVE_STRSTR=1 > -DHAVE_FDATASYNC=1 -DHAVE_FTRUNCATE=1 -DHAVE_GETCWD=1 > -DHAVE_GETTIMEOFDAY=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MEMMOVE=1 > -DHAVE_STRERROR=1 -DHAVE_LIBSQLITE3=1 -DHAVE_LIBSQLITE3=1 > -DHAVE_PROJ_API_H=1 -DHAVE_GEOS_C_H=1 -DHAVE_ICONV_H=1 > -DHAVE_FREEXL_H=1 -I. -g -O2 -I../../src/headers -D_LARGE_FILE=1 > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -DNDEBUG=1 -g -O2 -c > virtualXL.c -fPIC -DPIC -o .libs/virtualXL.o > virtualXL.c: In function ‘vXL_create’: > virtualXL.c:273:9: warning: passing argument 4 of > ‘freexl_get_cell_value’ from incompatible pointer type [enabled by > default] > In file included from virtualXL.c:62:0: > /usr/include/freexl.h:573:24: note: expected ‘struct > FreeXL_CellValue *’ but argument is of type ‘unsigned char *’ > virtualXL.c:273:9: error: too many arguments to function > ‘freexl_get_cell_value’ > In file included from virtualXL.c:62:0: > /usr/include/freexl.h:573:24: note: declared here > virtualXL.c: In function ‘vXL_eval_constraints’: > virtualXL.c:548:10: warning: passing argument 4 of > ‘freexl_get_cell_value’ from incompatible pointer type [enabled by > default] > In file included from virtualXL.c:62:0: > /usr/include/freexl.h:573:24: note: expected ‘struct > FreeXL_CellValue *’ but argument is of type ‘unsigned char *’ > virtualXL.c:548:10: error: too many arguments to function > ‘freexl_get_cell_value’ > In file included from virtualXL.c:62:0: > /usr/include/freexl.h:573:24: note: declared here > virtualXL.c: In function ‘vXL_column’: > virtualXL.c:818:11: warning: passing argument 4 of > ‘freexl_get_cell_value’ from incompatible pointer type [enabled by > default] > In file included from virtualXL.c:62:0: > /usr/include/freexl.h:573:24: note: expected ‘struct > FreeXL_CellValue *’ but argument is of type ‘unsigned char *’ > virtualXL.c:818:11: error: too many arguments to function > ‘freexl_get_cell_value’ > In file included from virtualXL.c:62:0: > /usr/include/freexl.h:573:24: note: declared here > make[4]: *** [virtualXL.lo] Error 1 > > This bug does not affect the version in sid (unfortunately another > rc bug does :( ).
Index: spatialite-3.0.0~beta20110817/libspatialite/configure =================================================================== --- spatialite-3.0.0~beta20110817.orig/libspatialite/configure 2011-08-17 17:50:56.000000000 +0200 +++ spatialite-3.0.0~beta20110817/libspatialite/configure 2012-11-25 13:31:19.000000000 +0100 @@ -16593,7 +16593,7 @@ ac_res="none required" else ac_res=-l$ac_lib - LIBS="-l$ac_lib -lm -lgeos $ac_func_search_save_LIBS" + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_GEOSTopologyPreserveSimplify=$ac_res @@ -16663,7 +16663,7 @@ ac_res="none required" else ac_res=-l$ac_lib - LIBS="-l$ac_lib -lm -lgeos $ac_func_search_save_LIBS" + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_GEOSCoveredBy=$ac_res Index: spatialite-3.0.0~beta20110817/libspatialite/configure.ac =================================================================== --- spatialite-3.0.0~beta20110817.orig/libspatialite/configure.ac 2011-08-17 17:50:56.000000000 +0200 +++ spatialite-3.0.0~beta20110817/libspatialite/configure.ac 2012-11-25 13:31:19.000000000 +0100 @@ -120,7 +120,7 @@ if test x"$enable_geos" != "xno"; then OMIT_GEOS_FLAGS= AC_CHECK_HEADERS(geos_c.h,, [AC_MSG_ERROR([cannot find geos_c.h, bailing out])]) - AC_SEARCH_LIBS(GEOSTopologyPreserveSimplify,geos_c,,AC_MSG_ERROR(['libgeos_c' is required but it doesn't seems to be installed on this system.]),-lm -lgeos) + AC_SEARCH_LIBS(GEOSTopologyPreserveSimplify,geos_c,,AC_MSG_ERROR(['libgeos_c' is required but it doesn't seems to be installed on this system.]),) #----------------------------------------------------------------------- # --enable-geosadvanced # @@ -129,7 +129,7 @@ [], [geosadvanced=yes]) if test x"$enable_geosadvanced" != "xno"; then GEOSADVANCED_FLAGS=-DGEOS_ADVANCED - AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([obsolete 'libgeos_c' (< v.3.3.0). please retry specifying: --disable-geosadvanced.]),-lm -lgeos) + AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([obsolete 'libgeos_c' (< v.3.3.0). please retry specifying: --disable-geosadvanced.]),) else GEOSADVANCED_FLAGS= fi Index: spatialite-3.0.0~beta20110817/spatialite-tools/configure =================================================================== --- spatialite-3.0.0~beta20110817.orig/spatialite-tools/configure 2012-11-25 13:31:19.000000000 +0100 +++ spatialite-3.0.0~beta20110817/spatialite-tools/configure 2012-11-25 13:34:04.917588983 +0100 @@ -16547,7 +16547,7 @@ $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lgeos_c -lm -lgeos $LIBS" +LIBS="-lgeos_c $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ Index: spatialite-3.0.0~beta20110817/spatialite-tools/configure.ac =================================================================== --- spatialite-3.0.0~beta20110817.orig/spatialite-tools/configure.ac 2012-11-25 13:31:19.000000000 +0100 +++ spatialite-3.0.0~beta20110817/spatialite-tools/configure.ac 2012-11-25 13:33:53.009624090 +0100 @@ -72,7 +72,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,,AC_MSG_ERROR(['expat' is required but it doesn't seems to be installed on this system.])) AC_CHECK_LIB(proj,pj_init_plus,,AC_MSG_ERROR(['libproj' is required but it doesn't seems to be installed on this system.]),-lm) -AC_CHECK_LIB(geos_c,GEOSTopologyPreserveSimplify,,AC_MSG_ERROR(['libgeos_c' is required but it doesn't seems to be installed on this system.]),-lm -lgeos) +AC_CHECK_LIB(geos_c,GEOSTopologyPreserveSimplify,,AC_MSG_ERROR(['libgeos_c' is required but it doesn't seems to be installed on this system.]),) PKG_CHECK_MODULES([LIBFREEXL], [freexl], , AC_MSG_ERROR(['libfreexl' is required but it doesn't seems to be installed on this system.])) LIBSPATIALITE_CFLAGS=