Hi Juan,

On Tue, Oct 1, 2013 at 12:37 PM, "Juan J. Martínez" <[email protected]> wrote:
> On 01/10/13 10:23, Paul Colomiets wrote:
>> Hi Juan,
>>
>> On Mon, Sep 30, 2013 at 7:50 PM, "Juan J. Martínez" <[email protected]> wrote:
>>> Try it and let me know if it works in Mac:
>>>
>>
>> Here is what search paths I get:
>>
>> SEARCH PATH ['/usr/local/lib/libavbin.dylib',
>> '/Users/pc/lib/libavbin.dylib', '/usr/local/lib/libavbin.dylib',
>> '/usr/lib/libavbin.dylib']
>> SEARCH PATH 
>> ['/Users/pc/dev/skyward/build/Skyward_LM.app/Contents/MacOS/avbin',
>> '/Users/pc/dev/skyward/build/Skyward_LM.app/Contents/MacOS/lib/avbin',
>> 'avbin', '/Users/pc/lib/avbin', '/usr/local/lib/avbin',
>> '/usr/lib/avbin']
>>
>> The bug is that paths starting with slash are searched in
>> "DYLD_LIBRARY_PATH" and relative paths are searched in
>> "LD_LIBRARY_PATH". Not sure what specific fix to apply.
>
> Uff, I'm not sure how it works. I added it to LD_LIBRARY_PATH because I
> thought that was the right place. I'll check the code this evening, may
> be I missed something.
>
> See the patch:
>
> http://code.google.com/p/pyglet/source/detail?r=da26d7e1c3e71dfcc415e3cdec85a4f9a3add387
>
> Should we add the same in DYLD_LIBRARY_PATH part?
>

According to the docs, LD_LIBRARY_PATH is not used when library name
contains at least one directory entry. So the actual question is
probably why we don't add "lib*.dylib" for searching?

> Try the attached patch (you may need to change it, it was a quick shot
> in the dark!).
>
>> Also is it intended that bare name, without lib*.dylib is searched
>> for? I believe it's same crappy problem of using same function call
>> for name and libname.dylib that is wrong. In fact there are dynamic
>> libraries in OS X without extension but they are loaded with
>> load_framework.
>
> ctypes uses the bare name (you just look for "avbin").
>

Ah. Ok. So what's the point of "darwin='/usr/local/lib/avbin.dylib'"
isn't it easier to add /usr/local/lib dir to search path? Actually in
docs it's in DYLD_FALLBACK_LIBRARY_PATH, so should be searched for
anyway.

> I've seen the load_framework part but I don't really know how it works.
>

For me it just works, so no need to change it.

> I'm going to need your help here because I'm changing thing blindly. The
> Linux part it's OK, Windows still OK, only Mac needs tweaking.
>

Sure. I'm just trying to understand how it should work before patching anything.

-- 
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to