# ParseTree and OS X/other newbie OS X questions

**URL:** <https://www.ruby-forum.com/t/parsetree-and-os-x-other-newbie-os-x-questions/72229>\
**Category:** Ruby\
**Created:** [October 15, 2006, 9:13pm UTC](https://www.ruby-forum.com/t/parsetree-and-os-x-other-newbie-os-x-questions/72229 "2006-10-15T21:13:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [October 15, 2006, 9:13pm UTC](https://www.ruby-forum.com/t/parsetree-and-os-x-other-newbie-os-x-questions/72229/1 "2006-10-15T21:13:03Z")

</div>

Couple of questions from a newbie on OS X (intel PB Pro)…

First, ParseTree doesn’t want to install do to compilation issues…

mbp:/usr/lib/ruby/gems/1.8/gems/ParseTree-1.6.0 Ken$ sudo rake install  
Password:  
(in /usr/lib/ruby/gems/1.8/gems/ParseTree-1.6.0)  
sh: line 1: RC\_CFLAGS: command not found  
/usr/bin/ld: Undefined symbols:  
\_rb\_cObject  
\_rb\_const\_get\_at  
\_rb\_define\_singleton\_method  
\_rb\_intern  
collect2: ld returned 1 exit status  
rake aborted!  
error executing cc $(RC\_CFLAGS) -bundle -g -Os -pipe -fno-common -pipe  
-fno-common -pipe -fno-common -I /usr/lib/ruby/1.8/universal-darwin8.0  
-o “/Users/Ken/.ruby\_inline/Inline\_ParseTree\_dc10.bundle”  
“/Users/Ken/.ruby\_inline/Inline\_ParseTree\_dc10.c” : 256  
Renamed /Users/Ken/.ruby\_inline/Inline\_ParseTree\_dc10.c to  
/Users/Ken/.ruby\_inline/Inline\_ParseTree\_dc10.c.bad  
/usr/lib/ruby/gems/1.8/gems/ParseTree-1.6.0/rakefile:7  
(See full trace by running task with --trace)

…perhaps I need to do further ruby setup?

Also, I first installed ParseTree using ‘sudo gem install ParseTree’ but  
I didn’t get any messages to the effect that that had even tried a  
compile–certainly not any error message. Is gem install supposed to  
compile C extensions when it install something?

Finally, given that OS X is a bit of an odd bird, is there anything else  
I need to do to make sure installs work smoothly in the future?

Thanks,  
Ken

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [October 15, 2006, 11:29pm UTC](https://www.ruby-forum.com/t/parsetree-and-os-x-other-newbie-os-x-questions/72229/2 "2006-10-15T23:29:16Z")

</div>

On Oct 15, 2006, at 12:11 PM, Kenneth McDonald wrote:

> Couple of questions from a newbie on OS X (intel PB Pro)…
> 
> First, ParseTree doesn’t want to install do to compilation issues…
> 
> mbp:/usr/lib/ruby/gems/1.8/gems/ParseTree-1.6.0 Ken$ sudo rake install

You don’t want to run this from the gem. You’ll end up installing a  
version that overrides the gem version, so you won’t get future updates.

> error executing cc $(RC\_CFLAGS) -bundle -g -Os -pipe -fno-common -  
> pipe -fno-common -pipe -fno-common -I /usr/lib/ruby/1.8/universal-  
> darwin8.0 -o “/Users/Ken/.ruby\_inline/Inline\_ParseTree\_dc10.bundle”  
> “/Users/Ken/.ruby\_inline/Inline\_ParseTree\_dc10.c” : 256  
> Renamed /Users/Ken/.ruby\_inline/Inline\_ParseTree\_dc10.c to /Users/  
> Ken/.ruby\_inline/Inline\_ParseTree\_dc10.c.bad  
> /usr/lib/ruby/gems/1.8/gems/ParseTree-1.6.0/rakefile:7  
> (See full trace by running task with --trace)
> 
> …perhaps I need to do further ruby setup?

Apple’s ruby has a broken rbconfig.rb. Using a Ruby built from  
source will work.

> Also, I first installed ParseTree using ‘sudo gem install  
> ParseTree’ but I didn’t get any messages to the effect that that  
> had even tried a compile–certainly not any error message. Is gem  
> install supposed to compile C extensions when it install something?

ParseTree uses RubyInline so it is compiled at runtime if it hasn’t  
been compiled before.

> Finally, given that OS X is a bit of an odd bird, is there anything  
> else I need to do to make sure installs work smoothly in the future?

Its best to install a newer ruby from source instead of using the  
built-in version.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![Kenneth\_McDonald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/dc4da7/32.png) [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Post date:** [October 16, 2006, 4:58am UTC](https://www.ruby-forum.com/t/parsetree-and-os-x-other-newbie-os-x-questions/72229/3 "2006-10-16T04:58:57Z")

</div>

Install from source worked. Thanks! Wish Apple would get their act  
together on this stuff…
