Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Problems to Compile Ruby19 using MSYS and MinGW on Windows for Ruby19Snapshots starting 2007

Reply
Thread Tools

Problems to Compile Ruby19 using MSYS and MinGW on Windows for Ruby19Snapshots starting 2007

 
 
Wolfgang Nádasi-Donner
Guest
Posts: n/a
 
      04-29-2007
Dear Rubyists!

I cannot create Ruby 1.9 on Windows for snapshots starting January 2007. For
older snapshots I have a working envoironment and procedure. First I recognized,
that for newer snapshots a Ruby installation is necessary. After some
discussions and help proposals in the german ruby forum I came up to a modified
version with old toolchain, because the newer tools failed with severe problems.

In Detail - I set up the Environment in the following way:

* MinGW-3.1.0-1.exe to "F:\MinGW"
* MSYS-1.0.11-2004.04.30-1.exe to "F:\msys"
* msysDTK-1.0.1.exe to "F:\msys"
* bison-2.0-MSYS.tar.gz, msys-autoconf-2.59.tar.bz2,msys-automake-1.8.2.tar.bz2
to "F:\msys" copied
* start "MSYS prompt" for following commands:
o cd /
o tar -jxf msys-automake-1.8.2.tar.bz2
o tar -jxf msys-autoconf-2.59.tar.bz2
o tar -zxf bison-2.0-MSYS.tar.gz
* extract "ruby-1.8.6-i386-mswin32.zip" to "F:\msys\home\wolfgang\ruby-1.8.6"

This was done without any problem. afterwards I tried to build an experimental
Ruby 1.9 version using the following initial sequence:

* Copy actual Ruby snapshot "snapshot.tar.gz" to "F:\msys\home\wolfgang"
* start "MSYS prompt" for following commands:
o tar xzvf snapshot.tar.gz
o cd ruby
o If there is no "configure", or "configure" is older than "configure.in":
-> autoconf
o mkdir build
o cd build
o ../configure --with-baseruby=/home/wolfgang/ruby-1.8.6/bin/ruby.exe
--prefix=/ruby19 --program-suffix=19
o make

During execution of "make" the following error occurs:

.... several lines ...
gcc -g -O2 -I. -I.. -DRUBY_EXPORT -c ../main.c
gcc -g -O2 -I. -I.. -DRUBY_EXPORT -c ../dmydln.c
gcc -g -O2 -L. -Wl,--stack,0x00200000 main.o dmydln.o
libmsvcrt-ruby1919-static.a -lshell32 -lws2_32 -o miniruby.exe
.../mkconfig.rb:7:in `method_missing': undefined method `dirname' for
false:FalseClass (NoMethodError)
from ../mkconfig.rb:7:in `<main>'
make: *** [.rbconfig.time] Error 1

The file "mkconf.rb" contains at the beginning:

#!./miniruby -s

# avoid warnings with -d.
$install_name ||= nil
$so_name ||= nil

srcdir = File.dirname(__FILE__) # <= Line 7 !
$:.replace [srcdir+"/lib", "."]

So - this means, because "File" belongs to class "FalseClass", it has the value
"false".

What happend there???????

Wolfgang Nádasi-Donner
 
Reply With Quote
 
 
 
 
Wolfgang Nádasi-Donner
Guest
Posts: n/a
 
      05-01-2007
Wolfgang Nádasi-Donner schrieb:
> I cannot create Ruby 1.9 on Windows for snapshots starting January 2007.
> ...
> In Detail - I set up the Environment in the following way:
> ...


In the meantime other person from german tested the Environment successfully
with stable snapshots.

Has someone an idea what happens there?

Wolfgang Nádasi-Donner
 
Reply With Quote
 
 
 
 
Wolfgang Nádasi-Donner
Guest
Posts: n/a
 
      05-01-2007
Wolfgang Nádasi-Donner schrieb:
> false:FalseClass (NoMethodError)
> from ../mkconfig.rb:7:in `<main>'
> make: *** [.rbconfig.time] Error 1
>
> The file "mkconf.rb" contains at the beginning:
>
> #!./miniruby -s
>
> # avoid warnings with -d.
> $install_name ||= nil
> $so_name ||= nil
>
> srcdir = File.dirname(__FILE__) # <= Line 7 !
> $:.replace [srcdir+"/lib", "."]


I've inserted some test outputs into "rbconfig.rb" an made some tests. Finally I
came to a session in a MSYS shell window with the following contents (I marked
my input in the following text with "##### <= my input #####" for better
readability):

>>>>>>>>>> Listing >>>>>>>>>>

$ ./make-errpart ##### <= my input #####
"false"
Class
[File, IO, File::Constants, Enumerable, Object, Kernel, BasicObject]
F:/msys/home/wolfgang/ruby/lib/fileutils.rb:1075:in `include': wrong argument
type false (expected Module) (TypeError)
from F:/msys/home/wolfgang/ruby/lib/fileutils.rb:1075:in
`<module:FileUtils>'
from F:/msys/home/wolfgang/ruby/lib/fileutils.rb:85:in `<top (required)>'
from ../mkconfig.rb:12:in `require'
from ../mkconfig.rb:12:in `<main>'

wolfgang@TESTSPATZ ~/ruby/build
$ cat filetest.rb ##### <= my input #####
#!./miniruby -s
p File.to_s
p File.class
p File.ancestors

wolfgang@TESTSPATZ ~/ruby/build
$ ./miniruby filetest.rb ##### <= my input #####
"File"
Class
[File, IO, File::Constants, Enumerable, Object, Kernel, BasicObject]

wolfgang@TESTSPATZ ~/ruby/build
$ head ../mkconfig.rb ##### <= my input #####
#!./miniruby -s

# avoid warnings with -d.
$install_name ||= nil
$so_name ||= nil
p File.to_s
p File.class
p File.ancestors
srcdir = File.dirname(__FILE__)
$:.replace [srcdir+"/lib", "."]
>>>>>>>>>> End of Listing >>>>>>>>>>


Can anybody give an explanation what happend here? - I have no idea at all.

Wolfgang Nádasi-Donner
 
Reply With Quote
 
Wolfgang Nádasi-Donner
Guest
Posts: n/a
 
      05-04-2007
Wolfgang Nádasi-Donner schrieb:
> I cannot create Ruby 1.9 on Windows for snapshots starting January 2007.
> For older snapshots I have a working envoironment and procedure...



I tried it again today - and it works )

The snapshot I used is from yesterday and the MSYS/MinGW environment is not the
newest one. I deleted the "win32ole" subdirectory before I started (there were
several Problems related to it in the past).

I don't know if changes in the snapshot or changes of the environment made the
difference, but now it works.

Here are the detailed steps for your information:

* MinGW-5.0.2.exe installed
* MSYS-1.0.10.exe installed
* msysDTK-1.0.1.exe installed
* bison-2.0-MSYS.tar.gz, msys-autoconf-2.59.tar.bz2, and
msys-automake-1.8.2.tar.bz2 copied to the "msys" directory
* start MSYS Prompt:
o cd /
o tar -jxf msys-automake-1.8.2.tar.bz2
o tar -jxf msys-autoconf-2.59.tar.bz2
o tar -zxf bison-2.0-MSYS.tar.gz
* ruby-1.8.6-i386-mswin32.zip to users home extracted
* actual Ruby snapshot snapshot.tar.gz copied to users home
* start MSYS Prompt:
o tar xzvf snapshot.tar.gz
* directory \home\<user>\ruby\ext\win32ole deleted.
* start MSYS Prompt:
o cd ruby
o autoconf
o mkdir build
o cd build
o ../configure --with-baseruby=/home/wolfgang/ruby-1.8.6/bin/ruby.exe
--prefix=/ruby19 --program-suffix=19
o make
o make test (several errors)
o make install-nodoc (problems with 128 MB to generate doc)

Wolfgang Nádasi-Donner
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mkmf-bug under mingw without msys Marcel O. Ruby 4 02-07-2011 09:18 PM
Windows GCC Support (Mingw & Mingw-w64) xeno fears Python 1 10-04-2009 06:40 PM
Install GSL\Ruby 1.8.3 with Mingw/MSYS at Windows failed? Jianhong.Wang@gmail.com Ruby 1 10-19-2006 04:58 AM
OT: Installing MySQL with MSYS/MINGW Bushido Hacks Perl Misc 8 04-26-2005 07:03 PM
Ruby 1.9 on XP using mingw/msys Kaspar Schiess Ruby 0 08-18-2004 07:41 AM



Advertisments