Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Trouble loading dll via ctypes (http://www.velocityreviews.com/forums/t588069-trouble-loading-dll-via-ctypes.html)

subopt inTheVicinityOf geemail.com 01-29-2008 03:00 PM

Trouble loading dll via ctypes
 
I'm trying to load a dll via ctypes by doing this:

cdll.LoadLibrary('/path/to/mylib.so')

But i'm getting this:

/path/to/mylib.so: cannot open shared object file: No such file or
directory What am i doing wrong?

The dll in question is in a directory mounted via NSF, but no part of
the path/filename is a symlink. When i try code from the docs:

cdll.LoadLibrary('libc.so.6')

,then all is fine.

I've also tried to set my LD_LIBRARY_PATH before starting Python,
checking it via os.environ, then doing the cdll.LoadLibrary(...), but
that fails with the same complaint. What am i doing wrong?

tia,
Eric

Helmut Jarausch 01-30-2008 04:21 PM

Re: Trouble loading dll via ctypes
 
subopt inTheVicinityOf geemail.com wrote:
> I'm trying to load a dll via ctypes by doing this:
>
> cdll.LoadLibrary('/path/to/mylib.so')
>
> But i'm getting this:
>
> /path/to/mylib.so: cannot open shared object file: No such file or
> directory What am i doing wrong?
>
> The dll in question is in a directory mounted via NSF, but no part of
> the path/filename is a symlink. When i try code from the docs:
>
> cdll.LoadLibrary('libc.so.6')
>
> ,then all is fine.
>
> I've also tried to set my LD_LIBRARY_PATH before starting Python,
> checking it via os.environ, then doing the cdll.LoadLibrary(...), but
> that fails with the same complaint. What am i doing wrong?
>


I vaguely remember you need execute permissions for a dynamic library to load.
Permissions on an NFS mounted directory are different, especial for user 'root'.

Check if can execute some executable in that NFS path.

Helmut.



--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany


All times are GMT. The time now is 07:13 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.