# Mac os x eruby

**URL:** <https://rubytalk.org/t/mac-os-x-eruby/3486>\
**Category:** ruby-talk\
**Created:** [10 December 2002 11:02 UTC](https://rubytalk.org/t/mac-os-x-eruby/3486 "2002-12-10T11:02:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Sawyer](https://avatars.discourse-cdn.com/v4/letter/t/a587f6/32.png) [@Tom\_Sawyer](https://rubytalk.org/u/Tom_Sawyer)\
**Post date:** [10 December 2002 11:02 UTC](https://rubytalk.org/t/mac-os-x-eruby/3486/1 "2002-12-10T11:02:54Z")

</div>

hi all, transami here. not that anyone has probably given it much thought, but  
yes, i am alive 🙂 getting back to coding a bit after a few months of much  
needed sabatical…

so i have a question. i’m looking at hosting a wiki on an mac xserve and i  
started doing some development work on a ruby based wiki. what’s the status  
of eruby on mac os x? last i heard she’s still barfing due to a dynamic  
linking issues.

thanks,  
glad to be back,  
transami

---

<div class="post-metadata">

**Author:** ![FUJIMOTO\_Hisakuni](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@FUJIMOTO\_Hisakuni](https://rubytalk.org/u/FUJIMOTO_Hisakuni)\
**Post date:** [10 December 2002 23:45 UTC](https://rubytalk.org/t/mac-os-x-eruby/3486/2 "2002-12-10T23:45:00Z")

</div>

To make eruby, libruby is necessary. However, Mac OS X 10.2  
(Jaguar) does not include libruby somehow. So you need to build  
libruby with ruby source in order to make eruby. I don’t use  
eruby, so I have not tried this. But maybe I think so.

If this is too hard, you can use Erb written only with Ruby. Erb  
is useful.

Regards,

> **···**
>
> At Tue, 10 Dec 2002 20:02:54 +0900, Tom Sawyer wrote:
> 
> > so i have a question. i’m looking at hosting a wiki on an mac xserve and i  
> > started doing some development work on a ruby based wiki. what’s the status  
> > of eruby on mac os x? last i heard she’s still barfing due to a dynamic  
> > linking issues.
> 
> –  
> FUJIMOTO Hisakuni

---

<div class="post-metadata">

**Author:** ![Gennady1](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@Gennady1](https://rubytalk.org/u/Gennady1)\
**Post date:** [11 December 2002 00:33 UTC](https://rubytalk.org/t/mac-os-x-eruby/3486/3 "2002-12-11T00:33:50Z")

</div>

> > so i have a question. i’m looking at hosting a wiki on an mac xserve and  
> > i  
> > started doing some development work on a ruby based wiki. what’s the  
> > status  
> > of eruby on mac os x? last i heard she’s still barfing due to a dynamic  
> > linking issues.
> 
> To make eruby, libruby is necessary. However, Mac OS X 10.2  
> (Jaguar) does not include libruby somehow. So you need to build

Mac OS X 10.2 (Jaguar) does include libruby and it is OK, as mod\_ruby uses  
it and works perfectly well. The problem with eruby lays in how dynamic  
linking is performed in OS X. When eruby.so is dlopened by Apache Ruby  
symbols (rb\_\*) are not found despite the fact that they are already present  
in the process (loaded by mod\_ruby, actually libruby.a is compiled into  
mod\_ruby during build). I think that to fix it libruby must be made shared  
and both mod\_ruby and eruby compilation changed to refer it. Than on load a  
linker will be able to locate symbols for both. I haven’t given it a try  
yet, maybe sometime next week.

> **···**
>
> ----- Original Message -----  
> From: “FUJIMOTO Hisakuni” [hisa@imasy.or.jp](mailto:hisa@imasy.or.jp)  
> To: “ruby-talk ML” [ruby-talk@ruby-lang.org](mailto:ruby-talk@ruby-lang.org)  
> Sent: Tuesday, December 10, 2002 3:45 PM  
> Subject: Re: mac os x eruby
> 
> > At Tue, 10 Dec 2002 20:02:54 +0900, \> Tom Sawyer wrote:
> 
> > libruby with ruby source in order to make eruby. I don’t use  
> > eruby, so I have not tried this. But maybe I think so.
> > 
> > If this is too hard, you can use Erb written only with Ruby. Erb  
> > is useful.
> > 
> > ## Regards,
> > 
> > FUJIMOTO Hisakuni

---

<div class="post-metadata">

**Author:** ![FUJIMOTO\_Hisakuni](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@FUJIMOTO\_Hisakuni](https://rubytalk.org/u/FUJIMOTO_Hisakuni)\
**Post date:** [11 December 2002 02:14 UTC](https://rubytalk.org/t/mac-os-x-eruby/3486/4 "2002-12-11T02:14:32Z")

</div>

Really? Please tell me which package in Jaguar include libruby. I  
could not find “libruby(.a|.dylib)” in packages which are  
contained in Jaguar and some updates.

Therefor, RubyCocoa 0.3 binary package which I distribute include  
“libruby.a”. Maybe a ruby package of FINK include libruby. I  
don’t know detail about FINK because I do not install it.

thanks,

> **···**
>
> At Wed, 11 Dec 2002 09:33:50 +0900, Gennady F. Bystritsky [gfb@tonesoft.com](mailto:gfb@tonesoft.com) wrote:
> 
> > Mac OS X 10.2 (Jaguar) does include libruby and it is OK, as mod\_ruby uses
> 
> –  
> FUJIMOTO Hisakuni
> 
> # Information for RubyCocoa folks. libruby.a will not be needed in
> 
> # RubyCocoa 0.4 because RubyCocoa.framework itself include libruby.
> 
> # Please wait 0.4 a little. thanks.

---

<div class="post-metadata">

**Author:** ![Stefan\_Arentz1](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@Stefan\_Arentz1](https://rubytalk.org/u/Stefan_Arentz1)\
**Post date:** [11 December 2002 03:16 UTC](https://rubytalk.org/t/mac-os-x-eruby/3486/5 "2002-12-11T03:16:13Z")

</div>

FUJIMOTO Hisakuni [hisa@imasy.or.jp](mailto:hisa@imasy.or.jp) writes:

> > Mac OS X 10.2 (Jaguar) does include libruby and it is OK, as mod\_ruby uses
> 
> Really? Please tell me which package in Jaguar include libruby. I  
> could not find “libruby(.a|.dylib)” in packages which are  
> contained in Jaguar and some updates.
> 
> Therefor, RubyCocoa 0.3 binary package which I distribute include  
> “libruby.a”. Maybe a ruby package of FINK include libruby. I  
> don’t know detail about FINK because I do not install it.

I have made a ruby port for darwinports ([www.opendarwin.org](http://www.opendarwin.org)) that  
solves the link issues.

You can get the port description from:

[http://stuff.sateh.com/dports/ruby.tgz](http://stuff.sateh.com/dports/ruby.tgz)

It basically comes down to these patches:

— [configure.org](http://configure.org) Mon Dec 9 21:27:33 2002  
+++ configure Mon Dec 9 21:28:39 2002  
@@ -5054,7 +5054,7 @@  
darwin\*)  
LIBRUBY\_SO=‘lib$(RUBY\_INSTALL\_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib’  
LIBRUBY\_LDSHARED=‘cc -dynamiclib -undefined suppress -flat\_namespace’

- 

```
  LIBRUBY_DLDFLAGS='-install_name lib$(RUBY_INSTALL_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibili

```

ty\_version $(MAJOR).$(MINOR)’

- 

```
  LIBRUBY_DLDFLAGS='-install_name $(prefix)/lib/lib$(RUBY_INSTALL_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY

```

) -compatibility\_version $(MAJOR).$(MINOR)’  
LIBRUBY\_ALIASES=‘lib$(RUBY\_INSTALL\_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY\_INSTALL\_NAME).dylib’  
;;  
_)  
@@ -5076,7 +5076,7 @@  
CFLAGS=“$CFLAGS -pipe -no-precomp”  
;;  
darwin_)

- 

```
  CFLAGS="$CFLAGS -pipe -no-precomp"

```

- 

```
  CFLAGS="$CFLAGS -pipe -traditional-cpp"
  ;;

```

os2\_emx)  
CFLAGS=“$CFLAGS -DOS2”

Together with the --enable-shared configure option.

S.

> **···**
>
> > At Wed, 11 Dec 2002 09:33:50 +0900, \> Gennady F. Bystritsky [gfb@tonesoft.com](mailto:gfb@tonesoft.com) wrote:
