librasterlite build problems

56 views
Skip to first unread message

Brad Hards

unread,
Sep 1, 2011, 2:50:42 AM9/1/11
to SpatiaLite Users
Hi,

I'm trying to get the bleeding edge versions of everything built, just working
down the list at http://www.gaia-gis.it/spatialite/sources.html and am
currently stuck on librasterlite.

I've checkout out https://www.gaia-gis.it/svn/librasterlite (r11)

My first problem was a bad header path for geotiff.h (I have it in
/usr/include/geotiff/geotiff.h), but added some autoconf magic and it should now
deal with both.

I'm currently stuck at:
rasterlite_load.c:896:27: error: ‘GAIA_WAVELET_BLOB’ undeclared (first use in
this function)

It looks like spatialite-2.3.1 included that define (in gaiaexif.h), but it
isn't present in libspatialite trunk AFAICT.

I found an old message (from Sep 2010) that mentions a replacement
librasterlite2, but I'm not able to find a recent release or a svn tree.

Can anyone clarify the situation?

Brad

ahmadou dicko

unread,
Sep 1, 2011, 8:20:44 AM9/1/11
to spatiali...@googlegroups.com, Brad Hards
Hi

I had the same problem and was never able to install librasterlite (r11), if i remember 
well i ask once on the list without success.

If you find a trick let met know.

Ahmadou

2011/9/1 Brad Hards <br...@frogmouth.net>

--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To post to this group, send email to spatiali...@googlegroups.com.
To unsubscribe from this group, send email to spatialite-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spatialite-users?hl=en.


a.fu...@lqt.it

unread,
Sep 1, 2011, 1:42:05 PM9/1/11
to spatiali...@googlegroups.com
Hi Brad and Ahmadou,

a) libgeotiff headers
--------------------------------
really unpleasant situation:
- standard installation from ./configure;make will
place any header file directly on -/include
- this make Linux packagers to be crazy (there are
about 20 separate headers), so each standard distro
places them on a separate subdir
- just to make developers life easier, different
distros have obviously chosen different places:
-/include/geotiff [Debian, Ubuntu]
-/include/libgeotiff [Fedora]
and may well be some other distro places all them
on some other location ...
- unhappily, there is no PKG-config supporting libtiff:
so you have to guess more or less at random the actual
location on each specific target.

Anyway, ./configure is smart enough to survive such
mundane annoyances:

on Debian/Ubuntu
-------------------
export "CFLAGS=-I/usr/include/geotiff"
./configure
make

on Fedora
-------------------
export "CFLAGS=-I/usr/include/libgeotiff"
./configure
make

b) building librasterlite
----------------------------
really sorry, but in order to build librasterlite
you are required to use the old libspatialite 2.3.1:
any subsequent version doesn't support any longer
the Epsilon Wavelet library.

Just few hi-lights about the current development state
of rasterlite:
a) librasterlite-1 is now definitely superseded
b) development of librasterlite-2 is proceeding
the sluggish way (manly because I was heavily
involved in different projects during the last
year).
c) anyway there are now really good chances to
get librasterlite-2 released before end 2011.
This project seems interesting enough to attract
some reasonable funding from external sources:
and this will help the development cycle for sure ;-)

bye Sandro

ahmadou dicko

unread,
Sep 1, 2011, 2:20:01 PM9/1/11
to spatiali...@googlegroups.com
Hi Sandro

Because my problem is related to the wavelet libs i think that i will wait for the next release of rasterlite


c) anyway there are now really good chances to
  get librasterlite-2 released before end 2011.
  This project seems interesting enough to attract
  some reasonable funding from external sources:
  and this will help the development cycle for sure ;-)


Thank you very much for your work...can't wait to test the new librasterlite.

cheers

Ahmadou



2011/9/1 <a.fu...@lqt.it>

bye Sandro

Brad Hards

unread,
Sep 1, 2011, 8:14:28 PM9/1/11
to spatiali...@googlegroups.com
Workable, but in some ways contrary to the purpose of using autoconf.
As an alternative, we could test the known paths and find which one
is OK.

Index: configure.ac
===================================================================
--- configure.ac (revision 11)
+++ configure.ac (working copy)
@@ -48,6 +48,15 @@
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memset sqrt strcasecmp strerror strncasecmp strstr fdatasync ftruncate getcwd gettimeofday localtime_r memmove strerror])

+# Checks for required libraries
+AC_CHECK_HEADERS(geotiff/geotiff.h)
+AC_CHECK_HEADERS(libgeotiff/geotiff.h)
+AC_CHECK_HEADERS(geotiff.h)
+if test x"$ac_cv_header_geotiff_geotiff_h" != x"yes" && test x"$ac_cv_header_libgeotiff_geotiff_h" != x"yes" && test x"$ac_cv_header_geotiff_h" != x"yes"; then
+ AC_MSG_ERROR(['libgeotiff' is required but the header (geotiff.h) doesn't seem to be installed on this system])
+fi
+AC_CHECK_LIB(geotiff,GTIFWriteKeys,,AC_MSG_ERROR(['libgeotiff' is required but it doesn't seem to be installed on this system.]),)
+
AC_CONFIG_FILES([Makefile \
headers/Makefile \
epsilon/Makefile \

Of course, then we'd need to conditionally include the right headers
depending on the autoconf output. Because this occurs in a few places
it would be a pain to keep them all up-to-date. So maybe we could keep
them in a single place. I chose a new header, but rasterlite_internal.h is
also a possibility.

Index: headers/rasterlite_tiff_hdrs.h
===================================================================
--- headers/rasterlite_tiff_hdrs.h (revision 0)
+++ headers/rasterlite_tiff_hdrs.h (revision 0)
@@ -0,0 +1,27 @@
+#ifndef _RASTERLITE_TIFF_HDRS_H
+#define _RASTERLITE_TIFF_HDRS_H
+
+#ifdef HAVE_GEOTIFF_GEOTIFF_H
+#include <geotiff/geotiff.h>
+#include <geotiff/xtiffio.h>
+#include <geotiff/geo_tiffp.h>
+#include <geotiff/geo_keyp.h>
+#include <geotiff/geovalues.h>
+#include <geotiff/geo_normalize.h>
+#elif HAVE_LIBGEOTIFF_GEOTIFF_H
+#include <libgeotiff/geotiff.h>
+#include <libgeotiff/xtiffio.h>
+#include <libgeotiff/geo_tiffp.h>
+#include <libgeotiff/geo_keyp.h>
+#include <libgeotiff/geovalues.h>
+#include <libgeotiff/geo_normalize.h>
+#else
+#include <geotiff.h>
+#include <xtiffio.h>
+#include <geo_tiffp.h>
+#include <geo_keyp.h>
+#include <geovalues.h>
+#include <geo_normalize.h>
+#endif
+
+#endif

Then you can just #include "rasterlite_tiff_hdrs.h" and it
will work everywhere. No magic that the users have to
understand.


> b) building librasterlite
> ----------------------------
> really sorry, but in order to build librasterlite
> you are required to use the old libspatialite 2.3.1:
> any subsequent version doesn't support any longer
> the Epsilon Wavelet library.

I made a patch that removes the references to wavelet
code. This patch also has the geotiff magic. See attached.

> Just few hi-lights about the current development state
> of rasterlite:
> a) librasterlite-1 is now definitely superseded

But still used by some current code? Like spatialite-gui and
spatialite-gis?

Brad

rasterlite-geotiff-wavelet-2011-09-02.patch

a.fu...@lqt.it

unread,
Sep 1, 2011, 8:40:09 PM9/1/11
to spatiali...@googlegroups.com
On Fri, 2 Sep 2011 10:14:28 +1000, Brad Hards wrote

> Index: configure.ac
> ===================================================================
> --- configure.ac (revision 11)
> +++ configure.ac (working copy)
> @@ -48,6 +48,15 @@
> AC_FUNC_STRFTIME
> AC_CHECK_FUNCS([memset sqrt strcasecmp strerror strncasecmp strstr
> fdatasync ftruncate getcwd gettimeofday localtime_r memmove strerror])
>
> +# Checks for required libraries
> +AC_CHECK_HEADERS(geotiff/geotiff.h)
> +AC_CHECK_HEADERS(libgeotiff/geotiff.h)
> +AC_CHECK_HEADERS(geotiff.h)
> +if test x"$ac_cv_header_geotiff_geotiff_h" != x"yes" && test
> x"$ac_cv_header_libgeotiff_geotiff_h" != x"yes" && test
> x"$ac_cv_header_geotiff_h" != x"yes"; then +
> AC_MSG_ERROR(['libgeotiff' is required but the header (geotiff.h)
> doesn't seem to be installed on this system]) +fi
> +AC_CHECK_LIB(geotiff,GTIFWriteKeys,,AC_MSG_ERROR(['libgeotiff' is
> required but it doesn't seem to be installed on this system.]),) +
> AC_CONFIG_FILES([Makefile \ headers/Makefile \
> epsilon/Makefile \
>
> .....

Brilliant solution; immediately accepted ;-)

thanks, sandro

Reply all
Reply to author
Forward
0 new messages