You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Pete Robbins <ro...@googlemail.com> on 2007/02/20 16:23:54 UTC

Native: restructuing Ruby extension

I'm having great trouble getting the Ruby extension to work under Mac OS. It
looks like Ruby does not like the format of our automake dynamic library
libtuscany_sca_ruby.dylib. To fix this I need to use Ruby's mkmf.rb to
generate a makefile and build the extension. The easiest way to do this is
to build the Ruby extension code contained in RubyCompositeContext as a
separate library. This is the piece that Ruby loads via the "require"
statement. The remaining code which is the implementation extension to
tuscany will be built as it is now via automake. I think this is a logical
separation.

I propose to use tuscany_sca_ruby for the extension that Ruby will load so
the require("tuscany_sca_ruby") statement in the samples is still good. The
extension to Tuscany I will call libtuscany_sca_ruby_lang.so as it is the
Ruby Language extension for Tuscany.


Cheers,

-- 
Pete

Re: Native: restructuing Ruby extension

Posted by Pete Robbins <ro...@googlemail.com>.
On 20/02/07, Andrew Borley <aj...@gmail.com> wrote:
>
> On 2/20/07, Pete Robbins <ro...@googlemail.com> wrote:
> > I'm having great trouble getting the Ruby extension to work under Mac
> OS. It
> > looks like Ruby does not like the format of our automake dynamic library
> > libtuscany_sca_ruby.dylib. To fix this I need to use Ruby's mkmf.rb to
> > generate a makefile and build the extension. The easiest way to do this
> is
> > to build the Ruby extension code contained in RubyCompositeContext as a
> > separate library. This is the piece that Ruby loads via the "require"
> > statement. The remaining code which is the implementation extension to
> > tuscany will be built as it is now via automake. I think this is a
> logical
> > separation.
> >
> > I propose to use tuscany_sca_ruby for the extension that Ruby will load
> so
> > the require("tuscany_sca_ruby") statement in the samples is still good.
> The
> > extension to Tuscany I will call libtuscany_sca_ruby_lang.so as it is
> the
> > Ruby Language extension for Tuscany.
> >
> >
>
> Sounds fine to me. +1
> I guess we'll have the same structure on Linux?


Yes. We'll have a folder containing the cpp file that contains the
Init_tuscany_sca_ruby methods and it will also contain a ruby script to
generate the makefile. I'll add some rules into the automake to execute the
build in this folder.

We could leave windows asis but I think it would be better to create a small
Ruby extension stub dll for that as well.

Cheers,

-- 
Pete

Re: Native: restructuing Ruby extension

Posted by Andrew Borley <aj...@gmail.com>.
On 2/20/07, Pete Robbins <ro...@googlemail.com> wrote:
> I'm having great trouble getting the Ruby extension to work under Mac OS. It
> looks like Ruby does not like the format of our automake dynamic library
> libtuscany_sca_ruby.dylib. To fix this I need to use Ruby's mkmf.rb to
> generate a makefile and build the extension. The easiest way to do this is
> to build the Ruby extension code contained in RubyCompositeContext as a
> separate library. This is the piece that Ruby loads via the "require"
> statement. The remaining code which is the implementation extension to
> tuscany will be built as it is now via automake. I think this is a logical
> separation.
>
> I propose to use tuscany_sca_ruby for the extension that Ruby will load so
> the require("tuscany_sca_ruby") statement in the samples is still good. The
> extension to Tuscany I will call libtuscany_sca_ruby_lang.so as it is the
> Ruby Language extension for Tuscany.
>
>

Sounds fine to me. +1
I guess we'll have the same structure on Linux?

Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org