[racket] Emacs, racket and OS X issues

From: John Clements (clements at brinckerhoff.org)
Date: Thu Jul 14 02:00:58 EDT 2011

On Jul 13, 2011, at 8:19 PM, Lavoie Francis wrote:

> Hi,
> 
> I want to learn racket. I already started learning lisp from Land of Lisp, Practical Common Lisp and a bit of Clojure.
> 
> For my everyday job (python, javascript) I use emacs, to learn lisp and clojure I used emacs with slime. I would like to do the same thing with racket but I ran into trouble, emacs can't find racket.
> 
> First, it looks like emacs for OS X does not use the users' own $PATH, but the one of the system. I tried some hack I found on google (http://olabini.com/blog/2009/12/path-problem-with-emacs-on-mac-os-x/, http://www.emacswiki.org/emacs/EmacsApp#toc2) without luck, emacs can't find racket.

This one I can shed some light on.  If you start emacs (or any other program) from a shell (running in a terminal window), it inherits that shell's PATH.  If you start it from the finder, though, it doesn't. One way to fix this is to start emacs from a terminal window. Another is to try a hack such as the one you describe.  Another one is to explicitly specify the path in the command that runs racket.

> 
> So I tried to compile racket from source. I used the unix build to install racket into the standard path.
>> ./configure --enable-mac64 --enable-xonx --prefix=/usr/local
> It produced the following error message: --enable-mac64 and --enable-xonx are not valid option; but everything runs well and works! Great I can start to create some stuff.
> 
> But I still have some issues. I cannot load gracket, I get an error because it is unable to locate cairo.
> ffi-lib: couldn't open "libcairo.2.dylib" (dlopen(libcairo.2.dylib, 10): image not found)

It certainly looks to me like the problem you're seeing is a result of the incompatible flags.  Can you tell me why you want --enable-xonx?  I run racket every day on an OS X box without issue.  Is it actually important that it run under X?

John Clements

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20110713/7f0a73e6/attachment.p7s>

Posted on the users mailing list.