Mac os x eruby

hi all, transami here. not that anyone has probably given it much thought, but
yes, i am alive :slight_smile: 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

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

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
To: “ruby-talk ML” 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

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 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.

FUJIMOTO Hisakuni 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) that
solves the link issues.

You can get the port description from:

http://stuff.sateh.com/dports/ruby.tgz

It basically comes down to these patches:

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 wrote: