Skip to content

Instantly share code, notes, and snippets.

@shirosaki
Created September 12, 2012 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirosaki/3705031 to your computer and use it in GitHub Desktop.
Save shirosaki/3705031 to your computer and use it in GitHub Desktop.
mingw-w64 ruby trunk on Windows XP 32bit

Ruby trunk on Windows XP 32bit

ruby 2.0.0dev (2012-09-11 trunk 36949) [i386-mingw32]

gcc version 4.6.3 (rubenvb-4.6.3)

make test passed.

$ make test-all TESTS="-q -j3"

(snip)

[ 488/1399] TestFile#test_truncate_beyond_eoffreespace 917235822592
 = 0.02 s
  1) Failure:
test_truncate_beyond_eof(TestFile) [c:/devruby/ruby/test/ruby/test_file.rb:120]:

[ruby-dev:24532].
<"\x00\x00\x00\x00\x00\x00\x00"> expected but was
<nil>.

[ 490/1399] TestFile#test_truncate_wbuf = 0.02 s
  2) Failure:
test_truncate_wbuf(TestFile) [c:/devruby/ruby/test/ruby/test_file.rb:100]:
[ruby-dev:24191].
<"\x00\x00\x00def"> expected but was
<"def">.

[ 594/1399] TestFileExhaustive#test_truncatefreespace 917235830784
[ 903/1399] TestRequire#test_require_with_unc = 5.56 s
  3) Failure:
test_require_with_unc(TestRequire) [c:/devruby/ruby/test/ruby/test_require.rb:10
5]:
Failed assertion, no message given.

[1215/1399] TestGemInstaller#test_generate_bin_bindir_with_user_install
  4) Failure:
test_generate_bin_bindir_with_user_install_warning(TestGemInstaller) [c:/devruby
/ruby/test/rubygems/test_gem_installer.rb:247]:
--- expected
+++ actual
@@ -1 +1,3 @@
-""
+"WARNING:  You don't have C:\\WINDOWS in your PATH,
+\t  gem executables will not run.
+"


[1358/1399] TestQueue#test_thr_kill = 20.06 s
  5) Error:
test_thr_kill(TestQueue):
Errno::EACCES: Permission denied - C:/DOCUME~1/H83DD~1.SHI/LOCALS~1/Temp/d201209
12-3356-1tse0hi
    c:/devruby/ruby/lib/fileutils.rb:1489:in `rmdir'
    c:/devruby/ruby/lib/fileutils.rb:1489:in `block in remove_dir1'
    c:/devruby/ruby/lib/fileutils.rb:1503:in `platform_support'
    c:/devruby/ruby/lib/fileutils.rb:1490:in `remove_dir1'
    c:/devruby/ruby/lib/fileutils.rb:1481:in `remove'
    c:/devruby/ruby/lib/fileutils.rb:837:in `block in remove_entry'
    c:/devruby/ruby/lib/fileutils.rb:1537:in `postorder_traverse'
    c:/devruby/ruby/lib/fileutils.rb:835:in `remove_entry'
    c:/devruby/ruby/lib/tmpdir.rb:94:in `ensure in mktmpdir'
    c:/devruby/ruby/lib/tmpdir.rb:94:in `mktmpdir'
    c:/devruby/ruby/test/thread/test_queue.rb:103:in `test_thr_kill'

Finished tests in 737.625000s, 15.0998 tests/s, 2612.1254 assertions/s.
11138 tests, 1926769 assertions, 4 failures, 1 errors, 83 skips

ruby -v: ruby 2.0.0dev (2012-09-11 trunk 36949) [i386-mingw32]
make: *** [yes-test-all] Error 5

gcc version 4.7.1 (rubenvb-4.7.1-2-release)

ld.exe crashed when linking msvcrt-ruby200.dll. ld.exe also crashed when building libyaml using knapsack recipe.

But build succeeded if removing -Wl,--out-implib=libmsvcrt-ruby200.dll.a of DLDFLAGS.

--out-implib seems not needed for gcc.

Links:

http://mingw.5.n7.nabble.com/What-does-Wl-out-implib-lib-lt-name-gt-dll-a-do-td3380.html

http://projects.scipy.org/numpy/wiki/MicrosoftToolchainSupport

Build error:

make all

(snip)

linking miniruby.exe
rbconfig.rb updated
generating enc.mk
generating msvcrt-ruby200.rc
compiling msvcrt-ruby200.res.o
compiling ../../../ruby/dln.c
compiling ../../../ruby/encoding.c
generating prelude.c
compiling prelude.c
linking static-library libmsvcrt-ruby200-static.a
verifying static-library libmsvcrt-ruby200-static.a
generating msvcrt-ruby200.def
linking shared-library msvcrt-ruby200.dll
collect2.exe: error: ld returned 5 exit status
make: *** [msvcrt-ruby200.dll] Error 1
rake aborted!
Command failed with status (2): [make  all...]

With removing -Wl,--out-implib=libmsvcrt-ruby200.dll.a of DLDFLAGS, build completed.

make test passed.

$ make test-all TESTS="-q -j3"

(snip)

[ 881/1338] TestRequire#test_require_with_unc = 5.50 s
  1) Failure:
test_require_with_unc(TestRequire) [c:/devruby/ruby/test/ruby/test_require.rb:10
5]:
Failed assertion, no message given.

[1163/1338] TestGemInstaller#test_generate_bin_bindir_with_user_install
  2) Failure:
test_generate_bin_bindir_with_user_install_warning(TestGemInstaller) [c:/devruby
/ruby/test/rubygems/test_gem_installer.rb:247]:
--- expected
+++ actual
@@ -1 +1,3 @@
-""
+"WARNING:  You don't have C:\\WINDOWS in your PATH,
+\t  gem executables will not run.
+"


[1297/1338] TestQueue#test_thr_kill = 20.05 s
  3) Error:
test_thr_kill(TestQueue):
Errno::EACCES: Permission denied - C:/DOCUME~1/H83DD~1.SHI/LOCALS~1/Temp/d201209
12-3260-fpl6qv
    c:/devruby/ruby/lib/fileutils.rb:1489:in `rmdir'
    c:/devruby/ruby/lib/fileutils.rb:1489:in `block in remove_dir1'
    c:/devruby/ruby/lib/fileutils.rb:1503:in `platform_support'
    c:/devruby/ruby/lib/fileutils.rb:1490:in `remove_dir1'
    c:/devruby/ruby/lib/fileutils.rb:1481:in `remove'
    c:/devruby/ruby/lib/fileutils.rb:837:in `block in remove_entry'
    c:/devruby/ruby/lib/fileutils.rb:1537:in `postorder_traverse'
    c:/devruby/ruby/lib/fileutils.rb:835:in `remove_entry'
    c:/devruby/ruby/lib/tmpdir.rb:94:in `ensure in mktmpdir'
    c:/devruby/ruby/lib/tmpdir.rb:94:in `mktmpdir'
    c:/devruby/ruby/test/thread/test_queue.rb:103:in `test_thr_kill'

Finished tests in 749.328125s, 15.0602 tests/s, 2586.5037 assertions/s.
11285 tests, 1938140 assertions, 2 failures, 1 errors, 83 skips

ruby -v: ruby 2.0.0dev (2012-09-11 trunk 36949) [i386-mingw32]
make: *** [yes-test-all] Error 3

gcc version 4.7.1 (MinGW-builds: http://sourceforge.net/projects/mingwbuilds/)

make test passed.

$ make test-all TESTS="-q -j3"
[ 127/1412] TestGDBM#test_s_open_error = 0.05 s
  1) Failure:
test_s_open_error(TestGDBM) [c:/devruby/ruby/test/gdbm/test_gdbm.rb:227]:
[Errno::EACCES, Errno::EWOULDBLOCK] exception expected, not
Class: <Errno::E10035>
Message: <"A non-blocking socket operation could not be completed immediately. -
 C:/DOCUME~1/H83DD~1.SHI/LOCALS~1/Temp/tmptest_gdbm20120912-2176-5dt485/tmptest_
gdbm_2176">
---Backtrace---
c:/devruby/ruby/test/gdbm/test_gdbm.rb:228:in `open'
c:/devruby/ruby/test/gdbm/test_gdbm.rb:228:in `block in test_s_open_error'
---------------

[ 920/1412] TestRequire#test_require_with_unc = 5.44 s
  2) Failure:
test_require_with_unc(TestRequire) [c:/devruby/ruby/test/ruby/test_require.rb:10
5]:
Failed assertion, no message given.

[ 949/1412] TestProcess#test_execopts_unsetenv_others = 0.06 s
  3) Failure:
test_execopts_unsetenv_others(TestProcess) [c:/devruby/ruby/test/ruby/test_proce
ss.rb:385]:
<"A=B\n"> expected but was
<"">.

[1016/1412] TestRubyOptions#test_search = 0.02 s
  4) Failure:
test_search(TestRubyOptions) [c:/devruby/ruby/test/ruby/test_rubyoptions.rb:277]
:
<["1"]> expected but was
<[]>.

[1187/1412] TestGemInstaller#test_generate_bin_bindir_with_user_install
  5) Failure:
test_generate_bin_bindir_with_user_install_warning(TestGemInstaller) [c:/devruby
/ruby/test/rubygems/test_gem_installer.rb:247]:
--- expected
+++ actual
@@ -1 +1,3 @@
-""
+"WARNING:  You don't have C:\\WINDOWS in your PATH,
+\t  gem executables will not run.
+"


[1273/1412] TestSocketAddrinfo#test_socket_connect_nonblock = 0.00 s
  6) Error:
test_socket_connect_nonblock(TestSocketAddrinfo):
Errno::EINVAL: Invalid argument - connect(2)
    c:/devruby/ruby/test/socket/test_addrinfo.rb:163:in `connect_nonblock'
    c:/devruby/ruby/test/socket/test_addrinfo.rb:163:in `rescue in test_socket_c
onnect_nonblock'
    c:/devruby/ruby/test/socket/test_addrinfo.rb:158:in `test_socket_connect_non
block'

[1371/1412] TestQueue#test_thr_kill = 20.05 s
  7) Error:
test_thr_kill(TestQueue):
Errno::EACCES: Permission denied - C:/DOCUME~1/H83DD~1.SHI/LOCALS~1/Temp/d201209
12-2176-g9g24s
    c:/devruby/ruby/lib/fileutils.rb:1489:in `rmdir'
    c:/devruby/ruby/lib/fileutils.rb:1489:in `block in remove_dir1'
    c:/devruby/ruby/lib/fileutils.rb:1503:in `platform_support'
    c:/devruby/ruby/lib/fileutils.rb:1490:in `remove_dir1'
    c:/devruby/ruby/lib/fileutils.rb:1481:in `remove'
    c:/devruby/ruby/lib/fileutils.rb:837:in `block in remove_entry'
    c:/devruby/ruby/lib/fileutils.rb:1537:in `postorder_traverse'
    c:/devruby/ruby/lib/fileutils.rb:835:in `remove_entry'
    c:/devruby/ruby/lib/tmpdir.rb:94:in `ensure in mktmpdir'
    c:/devruby/ruby/lib/tmpdir.rb:94:in `mktmpdir'
    c:/devruby/ruby/test/thread/test_queue.rb:103:in `test_thr_kill'

Finished tests in 797.453125s, 14.1463 tests/s, 2431.0031 assertions/s.
11281 tests, 1938611 assertions, 5 failures, 2 errors, 83 skips

ruby -v: ruby 2.0.0dev (2012-09-11 trunk 36949) [i386-mingw32]
make: *** [yes-test-all] Error 7
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index d0156fd..a477516 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -76,7 +76,7 @@ module DRbCore
while (@there.to_s rescue nil)
# nop
end
- signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM
+ signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM
Thread.list.each {|th|
if th.respond_to?(:pid) && th[:drb_service] == @service_name
begin
@@ -297,7 +297,7 @@ module DRbAry
while (@there.to_s rescue nil)
# nop
end
- signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM
+ signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM
Thread.list.each {|th|
if th.respond_to?(:pid) && th[:drb_service] == @service_name
begin
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index fc7bfa9..6a35ca2 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -88,11 +88,13 @@ class TestNetHTTP < Test::Unit::TestCase
end
def test_proxy_address
- http = Net::HTTP.new 'example', nil, 'proxy.example'
- assert_equal 'proxy.example', http.proxy_address
+ clean_http_proxy_env do
+ http = Net::HTTP.new 'example', nil, 'proxy.example'
+ assert_equal 'proxy.example', http.proxy_address
- http = Net::HTTP.new 'example', nil
- assert_equal nil, http.proxy_address
+ http = Net::HTTP.new 'example', nil
+ assert_equal nil, http.proxy_address
+ end
end
def test_proxy_address_ENV
@@ -137,13 +139,15 @@ class TestNetHTTP < Test::Unit::TestCase
end
def test_proxy_port
- http = Net::HTTP.new 'exmaple', nil, 'proxy.example'
- assert_equal 'proxy.example', http.proxy_address
- assert_equal 80, http.proxy_port
- http = Net::HTTP.new 'exmaple', nil, 'proxy.example', 8000
- assert_equal 8000, http.proxy_port
- http = Net::HTTP.new 'exmaple', nil
- assert_equal nil, http.proxy_port
+ clean_http_proxy_env do
+ http = Net::HTTP.new 'exmaple', nil, 'proxy.example'
+ assert_equal 'proxy.example', http.proxy_address
+ assert_equal 80, http.proxy_port
+ http = Net::HTTP.new 'exmaple', nil, 'proxy.example', 8000
+ assert_equal 8000, http.proxy_port
+ http = Net::HTTP.new 'exmaple', nil
+ assert_equal nil, http.proxy_port
+ end
end
def test_proxy_port_ENV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment