Hi all, just an FYI here: I have done a little bit of reading around regarding the issue of the PERL 5.24.1 testsuite failing in LFS 8.0. The issue (as the book states) is due to the system version of ZLib being used (v1.2.11) instead of the version that comes with PERL (v1.2.8). In the previous version of LFS this did not manifest itself as both the internal and system versions of ZLib were the same (v1.2.8).
The current failures seem to stem from a broken test suite (https://rt.cpan.org/Public/Bug/Display.html?id=120134) and a change in the ‘deflateParams’ function as a result of security updates in ZLib (https://rt.cpan.org/Public/Bug/Display.html?id=119762). Those pages also contain (upstream) patches to fix the issues (https://rt.cpan.org/Ticket/Attachment/1703491/914994/0001-Adapt-tests-to-zlib-1.2.11.patch and https://rt.cpan.org/Ticket/Attachment/1703463/914970/Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch). I have combined them into a single patch that can be applied from the PERL source directory during the §6 build with the usual ‘patch -Np1 -i …’ command. It is located at the foot of this message. One other cause of the tests failing was that the ZLib version (1.2.8) was hard-coded into ‘zlib.h’ in the PERL source. This can be fixed by issuing: sed -i 's/\(#define ZLIB_VERSION\) "1.2.8"/\1 "1.2.11"/' \ cpan/Compress-Raw-Zlib/zlib-src/zlib.h || build_error before running the configure script in PERL. (I should probably note here that I am not an LFS developer – use with caution and decide for yourself if you think it will be of use to you! The safest option, if there’s doubt, is to stick to the instructions in the LFS book). Hope this is of help/interest. → Mark perl-5.24.1-zlib_upversion_combined-1.patch: ————— diff -aur perl-5.24.1/cpan/Compress-Raw-Zlib/t/02zlib.t perl-5.24.1-new/cpan/Compress-Raw-Zlib/t/02zlib.t --- perl-5.24.1/cpan/Compress-Raw-Zlib/t/02zlib.t 2016-07-14 20:06:56.000000000 +0100 +++ perl-5.24.1-new/cpan/Compress-Raw-Zlib/t/02zlib.t 2017-04-07 21:38:43.168391495 +0100 @@ -24,13 +24,13 @@ my $count = 0 ; if ($] < 5.005) { - $count = 232 ; + $count = 236 ; } elsif ($] >= 5.006) { - $count = 317 ; + $count = 320 ; } else { - $count = 275 ; + $count = 278 ; } plan tests => $count + $extra; @@ -537,6 +537,7 @@ $status = $x->deflate($hello, $Answer) ; cmp_ok $status, '==', Z_OK ; + cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; $input .= $hello; # error cases @@ -561,6 +562,7 @@ $status = $x->deflate($goodbye, $Answer) ; cmp_ok $status, '==', Z_OK ; + cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; $input .= $goodbye; # change only Level @@ -572,6 +574,7 @@ $status = $x->deflate($goodbye, $Answer) ; cmp_ok $status, '==', Z_OK ; + cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ; $input .= $goodbye; # change only Strategy diff -aur perl-5.24.1/cpan/IO-Compress/t/cz-03zlib-v1.t perl-5.24.1-new/cpan/IO-Compress/t/cz-03zlib-v1.t --- perl-5.24.1/cpan/IO-Compress/t/cz-03zlib-v1.t 2016-07-14 20:07:04.000000000 +0100 +++ perl-5.24.1-new/cpan/IO-Compress/t/cz-03zlib-v1.t 2017-04-07 21:37:49.828390942 +0100 @@ -23,10 +23,10 @@ my $count = 0 ; if ($] < 5.005) { - $count = 453 ; + $count = 456 ; } else { - $count = 471 ; + $count = 474 ; } @@ -721,6 +721,9 @@ ($Answer, $status) = $x->deflate($hello) ; ok $status == Z_OK ; + ($X, $status) = $x->flush(Z_BLOCK) ; + ok $status == Z_OK ; + $Answer .= $X ; $input .= $hello; # error cases @@ -747,6 +750,9 @@ ($X, $status) = $x->deflate($goodbye) ; ok $status == Z_OK ; $Answer .= $X ; + ($X, $status) = $x->flush(Z_BLOCK) ; + ok $status == Z_OK ; + $Answer .= $X ; $input .= $goodbye; # change only Level @@ -759,6 +765,9 @@ ($X, $status) = $x->deflate($goodbye) ; ok $status == Z_OK ; $Answer .= $X ; + ($X, $status) = $x->flush(Z_BLOCK) ; + ok $status == Z_OK ; + $Answer .= $X ; $input .= $goodbye; # change only Strategy diff -aur perl-5.24.1/cpan/IO-Compress/t/cz-06gzsetp.t perl-5.24.1-new/cpan/IO-Compress/t/cz-06gzsetp.t --- perl-5.24.1/cpan/IO-Compress/t/cz-06gzsetp.t 2016-07-14 20:07:04.000000000 +0100 +++ perl-5.24.1-new/cpan/IO-Compress/t/cz-06gzsetp.t 2017-04-07 21:37:49.828390942 +0100 @@ -39,7 +39,7 @@ plan skip_all => "gzsetparams needs zlib 1.0.6 or better. You have $ver\n" if ZLIB_VERNUM() < 0x1060 ; -plan tests => 51 + $extra ; +plan tests => 55 + $extra ; # Check zlib_version and ZLIB_VERSION are the same. SKIP: { @@ -65,6 +65,7 @@ $input .= $hello; is $x->gzwrite($hello), $len_hello, "gzwrite returned $len_hello" ; + cmp_ok $x->gzflush(Z_BLOCK), '==', Z_OK, "flush before gzsetparams is ok"; # Error cases eval { $x->gzsetparams() }; @@ -120,6 +121,7 @@ my $input .= $hello; is $x->write($hello), $len_hello, "wrote $len_hello bytes" ; + ok $x->flush(Z_BLOCK), "flush before deflateParams is ok"; # Change both Level & Strategy ok $x->deflateParams(Z_BEST_SPEED, Z_HUFFMAN_ONLY), "deflateParams ok"; ————— -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page