[1.5] question about python/ctypes/dlopen
kiorky
kiorky@cryptelium.net
Fri Dec 4 14:54:00 GMT 2009
Hello, i'm trying to use python ctypes which use under the hood dlopen.
I have a strange permission denied running this following code, if someone have
clues ...
Base code
------------------------
$ cat test_ctypes.py
from ctypes import CDLL
CDLL('libgeos_c.dll.a')
The faulting execution
------------------------
$ /minitage/dependencies/python-2.6/parts/part/bin/python test_ctypes.py
Traceback (most recent call last):
File "test_ctypes.py", line 2, in <module>
CDLL('libgeos_c.dll.a')
File
"/minitage/dependencies/python-2.6/parts/part/lib/python2.6/ctypes/__init__.py",
line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: Permission denied
Another try
------------------------
$ cat test_ctypes.py
from ctypes import CDLL
CDLL('cyggeos_c-1.dll')
$ /minitage/dependencies/python-2.6/parts/part/bin/python test_ctypes.py
Traceback (most recent call last):
File "test_ctypes.py", line 2, in <module>
CDLL('cyggeos_c-1.dll')
File
"/minitage/dependencies/python-2.6/parts/part/lib/python2.6/ctypes/__init__.py",
line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: Bad address
Environment
------------------------
The library is in the environment
$ ls /minitage/dependencies/geos-3.0/parts/part/bin/*dll
/minitage/dependencies/geos-3.0/parts/part/bin/cyggeos-3-0-3.dll
/minitage/dependencies/geos-3.0/parts/part/bin/cyggeos_c-1.dll
$ ls /minitage/dependencies/geos-3.0/parts/part/lib/
libgeos.a libgeos.dll.a libgeos.la libgeos_c.a libgeos_c.dll.a libgeos_c.la
$ echo $LD_LIBRARY_PATH
[CUTED...]:/cygdrive/e/minitage/dependencies/geos-3.0/parts/part/lib:[CUTED...]
$ echo $PATH
[CUTED...]:/cygdrive/e/minitage/dependencies/geos-3.0/parts/part/bin:[CUTED...]
I also attached cygcheck output.
--
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091204/e266ec6a/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091204/e266ec6a/attachment.sig>
More information about the Cygwin
mailing list