#16105 closed Bug (invalid)
libgdal1-1.7.0 broke django.contrib.gis.gdal.libgdal
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | GIS | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
importing django.contrib.gis.gdal.libgdal results in a segfault when I use libgdal1-1.7.0
Using 1.6 it doesn't.
Quickfix I made that worked was to install both but modify gdal.libgdal to prioritize 1.6.
This may be a problem with my libgdal maybe. Using debian-testing.
Change History (4)
comment:1 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
This program:
from ctypes import CDLL
from ctypes.util import find_library
lib_path = find_library('gdal1.7.0')
lgdal = CDLL(lib_path)
_version_info = lgdalGDALVersionInfo
Gives the following output:
Traceback (most recent call last):
File "test.py", line 4, in <module>
lgdal = CDLL(lib_path)
File "/usr/lib/python2.6/ctypes/init.py", line 353, in init
self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libgdal1.7.0.so.1: symbol cxa_pure_virtual, version libmysqlclient_16 not defined in file libmysqlclient.so.16 with link time reference
I'm using 1.7.3-4
I should find the right place to post this...
comment:3 by , 13 years ago
Sorry:
from ctypes import CDLL from ctypes.util import find_library lib_path = find_library('gdal1.7.0') lgdal = CDLL(lib_path) _version_info = lgdal['GDALVersionInfo']
comment:4 by , 13 years ago
Based on this traceback, I'd say it's a Debian bug. I suggest http://www.debian.org/Bugs/Reporting
The error message is similar to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619175.
In my opinion, your segfault could be caused by:
ctypes
—django.contrib.gis.gdal.libgdal
uses this module in a very straightforward way to loadlibgdal1
,libgdal1
— you're using a testing version, after all,Since
ctypes
is part of the standard library, I think you should take the offending code from https://code.djangoproject.com/browser/django/trunk/django/contrib/gis/gdal/libgdal.py, extract the minimum failing test case, and post that to Python's bug tracker.If might be as simple as:
(Disclaimer: I don't have access to a box running debian-testing, so I don't know if this is sufficient to exhibit the bug.)
Anyway, Django does not contain any C code, it's written entirely in Python. So while it can raise exceptions, it can't (in theory) create segfaults. For this reason, I'm going to mark the bug as invalid.