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

  • Thread starter Wolfgang Nádasi-Donner
  • Start date
W

Wolfgang Nádasi-Donner

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
 
W

Wolfgang Nádasi-Donner

Wolfgang said:
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
 
W

Wolfgang Nádasi-Donner

Wolfgang said:
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):
$ ./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", "."]
Can anybody give an explanation what happend here? - I have no idea at all.

Wolfgang Nádasi-Donner
 
W

Wolfgang Nádasi-Donner

Wolfgang said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top