Subject: | t/02-xsdynamic.t fails on Cygwin without libnsl-devel package |
$ env LANG=C prove -bvl t/02-xsdynamic.t
t/02-xsdynamic.t ..
1..72
ok 1 - setup basic
ok 2 - chdir'd to XS-Testbasic
ok 3 - Makefile.PL exited with zero
not ok 4 - "make" exited normally
ok 5 # skip Make failed - skipping test
# Failed test '"make" exited normally'
# at lib/MakeMaker/Test/Setup/XS.pm line 448.
# got: '512'
# expected: '0'
# cp lib/XS/Test.pm blib/lib/XS/Test.pm
# Running Mkbootstrap for Test ()
# chmod 644 "Test.bs"
# "/usr/bin/perl" -w -MExtUtils::Command::MM -e 'cp_nonempty' -- Test.bs blib/arch/auto/XS/Test/Test.bs 644
# "/usr/bin/perl" -w "/usr/share/perl5/5.30/ExtUtils/xsubpp" -typemap '/usr/share/perl5/5.30/ExtUtils/typemap' -typemap '/home/tzccinct/.cpan/build/ExtUtils-MakeMaker-7.56-2/t/XS-Testbasic/type map' Test.xs > Test.xsc
# mv Test.xsc Test.c
# gcc -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -ggdb -O2 -pipe -Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/mnt/share/cygpkgs/perl/perl.x86_64/build=/usr/src/debug/perl-5.30.3-1 -fdebug-prefix-map=/mnt/share/cygpkgs/perl/perl.x86_64/src/perl-5.30.3=/usr/src/debug/perl-5.30.3-1 -fwrapv -fno-strict-aliasing -DUSEIMPORTLIB -O3 -DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" "-I/usr/lib/perl5/5.30/x86_64-cygwin-threads/CORE" Test.c
# rm -f blib/arch/auto/XS/Test/Test.dll
# g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong Test.o -o blib/arch/auto/XS/Test/Test.dll \
# /usr/lib/perl5/5.30/x86_64-cygwin-threads/CORE/cygperl5_30.dll -lpthread -lnsl -ldl -lcrypt \
#
# /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lnsl
# collect2: error: ld returned 1 exit status
# make: *** [Makefile:471: blib/arch/auto/XS/Test/Test.dll] Error 1
ok 6 - teardown XS-Testbasic
(...snip... the same kind of errors occur)
ok 72 - teardown XS-Testsubdirsskip
# Looks like you failed 12 tests of 72.
Dubious, test returned 12 (wstat 3072, 0xc00)
Failed 12/72 subtests
(less 10 skipped subtests: 50 okay)
Test Summary Report
-------------------
t/02-xsdynamic.t (Wstat: 3072 Tests: 72 Failed: 12)
Failed tests: 4, 10, 16, 22, 28, 35, 40, 46, 53, 58, 64
70
Non-zero exit status: 12
Files=1, Tests=72, 56 wallclock secs ( 0.03 usr 0.05 sys + 23.18 cusr 26.10 csys = 49.36 CPU)
Result: FAIL
This issue has occurred from ExtUtils-MakeMaker 7.46 by the following change:
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/353
I have not installed libnsl-devel Cygwin package because I am not going to develop anything to use libnsl-devel (e.g. building perl with gcc on Cygwin). It would be good if the test passes without installing libnsl-devel package as before.