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

Discussion in 'Ruby' started by Wolfgang Nádasi-Donner, Apr 29, 2007.

  1. 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
     
    Wolfgang Nádasi-Donner, Apr 29, 2007
    #1
    1. Advertising

  2. Re: Problems to Compile Ruby19 using MSYS and MinGW on Windows forRuby19 Snapshots starting 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
     
    Wolfgang Nádasi-Donner, May 1, 2007
    #2
    1. Advertising

  3. Re: Problems to Compile Ruby19 using MSYS and MinGW on Windows forRuby19 Snapshots starting 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
     
    Wolfgang Nádasi-Donner, May 1, 2007
    #3
  4. Re: Problems to Compile Ruby19 using MSYS and MinGW on Windows forRuby19 Snapshots starting 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
     
    Wolfgang Nádasi-Donner, May 4, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. xeno fears
    Replies:
    1
    Views:
    525
    Martin v. Löwis
    Oct 4, 2009
  2. Kaspar Schiess

    Ruby 1.9 on XP using mingw/msys

    Kaspar Schiess, Aug 18, 2004, in forum: Ruby
    Replies:
    0
    Views:
    168
    Kaspar Schiess
    Aug 18, 2004
  3. Replies:
    1
    Views:
    318
  4. Marcel O.

    mkmf-bug under mingw without msys

    Marcel O., Feb 1, 2011, in forum: Ruby
    Replies:
    4
    Views:
    163
    Marcel O.
    Feb 7, 2011
  5. Bushido Hacks

    OT: Installing MySQL with MSYS/MINGW

    Bushido Hacks, Apr 26, 2005, in forum: Perl Misc
    Replies:
    8
    Views:
    429
    Keith Keller
    Apr 26, 2005
Loading...

Share This Page