On 1/28/08, Alex Holkner <[EMAIL PROTECTED]> wrote:
> I don't completely understand dlopen, but my understanding was that
> the ld scripts like this are used only by gcc at compile time, not by
> the runtime library loader.
The reason for this thinking (this is on my Gentoo/64 box):
>>> from ctypes import CDLL, util
>>> CDLL('libc.so')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib64/python2.4/site-packages/ctypes/__init__.py", line
315, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/lib64/libc.so: invalid ELF header
>>> util.find_library('c')
'libc.so.6'
>>> CDLL('libc.so.6')
<CDLL 'libc.so.6', handle 2b3f3420e4b0 at 2b3f3390ea50>
So, dlopen can't open "libc.so", but find_library can get the correct version.
find_library tries ldconfig -p:
% /sbin/ldconfig -p | grep libc.so
libc.so.6 (libc6,x86-64, OS ABI: Linux 2.6.9) => /lib/libc.so.6
libc.so.6 (ELF, OS ABI: Linux 2.6.9) => /lib32/libc.so.6
libc.so.5 (ELF) => /usr/lib32/libc.so.5
which isn't helpful, but it then tries gcc, which resolves the link:
% gcc -Wl,-t -l c
...
/lib64/libc.so.6
...
I'd suggest that maybe Gary's gcc isn't setup correctly, but that
wouldn't make for a very useable Gentoo system ;-)
Alex.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---