# Problems building binaries on OS X 10.4

**URL:** <https://www.ruby-forum.com/t/problems-building-binaries-on-os-x-10-4/101663>\
**Category:** Ruby\
**Created:** [February 6, 2006, 8:09pm UTC](https://www.ruby-forum.com/t/problems-building-binaries-on-os-x-10-4/101663 "2006-02-06T20:09:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![epasquier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/2bfe46/32.png) [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Post date:** [February 6, 2006, 8:09pm UTC](https://www.ruby-forum.com/t/problems-building-binaries-on-os-x-10-4/101663/1 "2006-02-06T20:09:47Z")

</div>

This is with the Ruby that ships with 10.4 (Tiger). We haven’t tried  
building our  
own Ruby on this platform yet.

The problem is that the .h header files are in  
/usr/lib/ruby/1.8/universal-darwin8.0,  
while the library files are bundles in  
/usr/lib/ruby/1.8/powerpc-darwin8.0

which makes sense. But the extfile build system seems to look in  
powerpc-darwin8.0, but not universal… – the RUBY\_PLATFORM  
var is set to “powerpc-darwin8.0”.

Should we build our own Ruby? Is there a way to configure our build  
system to use /usr/bin/ruby? What if we want to build and use a fat  
ruby?

Thanks,  
Eric

---

<div class="post-metadata">

**Author:** ![epasquier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/2bfe46/32.png) [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Post date:** [February 6, 2006, 8:19pm UTC](https://www.ruby-forum.com/t/problems-building-binaries-on-os-x-10-4/101663/2 "2006-02-06T20:19:02Z")

</div>

When you (or Apple, in this case) configure and build Ruby, Ruby  
records the location of its header files. If you later try to build an  
extension, extconf.rb expects to find those header files in the same  
place. However, Apple in its wisdom chose not to put them there.

Some folks have been satisfied to create symlinks for the header files  
in /usr/lib/ruby/1.8/powerpc-darwin8.0, which works. Most folks, I  
think, are simply building their own Ruby. It’s not hard or  
time-consuming.

---

<div class="post-metadata">

**Author:** ![epasquier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/2bfe46/32.png) [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Post date:** [February 7, 2006, 8:41pm UTC](https://www.ruby-forum.com/t/problems-building-binaries-on-os-x-10-4/101663/3 "2006-02-07T20:41:48Z")

</div>

The weird part of this, btw, is that this problem doesn’t show up with  
gcc 3.x on Tiger, but it does with gcc 4. I have no idea why.

---

<div class="post-metadata">

**Author:** ![epasquier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/2bfe46/32.png) [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Post date:** [February 9, 2006, 7:13am UTC](https://www.ruby-forum.com/t/problems-building-binaries-on-os-x-10-4/101663/4 "2006-02-09T07:13:34Z")

</div>

> Some folks have been satisfied to create symlinks for the header files  
> in /usr/lib/ruby/1.8/powerpc-darwin8.0, which works. Most folks, I  
> think, are simply building their own Ruby. It’s not hard or  
> time-consuming.

Where are the header files located generally?

James

---

<div class="post-metadata">

**Author:** ![epasquier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/2bfe46/32.png) [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Post date:** [February 7, 2006, 9:04pm UTC](https://www.ruby-forum.com/t/problems-building-binaries-on-os-x-10-4/101663/5 "2006-02-07T21:04:28Z")

</div>

Thanks, rm

I agree that it isn’t hard to build my own Ruby. The problem here is  
that  
this is part of a large build process done by several developers on  
many  
machines. So in other words, building our own Ruby should be SOP for  
each new Mac we bring in.

---

<div class="post-metadata">

**Author:** ![epasquier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/2bfe46/32.png) [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Post date:** [February 9, 2006, 7:18am UTC](https://www.ruby-forum.com/t/problems-building-binaries-on-os-x-10-4/101663/6 "2006-02-09T07:18:49Z")

</div>

On 2/6/06, Eric P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> powerpc-darwin8.0, but not universal… – the RUBY\_PLATFORM  
> var is set to “powerpc-darwin8.0”.
> 
> Should we build our own Ruby? Is there a way to configure our build  
> system to use /usr/bin/ruby? What if we want to build and use a fat  
> ruby?

during the ./configure stage, specify --prefix=/usr and it will  
install in /usr/bin/ruby and replace the stock ruby.

i.e.

./configure --prefix=/usr  
make  
sudo make install

done.

aaronk@Mini % which ruby

```
           ~

```

/usr/bin/ruby

cheers.
