Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin loading error on OS X 10.10 #90

Closed
avilleret opened this issue Nov 17, 2014 · 8 comments
Closed

plugin loading error on OS X 10.10 #90

avilleret opened this issue Nov 17, 2014 · 8 comments

Comments

@avilleret
Copy link
Contributor

with a fresh build of Gem against Pd-0.46-2 64bit, I have some issue when loading some plugins.
I have those errors :

dylib loading file './gem_imageJPEG.so'!
library loading returned: dlerror 'dlopen(./gem_imageJPEG.so, 2): image not found'
dylib loading file './gem_imageTIFF.so'!
library loading returned: dlerror 'dlopen(./gem_imageTIFF.so, 2): image not found'
library loading returned: dlerror 'dlopen(./gem_videoVLC.so, 2): Library not loaded: @loader_path/lib/libvlc.5.dylib
  Referenced from: /Users/antoinevilleret/pd/Gem/plugins/videoVLC/.libs/gem_videoVLC.so
  Reason: image not found'

I guess this is some weird Mac OS behavior regarding linking.
And I successfully fixed videoVLC's error with install_name_tool :

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

But I don't know if this is the good way to do that and moreover, how is it possible to make gem_videoVLC.pd_darwin find VLC's lib automatically ?

My config.log is here : https://gist.github.com/avilleret/61fd71b53915ed1ead4f

@umlaeute
Copy link
Owner

i think you are changing gem_videoVLC.so correctly
as for automatically finding: i think this is impossible, given hat the user can install the VLC.app anywhere on the filesystem. so /Applications/VLC.app is a good default.

the alternative that might allow knowledgable users who don't want to compile to use any installed libvlc.so, would probably use symlinks:

  • keep the dependency as @loader_path/lib/libvlc.5.dylib
  • ship lib/libvlc.5.dylib as a symlink to /Applications/VLC.app/Contents/MacOS/lib/libvlc.5.dylib

so if someone wants to use a different libvlc.so, they can simply change the symlink

@umlaeute
Copy link
Owner

as for the errors regarding gem_imageJPEG.so and gem_imageTIFF.so, i'm a bit mystified.

configure detects that with libJPEG and libTIFF are missing (which would explain why they cannot be loaded), so why are they built/present in the first place? (are they leftovers from another build-attempt?)

@avilleret
Copy link
Contributor Author

when speaking about automatically finding VLC, I was refering to automatically change the link as I do, or automatically make a symlink as you suggest.
I was also thinking deployment. What about just automatically copying libvlc.dylib to lib/ and pakaging it with all the other ?

Concerning JPEG and TIFF I guess there are relics from a build previous to 10.10 upgrade.

@umlaeute
Copy link
Owner

i think this won't really work, as libvlc.dylib won't be of much use all by itself. iirc, libvlc comes with a number of plugins that do the actual media handling - so you end up including a large portion of the VLC.app, which doesn't make (much) sense.

anyhow, i think that autogen.sh && ./conigure && make (install) is really about building Gem, not necessarily about deploying it (on non-standard platforms like OSX and W32).

we might collect a few scripts that generate a deployable image. a start is in build/osx-dmginstaller (never mind the build-portion of the path - we don't want to clutter the filesystem with a deploy directory.)

@avilleret
Copy link
Contributor Author

ok, but apart of deploying, the build step make something not usable for the one who build it
maybe we can make a symlink automatically or, at least, make a note in the wiki.
What did you prefer ?

@umlaeute
Copy link
Owner

a note in the wiki

@avilleret
Copy link
Contributor Author

done with avilleret/Gem-wiki@b8d9091

@umlaeute
Copy link
Owner

thanks. merged.

btw, what is the difference between git@github.com:avilleret/Gem.wiki.git and git@github.com:avilleret/Gem-wiki.git ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants