Compile 1.8.6-p110 under MinGW - test-all problems

Hello everybody,

I’m trying to bring up to date the build of Ruby for MinGW. Part of
this is that I found it performs better compiled with GCC than VC8
(Visual Studio 2005).

http://pastie.caboo.se/pastes/95210

I don’t want to start another big discussion about what compiler
performs better, but just to scratch my itch…

I searched the group and found that test-all fails on SOAP tests since
you need a previous installation of ruby to do the CGI stuff…

The thing is that even I have it installed and available on path
(after a make install) still get several failures and at least 50
errors.

Found that mix between msys don’t blend too well. test-all was trying
to run /usr/local/bin/ruby.exe with D:/path/to/lib/webrick/httpservlet/
cgi_runner.rb

that path mixture don’t work under MSYS.

I’ve narrow and didn’t get working just 3 failures:
http://pastie.caboo.se/101393

./miniruby.exe …/ruby-1.8.6-p110/runruby.rb --extout=.ext – “…/
ruby-1.8.6-p110/test/runner.rb” --basedir="…/ruby-1.8.6-p110/test" –
runner=console
Loaded suite .
Started
[lots of stripped dots]
Finished in 81.438 seconds.

  1. Failure:
    test_del_trailing_separator_25(TestPathname) […/ruby-1.8.6-p110/test/
    pathname/test_pathname.rb:27]:
    del_trailing_separator("\225\\").
    <"\225\"> expected but was
    <"\225">.

  2. Failure:
    test_should_propagate_signaled(TestBeginEndBlock) […/ruby-1.8.6-p110/
    test/ruby/test_beginendblock.rb:83]:
    expected but was
    <3>.

  3. Failure:
    test_cgi(TestWEBrickCGI)
    […/ruby-1.8.6-p110/test/webrick/test_cgi.rb:27:in test_cgi' D:/Users/Developer/code/msys-src/ruby-1.8.6-p110/lib/net/http.rb: 1050:inrequest’
    D:/Users/Developer/code/msys-src/ruby-1.8.6-p110/lib/net/http.rb:
    2133:in reading_body' D:/Users/Developer/code/msys-src/ruby-1.8.6-p110/lib/net/http.rb: 1049:inrequest’
    D:/Users/Developer/code/msys-src/ruby-1.8.6-p110/lib/net/http.rb:
    1034:in request' D:/Users/Developer/code/msys-src/ruby-1.8.6-p110/lib/net/http.rb: 543:instart’
    D:/Users/Developer/code/msys-src/ruby-1.8.6-p110/lib/net/http.rb:
    1032:in request' ../ruby-1.8.6-p110/test/webrick/test_cgi.rb:27:intest_cgi’
    …/ruby-1.8.6-p110/test/webrick/utils.rb:26:in call' ../ruby-1.8.6-p110/test/webrick/utils.rb:26:instart_server’
    …/ruby-1.8.6-p110/test/webrick/utils.rb:34:in start_httpserver' ../ruby-1.8.6-p110/test/webrick/test_cgi.rb:24:intest_cgi’]:
    <"/webrick.cgi"> expected but was
    <"\n\n

Internal Server Error\n \n

Internal Server Error

\n Premature end of script headers: D:/Users/Developer/code/msys-src/ruby-1.8.6-p110/test/webrick/ webrick.cgi\n
\n \n WEBrick/1.3.1 (Ruby/ 1.8.6/2007-09-23) at\n 127.0.0.1:4190\n \n \n\n">.

1467 tests, 13738 assertions, 3 failures, 0 errors

===

Is this right?, anyone can confirm/deny, point me in the right
direction?

I’m trying to solve these issues to jump to the next step: fulfill the
extensions dependencies.

Thanks anyone for their time.

Regards,

Luis

Hi,

At Fri, 28 Sep 2007 00:04:12 +0900,
Luis L. wrote in [ruby-talk:271285]:

  1. Failure:
    test_del_trailing_separator_25(TestPathname) […/ruby-1.8.6-p110/test/
    pathname/test_pathname.rb:27]:
    del_trailing_separator("\225\\").
    <"\225\"> expected but was
    <"\225">.

It’s valid only on Japanese version system.

  1. Failure:
    test_should_propagate_signaled(TestBeginEndBlock) […/ruby-1.8.6-p110/
    test/ruby/test_beginendblock.rb:83]:
    expected but was
    <3>.

Windows doesn’t have signal mechanism, so the test should be
skipped.

Nobuyoshi N. wrote:

[…]

It’s valid only on Japanese version system.

  1. Failure:
    test_should_propagate_signaled(TestBeginEndBlock) […/ruby-1.8.6-p110/
    test/ruby/test_beginendblock.rb:83]:
    expected but was
    <3>.

Windows doesn’t have signal mechanism, so the test should be
skipped.

So I must ignore these failures and take p110 with 0 failures?.

That’s great news, now I could invest some time on getting the
dependencies and extensions builds.

Thank you Nobu for your time.

Luis

Luis L. wrote:

Hello everybody,

I’m trying to bring up to date the build of Ruby for MinGW. Part of
this is that I found it performs better compiled with GCC than VC8
(Visual Studio 2005).

Detailed descriptions on how it ended up working would be nice (how to
compile it). Thanks!

Hi,

At Fri, 28 Sep 2007 15:49:55 +0900,
Luis L. wrote in [ruby-talk:271411]:

So I must ignore these failures and take p110 with 0 failures?.

It’s OK.

My question is with minGW compilation–how do you create the zlib .so
file, especially after you’ve already compiled everything else (and I do
have the zlib libraries also compiled with mingw)?
there is this ext/zlib/extconf.rb file, but it doesn’t seem to do
anything. Any thoughts? Trying to put together a minGW release, for
fun :slight_smile:
Take care.
-Roger

Roger P. wrote:

My question is with minGW compilation–how do you create the zlib .so
file, especially after you’ve already compiled everything else (and I do
have the zlib libraries also compiled with mingw)?
there is this ext/zlib/extconf.rb file, but it doesn’t seem to do
anything. Any thoughts? Trying to put together a minGW release, for
fun :slight_smile:
Take care.
-Roger

Roger, I used MinGW candidate using the Automated MinGW Installer:

http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780

Only installed the C compiler (do not install make since will clash and
do weird things).

Installed MSYS-1.0.10 and MSYS DTK.

Then I followed the steps to install MinGWports and installed as ports
readline and zlib

(Zlib is official, readline is a patch in the tracket at sourceforge).

I unzipped the ruby package and run inside a MSYS console:

./configure --with-winsock2
make

At this point you should check the output for ‘compiling readline’
‘compiling zlib’ etc… and see if everything worked.

make check (to run tests)
make install

That will create bin/lib/man/share in the root of your drive (thats
because generated make file isn’t compatible with MSYS).

You should have there a working implementation.

zlib.dll will be located at you MinGW bin folder, which is where
MinGWport install it.

The same for readline.

Write this mail from memory took me a few minutes, but compile with VC8
(replying your other mail) is more complex.

I could give you a full checkout of my own repo where I was hacking
this.

Contact me off the list if you’re interested.

Regards and hope this help,

Luis

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs