On Jan 27, 2008 6:32 PM, Gary <[EMAIL PROTECTED]> wrote:

>
> Not true.   Keyword parameters of the form platform=path are only
> applied when on the specified platform, so the linux2=  will not
> affect
> execution of load_library on MacOSX in any way.  (Just like the
> darwin=
> parameter is completely ignored on Window's and Linux.)
>

Hmmm ... no, it is true.  You're suggesting a fix that changes the darwin
keyword to darwin='/lib/libc.so.6' - so this *would* break on MacOSX -
that's my point.  I know that the linux2 keyword arg is ignored on other
platforms ...

>
> Again, not quite right.  I did mis-label the branch when I said it was
> MacOSX.  In fact there are two branches to the if -- one for win32 and
> cygwin, and the other for everything else, including Linux and
> MacOSX.
> And in fact, ctypes is *not* following the ld linker script in
> /usr/lib/libc.so, but instead gives an error claiming that the file
> does
> not have an ELF header.  (Which is true -- since the file is ascii
> text.)  Perhaps ctypes should handle such a file, but it is not in
> this
> case.  Maybe this is a ctypes bug.
>

Yes, I incorrectly commented on this.  ctypes does *not* handle ld linker
scripts.  My guess is that when the linux loader in pyglet.lib builds the
cache based on libs it finds in /lib and /usr/lib, it hashes to
/usr/lib/libc.so - and this causes the 'splosion.

Try any experiment on your system using ctypes to see if it will find libc
with:

>>> import ctypes.utils
>>> ctypes.utils.find_library('c')

This probably returns None on your box suggesting your gcc setup might be
wrong for whatever reason.  On my gentoo box it works fine.  I would start
nagging the ctypes guys to add support for ld linker scripts which would
solve this problem eventually.  I can't think of how pyglet.lib could be
patched to handle this case without making the so cache generation really
slow - like looking inside linker scripts to resolve the canonical path to
the so.

--
Drew

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to