Debian Bug report logs - #659483
libspatialite: SpatiaLite library shows ugly messages to stdout when it's loaded, no way to turn them off

version graph

Package: libspatialite3; Maintainer for libspatialite3 is Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>; Source for libspatialite3 is src:spatialite (PTS, buildd, popcon).

Reported by: Ramiro Morales <ramiro+debian@rmorales.net>

Date: Sat, 11 Feb 2012 13:39:02 UTC

Severity: normal

Found in version spatialite/3.0.0~beta20110817-3

Fixed in version spatialite/3.0.1-1

Done: "Francesco P. Lovergine" <frankie@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>:
Bug#659483; Package libspatialite3. (Sat, 11 Feb 2012 13:39:05 GMT) (full text, mbox, link).


Acknowledgement sent to Ramiro Morales <ramiro+debian@rmorales.net>:
New Bug report received and forwarded. Copy sent to Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>. (Sat, 11 Feb 2012 13:39:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Ramiro Morales <ramiro+debian@rmorales.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libspatialite: SpatiaLite library shows ugly messages to stdout when it's loaded, no way to turn them off
Date: Sat, 11 Feb 2012 10:27:52 -0300
Package: libspatialite3
Version: 3.0.0~beta20110817-3
Severity: normal
File: libspatialite

Dear Maintainer,

The SpatiaLite library shows this report every time it is loaded:

SpatiaLite version ..: 3.0.0-beta       Supported Extensions:
        - 'VirtualShape'        [direct Shapefile access]
        - 'VirtualDbf'          [direct Dbf access]
        - 'VirtualText'         [direct CSV/TXT access]
        - 'VirtualXL'           [direct XLS access]
        - 'VirtualText'         [direct CSV/TXT access]
        - 'VirtualNetwork'      [Dijkstra shortest path]
        - 'RTree'               [Spatial Index - R*Tree]
        - 'MbrCache'            [Spatial Index - MBR cache]
        - 'VirtualSpatialIndex' [R*Tree metahandler]
        - 'VirtualFDO'          [FDO-OGR interoperability]
        - 'SpatiaLite'          [Spatial SQL - OGC]
PROJ.4 Rel. 4.7.1, 23 September 2009
GEOS version 3.2.2-CAPI-1.6.2

Examples with three different tools:

a) Traditional sqlite3 tool shipped with package of the same name:

$ sqlite3 test1.sqlite
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .load libspatialite.so.3
SpatiaLite version ..: 3.0.0-beta       Supported Extensions:
        - 'VirtualShape'        [direct Shapefile access]
        - 'VirtualDbf'          [direct Dbf access]
        - 'VirtualText'         [direct CSV/TXT access]
        - 'VirtualXL'           [direct XLS access]
        - 'VirtualText'         [direct CSV/TXT access]
        - 'VirtualNetwork'      [Dijkstra shortest path]
        - 'RTree'               [Spatial Index - R*Tree]
        - 'MbrCache'            [Spatial Index - MBR cache]
        - 'VirtualSpatialIndex' [R*Tree metahandler]
        - 'VirtualFDO'          [FDO-OGR interoperability]
        - 'SpatiaLite'          [Spatial SQL - OGC]
PROJ.4 Rel. 4.7.1, 23 September 2009
GEOS version 3.2.2-CAPI-1.6.2


b) spatialite utility shipped with spatialite-bin package:

$ spatialite test2.sqlite
SpatiaLite version ..: 3.0.0-beta       Supported Extensions:
        - 'VirtualShape'        [direct Shapefile access]
        - 'VirtualDbf'          [direct DBF access]
        - 'VirtualXL'           [direct XLS access]
        - 'VirtualText'         [direct CSV/TXT access]
        - 'VirtualNetwork'      [Dijkstra shortest path]
        - 'RTree'               [Spatial Index - R*Tree]
        - 'MbrCache'            [Spatial Index - MBR cache]
        - 'VirtualSpatialIndex' [R*Tree metahandler]
        - 'VirtualFDO'          [FDO-OGR interoperability]
        - 'SpatiaLite'          [Spatial SQL - OGC]
PROJ.4 version ......: Rel. 4.7.1, 23 September 2009
GEOS version ........: 3.2.2-CAPI-1.6.2
SQLite version ......: 3.7.9
Enter ".help" for instructions
spatialite>

c) Loading spatialite from Python code via standalone pysqlite DB-API
   (python-pysqlite2 package):

$ python
Python 2.7.2+ (default, Jan 20 2012, 23:05:38) 
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysqlite2 import dbapi2
>>> print(dbapi2.sqlite_version)
3.7.9
>>> print(dbapi2.version)
2.6.3
>>> conn = dbapi2.connect(**{'database': 'test3.sqlite'})
>>> conn.enable_load_extension(True)
>>> cur = conn.cursor()
>>> cur.execute("SELECT load_extension('libspatialite.so.3')")
SpatiaLite version ..: 3.0.0-beta       Supported Extensions:
        - 'VirtualShape'        [direct Shapefile access]
        - 'VirtualDbf'          [direct Dbf access]
        - 'VirtualText'         [direct CSV/TXT access]
        - 'VirtualXL'           [direct XLS access]
        - 'VirtualText'         [direct CSV/TXT access]
        - 'VirtualNetwork'      [Dijkstra shortest path]
        - 'RTree'               [Spatial Index - R*Tree]
        - 'MbrCache'            [Spatial Index - MBR cache]
        - 'VirtualSpatialIndex' [R*Tree metahandler]
        - 'VirtualFDO'          [FDO-OGR interoperability]
        - 'SpatiaLite'          [Spatial SQL - OGC]
PROJ.4 Rel. 4.7.1, 23 September 2009
GEOS version 3.2.2-CAPI-1.6.2
<pysqlite2.dbapi2.Cursor object at 0xb7260920>


There doesn't seem to be any hook in sqlite3 extensions API or
SpatiaLite API to silence it.

It is printed from the spatialite_init(int verbose) function
in libspatialite-3.0.0-stable/src/spatialite/spatialite.c:16546
(that, by the 

/* used when SQLite initializes SpatiaLite via statically linked lib */

comment is supposed to be called only when SpatiaLite is loaded
statically from sqlite?) but I'm unable to follow the execution stack, to
understand why that function is getting called in the first place if
SpatiaLite is being loaded dynamically and how to influence the value of
its `verbose` argument.

Unconditionally printing random stuff to stdout from a library being
dinamically doesn't seem right. The scenario where I'm seeing is when
runnning tests in a stack using sqplite/SpatiaLite (Django Python Web
framework pus its GeoDjango sub-framework own test suite)

Regards,

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2-2.slh.1-aptosid-686 (SMP w/3 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libspatialite3 depends on:
ii  libc6         2.13-24
ii  libfreexl1    0.0.2~beta20110817-1
ii  libgeos-c1    3.2.2-3.1
ii  libproj0      4.7.0-1
ii  libsqlite3-0  3.7.9-2

libspatialite3 recommends no packages.

libspatialite3 suggests no packages.

-- no debconf information




Reply sent to "Francesco P. Lovergine" <frankie@debian.org>:
You have taken responsibility. (Mon, 27 Feb 2012 14:18:11 GMT) (full text, mbox, link).


Notification sent to Ramiro Morales <ramiro+debian@rmorales.net>:
Bug acknowledged by developer. (Mon, 27 Feb 2012 14:18:11 GMT) (full text, mbox, link).


Message #10 received at 659483-done@bugs.debian.org (full text, mbox, reply):

From: "Francesco P. Lovergine" <frankie@debian.org>
To: 659483-done@bugs.debian.org
Subject: fixed in 3.0.1
Date: Mon, 27 Feb 2012 15:16:02 +0100
Package: libspatialite3
Version: 3.0.1-1

This bug is fixed in the version above.

-- 
Francesco P. Lovergine




No longer marked as fixed in versions libspatialite3/3.0.1-1. Request was from Andreas Beckmann <anbe@debian.org> to control@bugs.debian.org. (Sat, 02 Nov 2013 15:59:05 GMT) (full text, mbox, link).


Marked as fixed in versions spatialite/3.0.1-1. Request was from Andreas Beckmann <anbe@debian.org> to control@bugs.debian.org. (Sat, 02 Nov 2013 15:59:06 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 01 Dec 2013 07:43:52 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Oct 11 23:40:04 2017; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.