raco executables linked to invalid runtime

57 views Asked by At

I have Racket installed via homebrew. When I attempt to create an executable with raco, per:

raco exe my_prog.rkt

...the resulting binary is linked to a Racket runtime with an invalid path. This can be seen with otool -L:

my_prog:
    /usr/local/Cellar/racket/6.3/lib/racket/Racket.framework/Versions/6.3_3m/Racket (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

The correct path doesn't contain racket/ after lib/. Thus, when you attempt to run the binary, dyld complains and aborts execution.

I can fix this, using install_name_tool:

chmod +w my_prog
install_name_tool -change /usr/local/Cellar/racket/6.3/lib/racket/Racket.framework/Versions/6.3_3m/Racket /usr/local/Cellar/racket/6.3/lib/Racket.framework/Versions/6.3_3m/Racket my_prog

...however, obviously this isn't something I want to have to do all the time!

Presumably raco is getting this invalid path from somewhere. Is there some way that I can configure this correctly?

0

There are 0 answers