I am actually proposing the opposite renaming.  I am assuming that the VLC 
plugin is useless without VLC itself.  I see no need to include libvlc in Gem 
if videoVLC can use the libvlc included in the VLC.app.  Therefore, 
gem_videoVLC.so should link against 
/Applications/VLC.app/Contents/MacOS/lib/libvlc.5.dylib.

I couldn't see what in the Gem build system is changing the lib path to 
@loader_path/lib/libvlc.5.dylib.  For most libs, that makes sense, but probably 
not here.

But for Mark, this should fix his issue:

install_name_tool -change \
        @loader_path/lib/libvlc.5.dylib \
        /Applications/VLC.app/Contents/MacOS/lib/libvlc.5.dylib \
        gem_videoVLC.so

.hc

On Apr 4, 2012, at 12:19 PM, Nicolas Montgermont wrote:

> no,
> 
> you need to redefine the reference of the library,
> in the directory of your plugin:
> 
> install_name_tool -change 
> /Applications/VLC.app/Contents/MacOS/lib/libvlc.5.dylib 
> @loader_path/lib/libvlc.5.dylib gem_videoVLC.so
> 
> should work,
> I'm not sure of the order, see explanations here for example:
> http://qin.laya.com/tech_coding_help/dylib_linking.html
> 
> any idea for the problem in my case?
> 
> n
> Le 04/04/12 16:43, m.e.grimm a écrit :
>> hey hans...
>> 
>> are you talking about configuring Gem with something like this:
>> 
>> CPPFLAGS=-I/Applications/VLC.app/Contents/MacOS/include
>> LDFLAGS=-L/Applications/VLC.app/Contents/MacOS/lib/ ./configure
>> --with-pd=/Applications/Pd-extended.app/Contents/Resources/include/pd/
>> --enable-fat-binary=x86_64 --with-ftgl-includes=/sw/include/
>> --with-libvlc-includes=-I/Applications/VLC.app/Contents/MacOS/include
>> --with-libvlc-libs=-L/Applications/VLC.app/Contents/MacOS/lib
>> 
>> because when I do so I get the same @loader_path/lib/libvlc.5.dylib
>> 
>> m
>> 
>> On Wed, Apr 4, 2012 at 9:58 AM, Hans-Christoph Steiner<[email protected]>  wrote:
>>> @loader_path is where the plugin was loaded from, so in your case:
>>> /Users/megrimm/Library/Pd/Gem/plugins/videoVLC/.libs/
>>> 
>>> That means its looking for libvlc here:
>>> /Users/megrimm/Library/Pd/Gem/plugins/videoVLC/.libs/lib/libvlc.5.dylib
>>> 
>>> On Mac OS X, the thing to do is to link against the libvlc included in the 
>>> VLC app.Then anyone who wants to use the VLC plugin for Gem just installs 
>>> the normal VLC app.  You can find that here:
>>> /Applications/VLC.app/Contents/MacOS/lib/
>>> 
>>> That would mean adding -I/Applications/VLC.app/Contents/MacOS/include to 
>>> CPPFLAGS and -L/Applications/VLC.app/Contents/MacOS/lib/ to LDFLAGS for the 
>>> build.  IMHO, the Gem build system would do that when it builds the VLC 
>>> plugin on Mac OS X.
>>> 
>>> .hc
>>> 
>>> 
>>> On Apr 4, 2012, at 8:40 AM, m.e.grimm wrote:
>>> 
>>>> hey nicolas
>>>> 
>>>> i reproduced what you did and also ended up with the gem_videoVLC.so
>>>> plugin, though on x86_64, with "[pix_video]: no video backends
>>>> found!".
>>>> 
>>>> I am also getting:
>>>> library loading returned: dlerror 'dlopen(./gem_videoVLC.so, 2):
>>>> Library not loaded: @loader_path/lib/libvlc.5.dylib
>>>>  Referenced from:
>>>> /Users/megrimm/Library/Pd/Gem/plugins/videoVLC/.libs/gem_videoVLC.so
>>>>  Reason: image not found'
>>>> 
>>>> though i differ with you in running otool -l gem_videoVLC.so:
>>>> Load command 12
>>>>          cmd LC_LOAD_DYLIB
>>>>      cmdsize 56
>>>>         name @loader_path/lib/libvlc.5.dylib (offset 24)
>>>>   time stamp 2 Wed Dec 31 19:00:02 1969
>>>>      current version 9.0.0
>>>> compatibility version 9.0.0
>>>> 
>>>> maybe we can figure this out today. let me know what you find out.
>>>> seems to just not be finding libvlc.5.dylib and thats all....
>>>> 
>>>> cheers
>>>> m
>>>> 
>>>> 
>>>> On Wed, Apr 4, 2012 at 3:56 AM, Nicolas Montgermont
>>>> <[email protected]>  wrote:
>>>>> Le 03/04/12 22:45, IOhannes m zmölnig a écrit :
>>>>> 
>>>>>> $ cd /path/to/Gem
>>>>>> $ LD_LIBRARY_PATH=/Applications/VLC.app/Contents/MacOS/lib pd -lib Gem
>>>>>> 
>>>>> The log is the same with or without the LD_LIBRARY_PATH, it is:
>>>>> 
>>>>> Machiavel:Gem nix$ 
>>>>> LD_LIBRARY_PATH=/Applications/VLC.app/Contents/MacOS/lib
>>>>> /Applications/Pd-extended.app/Contents/MacOS/Pd-extended
>>>>> [...]
>>>>> load plugins 'video' in './'
>>>>> pattern : ./gem_video*.so
>>>>> dylib loading file './gem_videoDarwin.so'!
>>>>> dylib loading file './gem_videoVLC.so'!
>>>>> library loading returned: dlerror 'dlopen(./gem_videoVLC.so, 2): Symbol 
>>>>> not
>>>>> found: _libvlc_media_add_option
>>>>>  Referenced from:
>>>>> /Users/nix/github/Gem/plugins/videoVLC/.libs/gem_videoVLC.so
>>>>>  Expected in: flat namespace
>>>>>  in /Users/nix/github/Gem/plugins/videoVLC/.libs/gem_videoVLC.so'
>>>>> 
>>>>> 
>>>>> I'm not sure what it means,...
>>>>> what I don't understand is it doesn't seen to be linked at all to libvlc:
>>>>> 
>>>>> Machiavel:Gem nix$ otool -L gem_videoVLC.so
>>>>> gem_videoVLC.so:
>>>>>    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current 
>>>>> version
>>>>> 7.9.0)
>>>>>    /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
>>>>> (compatibility version 1.0.0, current version 1789.0.0)
>>>>>    /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
>>>>> (compatibility version 2.0.0, current version 152.0.0)
>>>>>    /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
>>>>> (compatibility version 1.0.0, current version 15.0.0)
>>>>>    /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility
>>>>> version 1.0.0, current version 1.0.0)
>>>>>    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
>>>>> version
>>>>> 125.2.11)
>>>>>    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version
>>>>> 1.2.3)
>>>>> 
>>>>> 
>>>>> libvlc is only appearing in the search path of the library loading:
>>>>> 
>>>>> Machiavel:Gem nix$ otool -l gem_videoVLC.so
>>>>> [...]
>>>>> Load command 14
>>>>>    cmd LC_RPATH
>>>>>    cmdsize 68
>>>>>    path /Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib (offset 12)
>>>>> 
>>>>> any idea? I'm copying the plugins and the Gem.pd_darwin inside Pd-extended
>>>>> extra/Gem path if that matters.
>>>>> thx,
>>>>> n
>>>>> 
>>>>> 
>>>>> --
>>>>> http://nim.on.free.fr
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> GEM-dev mailing list
>>>>> [email protected]
>>>>> http://lists.puredata.info/listinfo/gem-dev
>>>> 
>>>> 
>>>> --
>>>> ____________________
>>>> m.e.grimm | m.f.a | ed.m.
>>>> [email protected]
>>>> _________________________________
>>>> 
>>>> _______________________________________________
>>>> GEM-dev mailing list
>>>> [email protected]
>>>> http://lists.puredata.info/listinfo/gem-dev
>>> 
>>> 
>>> ----------------------------------------------------------------------------
>>> 
>>>                                              http://at.or.at/hans/
>>> 
>>> 
>> 
>> 
> 
> -- 
> http://nim.on.free.fr



----------------------------------------------------------------------------

There is no way to peace, peace is the way.       -A.J. Muste



_______________________________________________
GEM-dev mailing list
[email protected]
http://lists.puredata.info/listinfo/gem-dev

Reply via email to