[GRASS-dev] [osgeo4w] #305: python/sqlite: "sqlite3-rtree-geometry-callback" not found in "C:\OSGeo4W\apps\Python27\DLLs\sqlite3.dll"

Glynn, Soeren, all:

any idea how GRASS 7 decides which sqlite3.dll to pick up?

thanks
Markus

---------- Forwarded message ----------
From: OSGeo4W <trac_osgeo4w@osgeo.org>
Date: Sun, Oct 28, 2012 at 6:03 PM
Subject: Re: [osgeo4w] #305: python/sqlite:
"sqlite3-rtree-geometry-callback" not found in
"C:\OSGeo4W\apps\Python27\DLLs\sqlite3.dll"
To:
Cc: osgeo4w-trac@lists.osgeo.org

#305: python/sqlite: "sqlite3-rtree-geometry-callback" not found in
"C:\OSGeo4W\apps\Python27\DLLs\sqlite3.dll"
---------------------+------------------------------------------------------
Reporter: hellik | Owner: brushtyler
    Type: defect | Status: new
Priority: critical | Component: Package
Version: 1.0 | Keywords: python,sqlite
---------------------+------------------------------------------------------

Comment(by brushtyler):

Replying to [comment:29 esseffe]:

Sorry, but I'm completely unable to understand why SpatiaLite is
supposed to be anyway related to this topic.

spatialite is not related at all, as well as the sqlite3 in \bin (the one
I built).

I'm still writing that the problem is that grass7-dev uses the wrong
sqlite3.dll, the one shipped with python.

We have to choose if replace (or better remove) that DLL, otherwise the
grass7-dev code has to be changed to use the sqlite3.dll in \bin (passing
the full path to ctypes when loading the sqlite3.dll library).

I would prefer to remove the duplication.

AFAICS in the .vcprops files of the python source package, the
Python27\DLLs\sqlite3.dll is compiled using default settings (for that
reason it doesn't contain the sqlite3_rtree_geometry_callback function).

--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/305#comment:30&gt;
OSGeo4W <http://trac.osgeo.org/osgeo4w&gt;
OSGeo4W is the Windows installer and package environment for the OSGeo stack.

Windows goes by two rules (in this order, if I remember
correctly):

1. Pick up the DLL from the directory in which the
.exe that is linked against it resides.

2. Pick it up from the first directory that is one
of the system's executable directories (such as
C:\Windows\Win32), i.e. listed in the PATH env var.

There is no global directory for dynamic libraries,
such as "/usr/lib" on Linux, and no dedicated dyamic
linker path, such as "LD_LIBRARY_PATH", either.

Welcome to "DLL hell" ...

Ben

On 10/28/2012 09:04 PM, Markus Neteler wrote:

Glynn, Soeren, all:

any idea how GRASS 7 decides which sqlite3.dll to pick up?

thanks
Markus

---------- Forwarded message ----------
From: OSGeo4W <trac_osgeo4w@osgeo.org>
Date: Sun, Oct 28, 2012 at 6:03 PM
Subject: Re: [osgeo4w] #305: python/sqlite:
"sqlite3-rtree-geometry-callback" not found in
"C:\OSGeo4W\apps\Python27\DLLs\sqlite3.dll"
To:
Cc: osgeo4w-trac@lists.osgeo.org

#305: python/sqlite: "sqlite3-rtree-geometry-callback" not found in
"C:\OSGeo4W\apps\Python27\DLLs\sqlite3.dll"
---------------------+------------------------------------------------------
Reporter: hellik | Owner: brushtyler
     Type: defect | Status: new
Priority: critical | Component: Package
  Version: 1.0 | Keywords: python,sqlite
---------------------+------------------------------------------------------

Comment(by brushtyler):

Replying to [comment:29 esseffe]:

Sorry, but I'm completely unable to understand why SpatiaLite is
  supposed to be anyway related to this topic.

  spatialite is not related at all, as well as the sqlite3 in \bin (the one
  I built).

  I'm still writing that the problem is that grass7-dev uses the wrong
  sqlite3.dll, the one shipped with python.

  We have to choose if replace (or better remove) that DLL, otherwise the
  grass7-dev code has to be changed to use the sqlite3.dll in \bin (passing
  the full path to ctypes when loading the sqlite3.dll library).

  I would prefer to remove the duplication.

  AFAICS in the .vcprops files of the python source package, the
  Python27\DLLs\sqlite3.dll is compiled using default settings (for that
  reason it doesn't contain the sqlite3_rtree_geometry_callback function).

--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/305#comment:30&gt;
OSGeo4W <http://trac.osgeo.org/osgeo4w&gt;
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer

   benducke@fastmail.fm

1. Pick up the DLL from the directory in which the
.exe that is linked against it resides.

that seems to be the problem here:

(1) C:\OSGeo4W\apps\Python27\DLLs\sqlite3.dll => python's own shipped
sqlite3.dll

(2) C:\OSGeo4W\bin\sqlite3.dll => osgeo4w-package

first found is (1)

the error raises when compiling and starting wingrass7svn in the
osge4w-stack.

but compiling and starting wingrass6.4.3svn in the osge4w-stack no such
error.

what are the differences? is grass7 calling some not default sqlite
functions (e.g. rtree-geometry-callback) what grass6.4. doesn't?

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Fwd-osgeo4w-305-python-sqlite-sqlite3-rtree-geometry-callback-not-found-in-C-OSGeo4W-apps-Python27-D-tp5011827p5011839.html
Sent from the Grass - Dev mailing list archive at Nabble.com.

Hi,
The temporal Grass Interface in grass7 calls some sqlite3 Python functions that are defined in the Python Standard library version >= 2.6. No non-standard function is used or any spatial related function. So I am really curious about this error.

The sqlite3 related code can be found here:
http://svn.osgeo.org/grass/grass/trunk/lib/python/temporal/core.py

Best regards
Soeren

Am 28.10.2012 22:24 schrieb “Helmut Kudrnovsky” <hellik@web.de>:

  1. Pick up the DLL from the directory in which the
    .exe that is linked against it resides.

that seems to be the problem here:

(1) C:\OSGeo4W\apps\Python27\DLLs\sqlite3.dll => python’s own shipped
sqlite3.dll

(2) C:\OSGeo4W\bin\sqlite3.dll => osgeo4w-package

first found is (1)

the error raises when compiling and starting wingrass7svn in the
osge4w-stack.

but compiling and starting wingrass6.4.3svn in the osge4w-stack no such
error.

what are the differences? is grass7 calling some not default sqlite
functions (e.g. rtree-geometry-callback) what grass6.4. doesn’t?


best regards
Helmut

View this message in context: http://osgeo-org.1560.n6.nabble.com/Fwd-osgeo4w-305-python-sqlite-sqlite3-rtree-geometry-callback-not-found-in-C-OSGeo4W-apps-Python27-D-tp5011827p5011839.html
Sent from the Grass - Dev mailing list archive at Nabble.com.


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev