# Compile 1.8.6-p110 under MinGW - test-all problems

**URL:** <https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684>\
**Category:** Ruby\
**Created:** [September 27, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684 "2007-09-27T17:04:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 27, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684/1 "2007-09-27T17:04:12Z")

</div>

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](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](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:in `request’  
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:in `request’  
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:in `start’  
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:in `test\_cgi’  
…/ruby-1.8.6-p110/test/webrick/utils.rb:26:in `call' ../ruby-1.8.6-p110/test/webrick/utils.rb:26:in `start\_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:in `test\_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

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 28, 2007, 8:44am UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684/2 "2007-09-28T08:44:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 28, 2007, 8:49am UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684/3 "2007-09-28T08:49:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [October 19, 2007, 7:39am UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684/4 "2007-10-19T07:39:42Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [September 28, 2007, 10:04am UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684/5 "2007-09-28T10:04:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [October 19, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684/6 "2007-10-19T12:54:18Z")

</div>

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 🙂  
Take care.  
-Roger

---

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [October 19, 2007, 9:39pm UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684/7 "2007-10-19T21:39:46Z")

</div>

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 🙂  
> Take care.  
> -Roger

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

> **[MinGW - Minimalist GNU for Windows - Browse /OldFiles at SourceForge.net](https://sourceforge.net/projects/mingw/files/OldFiles/)**
>
> A native Windows port of the GNU Compiler Collection (GCC)

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
