Roger Pack
2009-Sep-22 15:54 UTC
[Rubyinstaller-devel] cross compiler compatibility thought
Had a thought about the whole "msvc versus mingw binaries compatible" thing... The major rules seem to be: * If you call ALLOC or ALLOC_N, use xfree and not free * Don''t call sprintf or printf in an extension, instead use rb_f_sprintf/rb_vsprintf/rb_io_printf So my question is...can you define free to be xfree automatically, and not require any changes? like #define free(x) xfree(x) ? Thanks. -r
Luis Lavena
2009-Sep-22 22:24 UTC
[Rubyinstaller-devel] cross compiler compatibility thought
On Tue, Sep 22, 2009 at 5:54 PM, Roger Pack <rogerdpack at gmail.com> wrote:> Had a thought about the whole "msvc versus mingw binaries compatible" thing... > > The major rules seem to be: > > * If you call ALLOC or ALLOC_N, use xfree and not free > * Don''t call sprintf or printf in an extension, instead use > rb_f_sprintf/rb_vsprintf/rb_io_printf >Good practices, lot of libraries don''t follow that.> So my question is...can you define free to be xfree automatically, and > not require any changes? > like > #define free(x) xfree(x) > ?Not this topic again... please. There are other stuff like errno that cannot be shared or redefined. We had this conversation back in 2006, 2007, 2008 and beginning of this year at Ruby-core. Also, Ruby-core is not going to allow that change, simply because it is intrusive into the CRT definitions. Cheers, -- 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?ry
Mikael Rudberg
2009-Sep-30 11:44 UTC
[Rubyinstaller-devel] Installing libxml-ruby gem on mingw32
Hi Sorry if this is a bit of-topic for the actual installer. I wondered if anyone managed to get the libxml-ruby gem to compile on the mingw32 version of ruby and if so how to go by doing it? I''ve managed to get the compile a lot of gems with native extensions but libxml-ruby is complaining when i run "gem install libxml-ruby" i get "extconf failure: need zlib" I use : rubyinstaller-1.8.6-p383-preview1 and devkit-3.4.5r3-20090411 Any suggestions are highly appreciated /Mikael <http://rubyforge.org/frs/download.php/62212/rubyinstaller-1.8.6-p383-preview2.exe>
Luis Lavena
2009-Sep-30 16:30 UTC
[Rubyinstaller-devel] Installing libxml-ruby gem on mingw32
On Wed, Sep 30, 2009 at 1:44 PM, Mikael Rudberg <mikael at iced.se> wrote:> Hi > > Sorry if this is a bit of-topic for the actual installer. I wondered if > anyone managed to get the libxml-ruby gem to compile on the mingw32 version > of ruby and if so how to go by doing it? > > I''ve managed to get the compile a lot of gems with native extensions but > libxml-ruby is complaining when i run "gem install libxml-ruby" i get > "extconf failure: need zlib" > > I use : rubyinstaller-1.8.6-p383-preview1 and devkit-3.4.5r3-20090411 > > Any suggestions are highly appreciated >libxml-ruby needs access to zlib headers and libraries to properly compile. I''m not sure how that library has been built, but if this is the library from Aaron Patterson, you could ping him and request a mingw32 version, since he is using rake-compiler to generate the mswin32 version of it. Regards, -- 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?ry