Bug report #5515

Can't create SpatiaLite databases and layers

Added by Alexander Bruy over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:wontfix
Crashes QGIS or corrupts data:No Copied to github as #:15117

Description

When I try to create new SpatiaLite database (using Layer - New - New SpatiaLite Layer) I get next error after adding a new field: "Unable to initialize SpatialMetadata: no such function: InitSpatialMetadata". If I try to add new layer to existing database I get another message "Failed to create the geometry column. The database returned: no such function: AddGeometryColumn".

Maybe this problem depends on how SpatiaLite is compiled: as standard library intended to be loaded as an extension or as self-standing complete SQL-engine supporting an internal private copy of SQLite.

I'm on self-compiled master, external SpatiaLite 3.0.1 from libspatialite-amalgamation-3.0.1.

History

#1 Updated by Salvatore Larosa over 9 years ago

here works fine!

Debian/wheezy

QGIS version 1.9.90-Alpha
QGIS code revision 086b83d
Compiled against Qt 4.7.4
Running against Qt 4.7.4
Compiled against GDAL/OGR 1.9.0
Running against GDAL/OGR 1.9.0
GEOS Version 3.3.3
PostgreSQL Client Version 9.1.3
SpatiaLite Version 3.0.1
QWT Version 5.2.2

#2 Updated by Alexander Bruy over 9 years ago

  • Resolution set to wontfix
  • Status changed from Open to Closed

Seems this is depends on how SpatiaLite is build. It works if SpatiaLite compiled as loadable extension and don't work if SpatiaLite configured and compiled as self-standing complete SQL-engine supporting an internal private copy of SQLite (amalgamation)

Also available in: Atom PDF