> On 20 Oct 2022, at 14:26, Jia Tan <jiat0...@gmail.com> wrote:
> 
> Hi!
> 
>> the Debian xz-utils package builds the xzdec binary package which is
>> configured as "--disable-encoders --disable-threads". With these options
>> the test suite can't link due missing encoder or thread relevant
>> function.
>> The two patches is what I needed to get it built with these two options.
>> This is for the 5.3.3alpha version.
> 
> Thank you for reporting this and for your patches. We made a few minor
> changes to extend your patch to also compile and skip tests if
> encoders, threads, or decoders were disabled, including the script
> tests. These changes have been committed to master, so they will be
> included in the upcoming 5.4.0 release. If we have another alpha or
> beta release prior to 5.4.0, the commits will be included in those
> releases too.


This definitely improves the situation. However, in Gentoo, we
allow optionally disabling 'extra-filters', described to users as:
```
        <flag name="extra-filters">Build additional filters that are not
                used in any of the default xz presets. This includes delta
                and BCJ coders, additional match finders and SHA256 
checks.</flag>
```

When this flag is disabled (i.e. no extra-filters), we pass the following
options to configure:
```
/var/tmp/portage/app-arch/xz-utils-9999/work/xz-utils-9999/configure 
--prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu 
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share 
--sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking 
--disable-silent-rules --docdir=/usr/share/doc/xz-utils-9999 
--htmldir=/usr/share/doc/xz-utils-9999/html --with-sysroot=/ 
--libdir=/usr/lib64 --enable-threads --enable-nls --disable-static 
--enable-encoders=lzma1,lzma2 --enable-decoders=lzma1,lzma2 
--enable-match-finders=hc3,hc4,bt4 --enable-checks=crc32,crc64
```

This results in the following test failures on master as of today:
```
make[2]: Entering directory 
'/var/tmp/portage/app-arch/xz-utils-9999/work/xz-utils-9999-abi_x86_32.x86/tests'
make[3]: Entering directory 
'/var/tmp/portage/app-arch/xz-utils-9999/work/xz-utils-9999-abi_x86_32.x86/tests'
SKIP: test_files.sh
SKIP: test_compress_prepared_bcj_x86
SKIP: test_compress_prepared_bcj_sparc
SKIP: test_compress_generated_random
SKIP: test_compress_generated_text
SKIP: test_compress_generated_abc
PASS: test_hardware
PASS: test_check
PASS: test_filter_flags
PASS: test_stream_flags
SKIP: test_block_header
PASS: test_memlimit
PASS: test_vli
FAIL: test_bcj_exact_size
PASS: test_index
============================================================================
Testsuite summary for XZ Utils 5.3.3alpha
============================================================================
# TOTAL: 15
# PASS:  7
# SKIP:  7
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
Please report to lasse.col...@tukaani.org
============================================================================
```

From tests/test-suite.log:
```
FAIL: test_bcj_exact_size
=========================

=== test_bcj_exact_size.c ===
SKIP: test_exact_size [test_bcj_exact_size.c:27] PowerPC BCJ encoder and/or 
decoder is disabled
FAIL: test_empty_block [test_bcj_exact_size.c:103] assert_enum_eq: 
'lzma_stream_buffer_decode(&memlimit, 0, ((void *)0), empty_bcj_lzma2, &in_pos, 
in_size, out, &out_pos, 0) == LZMA_OPTIONS_ERROR' but expected '... = LZMA_OK'
---
# TOTAL: 2
# PASS:  0
# SKIP:  1
# FAIL:  1
# ERROR: 0
=== END ===
FAIL test_bcj_exact_size (exit status: 1)
```

The tests pass if I turn 'extra-filters' back on.

This is the current build script used:
https://gitweb.gentoo.org/repo/gentoo.git/tree/app-arch/xz-utils/xz-utils-9999.ebuild?id=5a8ce9b83b02f2b5a2e276e3d02f5436d3dce4ac.

Best,
sam

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to