From: Gordon Thiesfeld Date: 2011-02-02T02:52:18+09:00 Subject: Re: mkmf-bug under mingw without msys On Tue, Feb 1, 2011 at 10:31 AM, Marcel O. wrote: > Luis Lavena wrote in post #978878: >> On Feb 1, 7:47am, "Marcel O." wrote: >>> Hi, >>> >>> I have a problem building an extension with mkmf under windows which >>> seems to me as a bug: I want to build the extension in an mingw >>> environment WITHOUT msys, but mkmf contains code that if it runs in an >>> mingw environment makes the incorrect assumption it runs under msys and >>> needs an appropriate path conversion: >>> >> >> You can build ruby without msys, but then you will have problems about >> dependencies like bison, sed, sh and others that Ruby is expecting. >> > > I don't have such dependencies. If I manually change the path in the > generated Makefile, I can compile and link and everything works > perfectly. > >> Can I know the reason of your need? RubyInstaller has been built with >> MinGW+MSYS and both have been packaged conveniently as 'DevKit' for >> it's transparent usage under Ruby for Windows: >> >> http://github.com/oneclick/rubyinstaller/wiki/Development-Kit > > I know of the DevKit (and use it, too). The reasons are more for > convenience purposes: For the deployment of the extension as a gem, the > DevKit will be our way to go, but for the integration in our build > process (using CMake), during which we use the extension, it would be > easier to use the extension directly (without a gem). So I tried to > implement it that way, and the only obstacle I had, does IMO base on an > obvious misconception in the mkmf code: MinGW implies MSYS; although > this is the normal case under windows due to the DevKit. > > I made a proposal to use the OS_TYPE environment variable, but I don't > know if this will work on all systems. If no one can tell if this would > work and no one else is interested in fixing this and supporting the > MinGW-only use case, I must try to integrate the DevKit in our build > environment. In this case: Would it be possible to integrate DevKit's > MinGW+MSYS environment without the involvement of RubyGems. > You can require the devkit without rubygems. ruby -rdevkit extconf.rb > Kind regards > Marcel > > -- > Posted via http://www.ruby-forum.com/. > > -- Gordon Thiesfeld http://vert.igino.us