kcat / openal-soft

OpenAL Soft is a software implementation of the OpenAL 3D audio API.
Other
2.17k stars 526 forks source link

OSX: openal-info don't work #153

Open s172262 opened 7 years ago

s172262 commented 7 years ago
>$ /usr/local/Cellar/openal-soft/1.18.2/bin/openal-info
dyld: Library not loaded: @rpath/libopenal.1.dylib
  Referenced from: /usr/local/Cellar/openal-soft/1.18.2/bin/openal-info
  Reason: image not found
Abort trap: 6

>$ otool -L /usr/local/Cellar/openal-soft/1.18.2/bin/openal-info
/usr/local/Cellar/openal-soft/1.18.2/bin/openal-info:
    @rpath/libopenal.1.dylib (compatibility version 1.0.0, current version 1.18.2)
    /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 492.0.0)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 50.0.0)
    /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)

I think that it is need to avoid using runpath when installing openal-info for OSX.

$ otool -D /usr/local/Cellar/openal-soft/1.18.2/lib/libopenal.1.18.2.dylib
/usr/local/Cellar/openal-soft/1.18.2/lib/libopenal.1.18.2.dylib:
/usr/local/opt/openal-soft/lib/libopenal.1.dylib

libopenal.1.18.2.dylib may be correct.

kcat commented 7 years ago

The runtime path should be cleared by cmake when installing the executables. @rpath/libopenal.1.dylib could just indicate that it looks for it in the default library paths (on top of any runpath that may or may not be set) instead of a hard-coded one like /usr/lib or /System/Library/Frameworks. And since it looks like libopenal.1.dylib was installed in /usr/local/Cellar/openal-soft/1.18.2/lib or /usr/local/opt/openal-soft/lib or something, if the system doesn't know to look in that path for libraries that would explain why it can't find it.