[CSOUND-DEV] xcode question...
Date | 2015-10-13 15:52 |
From | Rory Walsh |
Subject | [CSOUND-DEV] xcode question... |
Any Xcode people out who might be able to assist me with this? I'm trying to bundle Csound into my apps by including the framework within the app bundle. To do so I use install_name_tool like this: This works fine for the main Cabbage app bundle, but doesn't work for VST bundles. I don't get it because my VSTs bawk out with the following error:install_name_tool -id @executable_path/../Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64 \ /Users/walshr/sourcecode/csound/build/CsoundLib64.framework/Versions/6.0/CsoundLib64 Attempting to load VST: /Users/walshr/Library/Audio/Plug-Ins/VST/CabbagePlugin.vst 2015-10-13 15:38:53.132 Plugin Host[24623:1347163] Error loading /Users/walshr/Library/Audio/Plug-Ins/VST/CabbagePlugin.vst/Contents/MacOS/CabbagePlugin: dlopen(/Users/walshr/Library/Audio/Plug-Ins/VST/CabbagePlugin.vst/Contents/MacOS/CabbagePlugin, 262): Library not loaded: @executable_path/../Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64 Referenced from: /Users/walshr/Library/Audio/Plug-Ins/VST/CabbagePlugin.vst/Contents/MacOS/CabbagePlugin Reason: image not found |
Date | 2015-10-13 16:11 |
From | Steven Yi |
Subject | Re: [CSOUND-DEV] xcode question... |
Maybe try @rpath or @loader_path? I imagine @executable_path is resolving to the VST Host's path. Check out: https://wincent.com/wiki/@executable_path,_@load_path_and_@rpath On Tue, Oct 13, 2015 at 10:52 AM, Rory Walsh |
Date | 2015-10-13 16:14 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Thanks Steven. I'll give it a go. On 13 October 2015 at 16:11, Steven Yi <stevenyi@gmail.com> wrote: Maybe try @rpath or @loader_path? I imagine @executable_path is |
Date | 2015-10-13 16:20 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Brilliant. loader_path did the trick :) On 13 October 2015 at 16:14, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-10-15 12:32 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Hmmm. No when I open Cabbage on a machine that doesn't have Csound installed it crashes out with an error about libsndfile. Do I have to use the install_name_tool with every library within the Csound framework too? On 13 October 2015 at 18:20, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-10-15 13:03 |
From | Victor Lazzarini |
Subject | Re: [CSOUND-DEV] xcode question... |
yes. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-10-15 13:15 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Yikes. Good to know. On 15 October 2015 at 15:03, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2015-10-15 13:40 |
From | Victor Lazzarini |
Subject | Re: [CSOUND-DEV] xcode question... |
and any other dependencies that each library might have. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-10-15 13:43 |
From | Victor Lazzarini |
Subject | Re: [CSOUND-DEV] xcode question... |
have a look at the build-release.sh script in the installer/macosx/ subdirectory. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-10-15 13:54 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
That's great. Thanks. On 15 October 2015 at 15:43, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2015-10-15 14:51 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
In order to know if this works I have to recreate the same conditions as on a clean machine without Csound. But I can't seem to do that even when I remove the CsoundLib.framework from Library/Frameworks. Is there anything else I can do to make sure Csound is completely removed from the system? The .app bundle that was causing problems on a fresh machine runs fine on mine? And I haven't ran any of the install_name_tool stuff yet. On 15 October 2015 at 13:54, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-10-15 14:55 |
From | Victor Lazzarini |
Subject | Re: [CSOUND-DEV] xcode question... |
There are two places it is normally installed: 1) the installer places it in /Library/Frameworks/CsoundLib64.framework 2) the cmake install method places it in ~/Library/Frameworks/CsoundLib64.framework Also you might have support libs hanging in /usr/local/lib ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 15 Oct 2015, at 14:51, Rory Walsh |
Date | 2015-10-15 15:00 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Bingo. They were hiding in /usr/loca/lib On 15 October 2015 at 14:55, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: There are two places it is normally installed: |
Date | 2015-10-15 16:11 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Seems like my luck ran out with this one. On the off chance someone can help, I'll describe what I'm at. I've placed the libsndfile.1.dylib into the same folder as the CsoundLib64 binary in my custom Csound framework. I run this command. According to what spare information I can find, @loader_path will get expanded to the full path of the loading binary, in this case Csound64Lib. When I build Cabbage xcode bundles the Csound framework into the app bundle. But Csound can't find the libsndfile library when it's first called. I'll keep digging.. install_name_tool -id @loader_path/libs/libsndfile.1.dylib \ /Users/walshr/sourcecode/csound/build/CsoundLib64.framework/libs/libsndfile.1.dylib On 15 October 2015 at 15:00, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-10-15 16:29 |
From | Steven Yi |
Subject | Re: [CSOUND-DEV] xcode question... |
Are you using install_name_tool with -change on the libraries that link to libsndfile? On Thu, Oct 15, 2015 at 11:11 AM, Rory Walsh |
Date | 2015-10-15 16:29 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Nope. I've been using it with -id? I guess I should use -change instead? On 15 October 2015 at 16:29, Steven Yi <stevenyi@gmail.com> wrote: Are you using install_name_tool with -change on the libraries that |
Date | 2015-10-15 16:34 |
From | Steven Yi |
Subject | Re: [CSOUND-DEV] xcode question... |
I think you use -id on the library that is linked to, and use -change on the library that is on the executable or library that is linked from. (I've never really understood why libraries have id's on OSX...) On Thu, Oct 15, 2015 at 11:29 AM, Rory Walsh |
Date | 2015-10-15 17:06 |
From | Victor Lazzarini |
Subject | Re: [CSOUND-DEV] xcode question... |
you need to do both: 1) change the ID for each library to reflect the location 2) change the link on each loader exec or lib to point to the correct lib location Use otool -L to check it is correct. Again if you look in that script you will see how it is done. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland > On 15 Oct 2015, at 16:34, Steven Yi |
Date | 2015-10-15 17:29 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Thanks guys. I'll take another crack at it tomorrow. On 15 October 2015 at 19:06, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: you need to do both: |
Date | 2015-10-16 16:31 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Hi guys. I've lifted what I needed from that script and tried to put together my own but I'm still get an error about libsndfile. This is my script: I'm rather hoping there is an obvious problem that you can spot? https://github.com/rorywalsh/cabbage/blob/develop/Builds/MacOSX/relink.sh On 15 October 2015 at 17:29, Rory Walsh <rorywalsh@ear.ie> wrote:
|
Date | 2015-10-16 16:33 |
From | Victor Lazzarini |
Subject | Re: [CSOUND-DEV] xcode question... |
Can you try running otool -L … and see what it says? ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 16 Oct 2015, at 16:31, Rory Walsh |
Date | 2015-10-16 16:37 |
From | Victor Lazzarini |
Subject | Re: [CSOUND-DEV] xcode question... |
Typo: @exectuble_path should be @executable_path ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 16 Oct 2015, at 16:31, Rory Walsh |
Date | 2015-10-16 16:44 |
From | Rory Walsh |
Subject | Re: [CSOUND-DEV] xcode question... |
Fixed that, but still the same. otool on my Cabbage binary: otool on the Csound library within that bundle after running that script:@executable_path/../Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64 (compatibility version 6.0.0, current version 0.0.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 492.0.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI (compatibility version 1.0.0, current version 73.0.0) /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1.8.0) /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit (compatibility version 1.0.0, current version 537.78.2) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1265.21.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 48.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.17.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 59.0.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1056.16.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) @executable_path/../Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64 (compatibility version 6.0.0, current version 0.0.0) libsndfile.1.dylib (compatibility version 2.0.0, current version 2.25.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0) On 16 October 2015 at 16:37, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: Typo: |