Zenshai has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I've got a problem that's been driving me crazy. I am trying to build Thread::Tie on a Windows box running ActivePerl 5.8.8 (MSWin32-x86-multi-thread). This box is unable to go online and access cpan so im building from the .tar.gz with nmake. I've built the dependency with no problem, but this one just wont go no matter what I try.

Heres the error I get when doing '>nmake test':
D:\Perl\Thread-Tie-0.12>nmake test Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. D:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harn +ess(0, 'bl ib\lib', 'blib\arch')" t/*.t t/Tie01....ok 1/71Thread 1 terminated abnormally: Can't locate .pm in +@INC (@INC contains: D:\Perl\Thread-Tie-0.12\blib\lib D:\Perl\Thread-Tie-0.12\bl +ib\arch D: /Perl/site/lib D:/Perl/lib/MSWin32-x86-multi-thread D:/Perl/lib/MSWin3 +2-x86-mult i-thread D:/Perl/lib . D:/Perl/site/lib D:/Perl/lib/MSWin32-x86-multi- +thread D:/ Perl/lib .) at D:\Perl\Thread-Tie-0.12\blib\lib/Thread/Tie/Thread.pm ( +loaded on demand from offset 8952 for 426 bytes) line 333.
(then it hangs until i give it a SIGINT(2))

Very much like this Build Status page I found. The only difference is that they are using an older version of perl that shouldn't even have support for threads. On the other hand, this build passes.

Needless to say I am thoroughly confused. Is my perl lying about its version? or is there another problem.

I really appreciate any help you may be able to provide.

Thanks,
- Zen

Replies are listed 'Best First'.
Re: Trouble building Thread::Tie module on Win32
by syphilis (Archbishop) on Aug 13, 2008 at 14:10 UTC
    You should use the MinGW compiler with your ActivePerl-5.8.8. The results are much better:
    t/Tie01....ok 1/71 t/Tie01....NOK 21/71# Failed test 'check array fetch' # at t/Tie01.t line 73. # got: '2 b' # expected: 'a b c d e f g h i' # Failed test 'check array fetch' t/Tie01....NOK 24/71# at t/Tie01.t line 82. # got: '2 e' # expected: 'd e f d e f g h i' t/Tie01....NOK 48/71# Failed test 'check hash keys' # at t/Tie01.t line 134. # got: '3abc' # expected: 'abc' # Failed test 'unlink testfile' t/Tie01....NOK 65/71# at t/Tie01.t line 179. # Looks like you failed 4 tests of 71. t/Tie01....dubious Test returned status 4 (wstat 1024, 0x400) DIED. FAILED tests 21, 24, 48, 65 Failed 4/71 tests, 94.37% okay t/Tie02....ok 1/26Thread 1 terminated abnormally: Can't use an undefin +ed value as an ARRAY reference at C:\_32\comp\Thread-Tie-0.12\blib\li +b/Thread/Tie/Array.pm (loaded on demand from offset 1939 for 176 bytes) line 75.
    at which point it hangs.

    :-)

    Cheers,
    Rob
      Thanks for your reply,

      Unfortunately recompiling Perl is not really an option. (That is what you're suggesting right?)

      I did try the MinGW GNU make, and it produced the same results as my original post.

      Anyone know anything else I can do here? Or perhaps some other module I can use instead of Thread::Pool (Thread::Tie is a dependency) for threads that work concurrently?
Re: Trouble building Thread::Tie module on Win32
by BrowserUk (Patriarch) on Aug 13, 2008 at 19:00 UTC
      Thanks BrowserUk, that module worked brilliantly.