[racket] FFI and @rpath dependencies

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Nov 18 15:15:47 EST 2013

You can use `install_name_tool` to change the path in a copy of
`SDL2_mixer` so that it uses `@executable_path/...` instead of
`@rpath/...`.

At Mon, 18 Nov 2013 20:30:50 +0100, Philipp Dikmann wrote:
> Dear Racket-Users,
> 
> while using ffi-lib to invoke the SDL2 and SDL2_mixer libraries (on Mac 
> OS X 10.6.8), I came across a peculiar problem:
> the latter requires the former and does so by depending on its location 
> at "@rpath/SDL2.framework/Versions/A/SDL2".
> In the context of Racket, @rpath appears to always resolve to 
> "/Library/Frameworks".
> 
> This is fine for development but breaks in deployment (raco distribute): 
> Although I can include & refer to the libraries in the application 
> bundle using define-runtime-path, SDL2_mixer will continue to look for 
> SDL2 in "/Library/Frameworks" because @rpath keeps pointing there.
> 
> I was wondering if there is a way to amend/change the directory of 
> @rpath in the context of a Racket program, or wether I'm missing a 
> critical point regarding the use of define-runtime-path. Or wether I'm 
> stuck with fixing the libraries manually.
> 
> Thanks for your time & best regards,
> Philipp
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.