On Tue, Mar 10, 2009 at 1:53 PM, Daniel Golle <redmine / ruby-lang.org> wrote: > Issue #1261 has been updated by Daniel Golle. > > > i was fiddling around for hours to make gems, rake and rake-compiler partf the OpenWRT toolchain... now i tried it and it's not so helpful in my situation i believe > cons of rake-compiler for my project: > - i won't use gems but rather the OpenWRT's opkg to manage packages So you're not trying to generate a ruby gem, a ruby extension or what? > - it manages it's own cross-compiled versions of ruby, which is unneeded,ecause i got it already as a part of the OpenWRT build Well, last time I checked, ruby needs the information in rbconfig to successfuly build any version of Ruby, cross or not cross platform. To build ruby extensions (that then are packaged into gems) you need that file. > - it needs that you specify the target platform in the Rakefile. this is really bad, because i'll need to modify the Rakefile whenever OpenWRT supports a new architecture. You specify the target of the platform *inside* the block for cross platform, which only applies if you're compiling the extension cross platform. Of course, all that assumes you're building a ruby extension that needs to link against binaries for that platform you're targeting to. > - in the current version 0.3.1 it fails cross-compiling for anything elsehan mingw32 target (see line 40 in cross-ruby.rake) Is expecting MinGW as compiler, either i386-mingw32-gcc (OSX), or i585-mingw32msvc-gcc (Ubuntu Linux) Is not perfect and I'm working in some patches for that. > in the end, rake-compiler also does nothing else than calling ruby -I{...} extconf.rb and then make while unnecessarily complicating things... Well, you can simplify in just that statement, but is not complicating things like you mention. Or at least I'm under the impresion that your usage is not what the tool was meant for. > i guess it's a nice tool to create gems which run on both, Unix and Windows and you don't want to take care of the whole toolchain (binutils, gcc, ld, ...) yourself. with the OpenWRT build-system I do have a nice tool to take care of all the non-ruby-specific parts of cross-compiling. I modified it to include a host-version of ruby having the same version as used on the target. Then if you're cross-compiling successfully your tools are looking for headers in the wrong place? > i'll revert back to rather not use rake-compiler and please, somebody tell me how to supply a DESTDIR to mkmf.rb... :) cd /target/directory ruby ../source/directory/with/extconf.rb --options-here make The output results is stored there (the binary shared object). -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-ExupñÓy