compiling libspatialite-4.4.0-RC0

341 views
Skip to first unread message

colinx...@gmail.com

unread,
Dec 27, 2015, 5:12:18 AM12/27/15
to SpatiaLite Users
I've recently suffered a drive failure so I am re-building from scratch but two problems (so far!) are blocking me

1. Attempts to build spatialite-4.4.0-RC0 end in failure at the make stage - it looks as if there is a header file missing (probable not the case!) as compilation stops with the following error:

/bin/bash ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -g -O2 -I/usr/local/include -I/usr/include/libxml2 -I../../src/headers  -fvisibility=hidden -g -O2 -MT libsplite_la-virtualknn.lo -MD -MP -MF .deps/libsplite_la-virtualknn.Tpo -c -o libsplite_la-virtualknn.lo `test -f 'virtualknn.c' || echo './'`virtualknn.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -I/usr/local/include -I/usr/include/libxml2 -I../../src/headers -fvisibility=hidden -g -O2 -MT libsplite_la-virtualknn.lo -MD -MP -MF .deps/libsplite_la-virtualknn.Tpo -c virtualknn.c  -fPIC -DPIC -o .libs/libsplite_la-virtualknn.o
virtualknn.c: In function 'vknn_check_mbr':
virtualknn.c:377:9: error: 'FULLY_WITHIN' undeclared (first use in this function)
  return FULLY_WITHIN;
         ^
virtualknn.c:377:9: note: each undeclared identifier is reported only once for each function it appears in
virtualknn.c:379:9: error: 'NOT_WITHIN' undeclared (first use in this function)
  return NOT_WITHIN;
         ^
virtualknn.c:386:12: error: 'PARTLY_WITHIN' undeclared (first use in this function)
     return PARTLY_WITHIN;
            ^
virtualknn.c: At top level:
virtualknn.c:470:22: error: unknown type name 'sqlite3_rtree_query_info'
 vknn_query_callback (sqlite3_rtree_query_info * info)
                      ^
virtualknn.c: In function 'vknn_filter':
virtualknn.c:1334:60: error: 'vknn_query_callback' undeclared (first use in this function)
     sqlite3_rtree_query_callback (knn->db, "knn_position", vknn_query_callback,
                                                            ^
make[3]: *** [libsplite_la-virtualknn.lo] Error 1

configure throws up one warning (which I don't understand) that may be related 

/home/colin/libspatialite-4.4.0-RC0/missing: Unknown `--is-lightweight' option
Try `/home/colin/libspatialite-4.4.0-RC0/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing


libspatialite-4.3.0a builds with no errors.



2. Second issue:
I downloaded the sources for the libspatialite libraries using fossil attempts to download librasterlite2 or spatialite_gui result in timeout - is the server down please?


Regards Colin B

a.fu...@lqt.it

unread,
Dec 27, 2015, 11:34:20 AM12/27/15
to spatiali...@googlegroups.com
On Sun, 27 Dec 2015 02:12:17 -0800 (PST), colinx...@gmail.com wrote:
> 1. Attempts to build spatialite-4.4.0-RC0 end in failure at the make
> stage - it looks as if there is a header file missing (probable not
> the case!) as compilation stops with the following error:
>
> virtualknn.c:377:9: error: 'FULLY_WITHIN' undeclared (first use in
> this function)
>   return FULLY_WITHIN;
>          ^
> virtualknn.c:379:9: error: 'NOT_WITHIN' undeclared (first use in this
> function)
>   return NOT_WITHIN;
>          ^
> virtualknn.c:386:12: error: 'PARTLY_WITHIN' undeclared (first use in
> this function)
>      return PARTLY_WITHIN;
>             ^
> virtualknn.c: At top level:
> virtualknn.c:470:22: error: unknown type name
> 'sqlite3_rtree_query_info'
>

Hi Colin,

FULLY_WITHIN, NOT_WITHIN, PARTLY_WITHIN and sqlite3_rtree_query_info
are usually defined into the "sqlite3.h" header file.
all them are part of the most recent interface to the R*Tree extension
supported since 3.8.5 (released on 2014-06-04).

the most probable explanation for your failure is that you are using
some obsolete SQLite (< 3.8.5).
check your current SQLite version; if it's desperately too old you
simply have to build and install your own local copy starting from
the latest 3.9.2 sources (a very simple task).

^
> libspatialite-4.3.0a builds with no errors.
>

4.3.0a never accessed the advanced R*Tree interface, which is
strictly required by the new KNN implementation.


> 2. Second issue:
> I downloaded the sources for the libspatialite libraries using fossil
> attempts to download librasterlite2 or spatialite_gui result in
> timeout - is the server down please?
>

I'm not aware of any issue on the server side: it currently works
as expected and I notice no anomalies at all from the logfiles.

bye Sandro

colinx...@gmail.com

unread,
Dec 27, 2015, 12:37:14 PM12/27/15
to SpatiaLite Users


Many thanks - I did indeed have an old sqlite3 version and I've updated to 3.9.2. However, make still fails when building examples

libtool: link: gcc -I./../src/headers -g -O2 -o .libs/demo1 demo1.o  -L../src /home/colin/libspatialite/src/.libs/libspatialite.so -L/usr/local/lib /usr/lib/x86_64-linux-gnu/libsqlite3.so -lxml2 /usr/local/lib/libfreexl.so /usr/lib/libproj.so -lm -lz /usr/local/lib/libsqlite3.so -ldl -lpthread -lgeos_c
/home/jonnie/libspatialite/src/.libs/libspatialite.so: undefined reference to `sqlite3_rtree_query_callback'
collect2: error: ld returned 1 exit status
make[2]: *** [demo1] Error 1
make[2]: Leaving directory `/home/colin/libspatialite/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/colin/libspatialite'
make: *** [all] Error 2


As for fossil, I can't understand it, it worked fine last night but today it just times out!


 ~/libspatialite $ fossil clone https://www.gaia.gis.it/fossil/spatialite_gui spatialite_gui.fossil
Round-trips: 1   Artifacts sent: 0  received: 0
SSL: cannot connect to host www.gaia.gis.it:443 (Connection timed out)
Clone finished with 0 bytes sent, 0 bytes received
server returned an error - clone aborted

Many thanks Colin B

Jan Weitz

unread,
Dec 27, 2015, 6:35:46 PM12/27/15
to SpatiaLite Users
Hi Colin,

I tinkered around building it myself. May my shell scripts help you: https://github.com/weitzj/libspatialite

Greetings,

Jan

Yan Seiner

unread,
Dec 27, 2015, 7:01:31 PM12/27/15
to spatiali...@googlegroups.com


On 12/27/2015 06:37 PM, colinx...@gmail.com wrote:
>
>
> Many thanks - I did indeed have an old sqlite3 version and I've
> updated to 3.9.2. However, make still fails when building examples


I'd wipe out the build tree entirely and untar the source and do a fresh
build.

Jan Weitz

unread,
Dec 27, 2015, 7:20:37 PM12/27/15
to SpatiaLite Users
Hi Colin,

I got the same error in my code, too:

src/spatialite/virtualknn.c:1334: error: undefined reference to 'sqlite3_rtree_query_callback'


I am building `mod_spatilalite` only

colinx...@gmail.com

unread,
Dec 28, 2015, 6:19:25 AM12/28/15
to SpatiaLite Users
Hoping I've found the solution re-building sqlite3 left an old version of libsqlite3.so hanging around  so probably trying to link to obsolete library - will rebuild libspatialite later today. The sqlite3_rtree_query_callback function is definitely in the sqlite3 3.9.2. library

Still no response from the fossil server - any ideas?


Regards Colin B


colinx...@gmail.com

unread,
Dec 28, 2015, 8:45:53 AM12/28/15
to SpatiaLite Users

Now successfully built and fossil has woken up so all's well

Many thanks for the help.

Regards Colin B

Reply all
Reply to author
Forward
0 new messages