Installing gem - C compiler issues (Win32)

Hello,

I’ve wasted quite some time on it and ran out of ideas, so I’m going to
ask here.

I have Ruby installed by the One-Click Installer. That works great. Now,
I need to install ferret. So I go to the command line and type “gem
install ferret”. That’s where the hell begins.

I have MinGW and VC8 (so-called 2005), and the installer seems to be
using the latter. Initially I’m getting some errors caused by includes
not being reachable, but that can be solved by copying them from VC to
where the installer looks for them. After that, I get like 100 errors
that basically look like compatibility issues…

Is it possible to make gem (ruby? rake?) use MinGW? Is it possible to
“manually” compile the C extensions with MinGW and then make gem use
them? Finally, is it possible to make it work with VC8?

(Ferret wiki says it needs VC6 which I don’t have)

Simply speaking - how to make it work?

Regards,
Konrad G.

On Wed, 4 Apr 2007, Konrad G. wrote:

using the latter. Initially I’m getting some errors caused by includes
Simply speaking - how to make it work?

  1. compile ruby under mingw
  2. compile ferret or any libs you need under mingw
  3. install any gem using the mingw ruby
  4. manually copy libs into one-click-installer space or, alternatively,
    bundle
    it up as a pre-compile gem.

i’ve done exactly this for the gsl and narray packages here

http://codeforpeople.com/lib/ruby/rb-gsl-win/rb-gsl-1.7.0/

in each case i solved #4 (getting from mingw compiled binaries into
one-click-installer space) by writing a tiny installer. for example

http://codeforpeople.com/lib/ruby/rb-gsl-win/rb-gsl-1.7.0/install.rb

which you’d run using the one-click-installer ruby

make sense?

-a

Thank you, I appreciate your help.

I’ll give it a try, though it’s much more work than I thought it’d need
(the bad thing is I need it on Windows).

Konrad

On 4/3/07, Konrad G. [email protected] wrote:

I have MinGW and VC8 (so-called 2005), and the installer seems to be
using the latter.

It is not. It is using VC6. There’s a difference, and you CANNOT
safely use VC8 with most libraries.

-austin

Thank you guys!

Using cygwin, I managed to compile ruby from sources and then install
ferret. My target was allinoneruby, and I failed to include it in the
package. But it should be fine for now to have it beside
allinoneruby.exe as long as it does the job.

On Apr 3, 4:52 pm, Konrad G. [email protected] wrote:

Thank you, I appreciate your help.

I’ll give it a try, though it’s much more work than I thought it’d need
(the bad thing is I need it on Windows).

Konrad


Posted viahttp://www.ruby-forum.com/.

I’ve been in a similar situation before. When Ruby is compiled, it
records many of the compilation settings into a configuration file at
$RUBY_HOME/lib/ruby/i386-mswin32/rbconfig.rb, where $RUBY_HOME is the
Ruby installation directory and i386-mswin32 is your architecture.
When an extension is built, the generated Makefile uses all of these
settings. You can (carefully, backing up the original) edit settings
here to use the compiler, linker, and command-line options of your
choice for all of your gems.

Just be aware that the file will be blown away any time you re-install
or re-build Ruby (although in the latter case, you’d want to use the
new configuration it generates anyway).

On Wed, 4 Apr 2007, Konrad G. wrote:

Thank you guys!

Using cygwin, I managed to compile ruby from sources and then install
ferret. My target was allinoneruby, and I failed to include it in the
package. But it should be fine for now to have it beside
allinoneruby.exe as long as it does the job.

fwiw it’s worth binaries created under mingw, iff possible, will be much
smaller!

-a

fwiw it’s worth binaries created under mingw, iff possible, will be much
smaller!

How do I ./configure with MinGW?

On Wed, 4 Apr 2007, Konrad G. wrote:

fwiw it’s worth binaries created under mingw, iff possible, will be much
smaller!

How do I ./configure with MinGW?

when you install mingw/msys this is precisely what you are installing:
the
minimal set of tools required to type

./configure && make && make install

-a

On Apr 3, 2007, at 15:13 , Austin Z. wrote:

On 4/3/07, Konrad G. [email protected] wrote:

I have MinGW and VC8 (so-called 2005), and the installer seems to be
using the latter.

It is not. It is using VC6. There’s a difference, and you CANNOT
safely use VC8 with most libraries.

Austin, what is the current state of things in this land??

I periodically get bugs against image_science and parsetree from
windows users and I don’t know what to tell them other than “things
suck right now for windows devs”. Is there a place I could send them?