|Subject:||Running tests fails when installing modules in the CPAN shell if fork() isn't implemented|
I've just done two builds of perl-5.31.3: One with, and one without fork(). (Actually, fork() emulation, since I'm on Windows. The emulation requires three win32/Makefile options to be turned on when building perl: USE_MULTI, USE_ITHREADS and USE_IMP_SYS. They are all turned on by default. My non-fork() build was done by simply turning off USE_IMP_SYS, which is a thing I often do.) In each build I then tried to install Win32::Process using CPAN (version 2.27-TRIAL2, the version bundled with perl-5.31.3). Using the perl that has fork() this worked perfectly. Using the perl without fork() I got these errors from the end of running "install Win32::Process" in the CPAN shell: Running make test for JDB/Win32-Process-0.16.tar.gz Catching error: "The fork function is unimplemented at D:\\Dev\\Temp\\mp2\\perl-noimpsys\\lib/CPAN/Distribution.pm line 3757.\cJ" at D:/Dev/Temp/mp2/perl-noimpsys/lib/CPAN.pm line 397. CPAN::shell() called at D:/Dev/Temp/mp2/perl-noimpsys/lib/App/Cpan.pm line 416 App::Cpan::_process_options("App::Cpan") called at D:/Dev/Temp/mp2/perl-noimpsys/lib/App/Cpan.pm line 512 App::Cpan::run("App::Cpan") called at D:\Dev\Temp\mp2\perl-noimpsys\bin/cpan.bat line 31 It appears that the CPAN shell is making some use of fork() to run tests when installing a module, and fails if fork() is not implemented. I tried the usual "perl Makefile.PL && nmake && nmake test" mantra in a standard cmd.exe shell and all was well, so the above fork() trouble is definitely coming from CPAN, not from anything that Win32::Process's test suite is doing.