On Jan 26, 7:57 am, Gary <[EMAIL PROTECTED]> wrote:
> On Jan 25, 9:19 pm, "Alex Holkner" <[EMAIL PROTECTED]> wrote:
>
> > On Jan 26, 2008 3:59 PM, Gary <[EMAIL PROTECTED]> wrote:
>
> > > On my Linux machines, with the new Pyglet1.0, I can't import
> > > pyglet.clock because the code ends up taking a Mac branch and so fails
> > > to find a file '/usr/lib/libc.dylib'.    So I added 4 lines to the if
> > > at
> > > about line 165 to handle the Linux case.
>
> > > If preferred, I can file an official bug report and supply the fix as
> > > a patch.
>
> > It sounds like your machine is missing /usr/lib/libc.so.  Is there a
> > similarly named/versioned file that can be added as a fallback?
>
> No, it's not missing /usr/lib/libc.so, but it is missing the requested
> file /usr/lib/libc.dylib.
>
> And this is where I get confused.  The contents of /usr/lib/libc.so is
> ascii text containing a line
> GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED (/lib/ld-
> linux.so.2 ) )
>
> (I've never seen this format for a .so file before this.)  All three
> of
> the files pointed to by that line *do* exist...
>
> So... any suggestions gratefully accepted.  This is an installation of
> Gentoo with, as far as I can tell, everything everything installed
> normally and working perfectly.
>
> Thanks,
> Gary

So... after poking around a bit more (and a good night's sleep and a
cup of coffee) here's a fix to the single load_library in clock.py

_c =pyglet.lib.load_library('c',linux2='/lib/libc.so.6',darwin='/lib/
libc.so.6')

The ascii text in the /usr/lib/libc.so, is apparently followed by
loader, but not by the ctypes LoadLibrary

It may be that the following code in pyglet's load_library is not
sufficient, as *both* calls to LoadLibrary produce the OSError.
    OSError: /usr/lib/libc.so: invalid ELF header
The first one is caught, but the second one is not.
            try:
                return ctypes.cdll.LoadLibrary(name)
            except OSError:
                path = self.find_library(name)
                if path:
                    return ctypes.cdll.LoadLibrary(path)

Gary Herron

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

Reply via email to