Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628430 - media-libs/openjpeg: test failures
Summary: media-libs/openjpeg: test failures
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords: TESTFAILURE
: 673806 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-20 19:22 UTC by Thomas Deutschmann (RETIRED)
Modified: 2020-03-27 13:05 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,374.99 KB, text/plain)
2017-08-20 19:22 UTC, Thomas Deutschmann (RETIRED)
Details
arm64-build.log (build.log,383.15 KB, text/plain)
2018-03-03 12:10 UTC, Mart Raudsepp
Details
build.log (2.3.1, ppc64) (openjpeg-2.3.1:20190505-193543.log,350.64 KB, text/plain)
2019-05-05 19:58 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2017-08-20 19:22:57 UTC
Created attachment 489868 [details]
build.log

Errors while running CTest

 * Note: Upstream is maintaining a list of known test failures.
 * We will now compare our test results against this list and sort out any known failure.

 * New/unknown test failure found: 'NR-JP2-file2.jp2-compare2base'
 * New/unknown test failure found: 'NR-JP2-file3.jp2-compare2base'
 * Test 'NR-DEC-issue104_jpxstream.jp2-33-decode-md5' is known to fail, ignoring ...
 * New/unknown test failure found: 'NR-DEC-issue205.jp2-43-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue208.jp2-69-decode-md5'
 * Test 'NR-DEC-issue226.j2k-74-decode' is known to fail, ignoring ...
 * Test 'NR-DEC-issue226.j2k-74-decode-md5' is known to fail, ignoring ...
 * Test 'NR-DEC-p1_06.j2k-156-decode' is known to fail, ignoring ...
 * Test 'NR-DEC-p1_06.j2k-156-decode-md5' is known to fail, ignoring ...
 * Test 'NR-DEC-p1_06.j2k-164-decode' is known to fail, ignoring ...
 * Test 'NR-DEC-p1_06.j2k-164-decode-md5' is known to fail, ignoring ...
 * New/unknown test failure found: 'NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5'
 * ERROR: media-libs/openjpeg-2.2.0::gentoo failed (test phase):
 *   Test suite failed. New/unknown test failure(s) found!
 *


Same unexpected test failures with previous stable media-libs/openjpeg-2.1.1_p20160922.



Portage 2.3.6 (python 3.4.5-final-0, default/linux/x86/13.0, gcc-5.4.0, glibc-2.23-r4, 4.12.5-gentoo i686)
=================================================================
System uname: Linux-4.12.5-gentoo-i686-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.3
KiB Mem:     3108120 total,   1092668 free
KiB Swap:     488276 total,    484180 free
Timestamp of repository gentoo: Sun, 20 Aug 2017 15:04:05 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28 p1.2) 2.28
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.15-r2::gentoo
sys-devel/binutils:       2.28-r2::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

ABI="x86"
ABI_X86="32"
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ARCH="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt"
CHOST="i686-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class */dropin.cache"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
CXXFLAGS="-O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt"
DEFAULT_ABI="x86"
EDITOR="/usr/bin/mcedit"
ELIBC="glibc"
EPREFIX=""
EROOT="/"
FACTERDIR="/usr/lib"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GCC_SPECS=""
GRUB_PLATFORMS="efi-32 pc"
GSETTINGS_BACKEND="dconf"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/gcc-data/i686-pc-linux-gnu/5.4.0/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.28/info"
INPUT_DEVICES="libinput keyboard mouse"
IUSE_IMPLICIT="abi_x86_32 prefix prefix-chain prefix-guest"
KERNEL="linux"
L10N="en en-US de de-DE"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LC_MESSAGES="C"
LC_PAPER="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LIBDIR_x86="lib"
LINGUAS="en de"
LOGNAME="root"
MAIL="/var/mail/root"
MAKEOPTS="--jobs 5 --load-average 7.95"
MULTILIB_ABIS="x86"
MULTIOSDIRS="../lib"
NOCOLOR="true"
OFFICE_IMPLEMENTATION="libreoffice"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/5.4.0"
PHP_TARGETS="php5-6"
POSTGRES_TARGETS="postgres9_5"
PWD="/root"
PYTHONDONTWRITEBYTECODE="1"
PYTHON_SINGLE_TARGET="python3_4"
PYTHON_TARGETS="python2_7 python3_4"
ROOT="/"
ROOTPATH="/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/5.4.0"
RUBY_TARGETS="ruby22"
SHELL="/bin/bash"
SHLVL="2"
SSH_TTY="/dev/pts/0"
TERM="screen"
TMUX="/tmp/tmux-0/default,4491,0"
TMUX_PANE="%3"
TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1"
USER="root"
USERLAND="GNU"
VIDEO_CARDS="intel"
Comment 1 Robert Gusztav 2017-09-15 19:05:29 UTC
I've got a similar behaviour: OpenJPEG fails a lot of tests.
By coincidence I tracked it down to CFLAGS or, more precisely, to the
usage of fused-multiply-add operation (FMA).

In my case the following flags yielded only two failures, both which are
known and expected (i.e. ignored by portage and upstream Travis CI):

    CFLAGS="-pipe -O2 -march=native -ffp-contract=off" 

The CPUs I tested these on are Intel Broadwell and Intel Haswell, which
both have support for FMA.

I suggest you, Thomas, run the OpenJPEG tests again with FMA disabled
(-ffp-contract=off). If this solves the case then I suggest adding some
filter/enhancement procedure to the ebuild to add "-ffp-contract=off" 
and filter out all other compiler flags which might enable FMA or
overrule the user's choice of CFLAGS and set them to a save default.

The cause why FMA lets the tests fail is their altered precision behaviour
in floating point arithmetic:
FMA is essential the computation "FMA(a,b,c) = a*b + c" in one
instruction. However, the precision of FMA(a,b,c) is different to the
precision of a*b + c with 'ordinary' plus and multiply instructions.
Thus, the result of FMA(a,b,c) and a*b + c might not be the same even
for the input numbers.

Some notes on the compiler flags:
The flag -O2 (but not -O1) implies -fexpensive-optimizations which
enables FMA IF the -march= parameter is set to an architecture which
supports FMA (e.g. ARM, "newer" Intel processors). This in particular
means that the following flags do not trigger FMA:

 -O1 -march=broadwell
 -O2 -mtune=broadwell
 -O2

FMA itself can be controlled with -ffp-contract= which takes the values
'off' (no FMA), 'fast' (yes FMA please), 'on' (not implemented and
currently equivalent to 'off' (sic!)) [0]

There is also the architecture depended flags '-mno-fused-madd' and
'-mfused-madd' (disable/enable FMA), which are supported on ARM and x86
but deprecated on x86 (not sure about ARM)

[0] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ffp-contract
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2017-09-15 20:22:01 UTC
"-ffp-contract=off" doesn't change anything on my x86 test system. Same test failures. Also, please note that on my amd64 system, all tests passes.
Comment 3 Robert Gusztav 2017-09-17 08:40:49 UTC
I found this issue[0]. There a collaborator mentions that the test suite also fails if it uses FP387 unit instead of SSE2 on an Intel 32bit system.

I cross-checked your failures with the known failures list[1] on an 32bit system from upstream and they are all present.

[0] https://github.com/uclouvain/openjpeg/issues/1017
[1] https://github.com/uclouvain/openjpeg/blob/master/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.3-i386-Release-3rdP.txt
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2017-09-21 20:54:27 UTC
(In reply to robert.gusztav from comment #3)
> I found this issue[0]. There a collaborator mentions that the test suite
> also fails if it uses FP387 unit instead of SSE2 on an Intel 32bit system.
> 
> I cross-checked your failures with the known failures list[1] on an 32bit
> system from upstream and they are all present.
> 
> [0] https://github.com/uclouvain/openjpeg/issues/1017
> [1]
> https://github.com/uclouvain/openjpeg/blob/master/tools/travis-ci/
> knownfailures-Ubuntu12.04-gcc4.6.3-i386-Release-3rdP.txt

I can confirm. Via https://bugs.gentoo.org/628242#c1 I learned about "mfpmath".

I am getting the same test results on x86 like on amd64 when using "-mfpmath=sse" (=with mfpmath=sse the additional test failures on x86 are gone).
Comment 5 Rolf Eike Beer archtester 2017-12-10 08:42:26 UTC
Dupe of bug 628430
Comment 6 Rolf Eike Beer archtester 2017-12-10 08:42:55 UTC
Nonsense. I meant bug 595344.
Comment 7 Mart Raudsepp gentoo-dev 2018-03-03 12:08:07 UTC
fails on arm64 as well:

 * Messages for package media-libs/openjpeg-2.3.0:

 * New/unknown test failure found: 'NR-C1P0-p0_04.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P0-p0_05.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P0-p0_06.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P1-p1_02.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P1-p1_03.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P1-p1_04.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P1-p1_05.j2k-compare2base'
 * New/unknown test failure found: 'NR-JP2-file2.jp2-compare2base'
 * New/unknown test failure found: 'NR-RIC-subsampling_1.jp2-compare2base'
 * New/unknown test failure found: 'NR-RIC-subsampling_2.jp2-compare2base'
 * New/unknown test failure found: 'NR-RIC-zoo1.jp2-compare2base'
 * New/unknown test failure found: 'NR-RIC-zoo2.jp2-compare2base'
 * New/unknown test failure found: 'NR-DEC-_00042.j2k-2-decode-md5'
 * New/unknown test failure found: 'NR-DEC-buxI.j2k-9-decode-md5'
 * New/unknown test failure found: 'NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5'
 * New/unknown test failure found: 'NR-DEC-Marrin.jp2-18-decode-md5'
 * New/unknown test failure found: 'NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5'
 * New/unknown test failure found: 'NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5'
 * New/unknown test failure found: 'NR-DEC-file409752.jp2-40-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue206_image-000.jp2-42-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue205.jp2-43-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue228.j2k-60-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue142.j2k-66-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue134.jp2-67-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue135.j2k-68-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue208.jp2-69-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue211.jp2-70-decode-md5'
 * Test 'NR-DEC-issue226.j2k-74-decode' is known to fail, ignoring ...
 * Test 'NR-DEC-issue226.j2k-74-decode-md5' is known to fail, ignoring ...
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-124-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-125-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-126-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-127-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-128-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-129-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-131-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-138-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-140-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p0_04.j2k-166-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p0_04.j2k-167-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p0_04.j2k-168-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p0_04.j2k-172-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue205.jp2-253-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5'
 * ERROR: media-libs/openjpeg-2.3.0::gentoo failed (test phase):
 *   Test suite failed. New/unknown test failure(s) found!
Comment 8 Mart Raudsepp gentoo-dev 2018-03-03 12:10:05 UTC
Created attachment 522054 [details]
arm64-build.log
Comment 9 Larry the Git Cow gentoo-dev 2018-12-20 01:10:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bfd73a8952c21351d8d061a5ae82bda24d00205

commit 6bfd73a8952c21351d8d061a5ae82bda24d00205
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-12-20 00:59:54 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-12-20 01:06:31 +0000

    media-libs/openjpeg: check against known architecture specific failures
    
    Bug: https://bugs.gentoo.org/628430
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 media-libs/openjpeg/openjpeg-2.3.0-r1.ebuild | 65 ++++++++++++++++++----------
 1 file changed, 42 insertions(+), 23 deletions(-)
Comment 10 ernsteiswuerfel archtester 2019-05-05 19:58:45 UTC
Created attachment 575342 [details]
build.log (2.3.1, ppc64)

2.3.1 (see bug #673806 for 2.3.0-r1) fails lots of tests on ppc/ppc64 too:

 * New/unknown test failure found: 'NR-C1P0-p0_04.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P0-p0_05.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P0-p0_06.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P1-p1_02.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P1-p1_03.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P1-p1_04.j2k-compare2base'
 * New/unknown test failure found: 'NR-C1P1-p1_05.j2k-compare2base'
 * New/unknown test failure found: 'NR-JP2-file2.jp2-compare2base'
 * New/unknown test failure found: 'NR-RIC-subsampling_1.jp2-compare2base'
 * New/unknown test failure found: 'NR-RIC-subsampling_2.jp2-compare2base'
 * New/unknown test failure found: 'NR-RIC-zoo1.jp2-compare2base'
 * New/unknown test failure found: 'NR-RIC-zoo2.jp2-compare2base'
 * New/unknown test failure found: 'NR-DEC-_00042.j2k-2-decode-md5'
 * New/unknown test failure found: 'NR-DEC-buxI.j2k-9-decode-md5'
 * New/unknown test failure found: 'NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5'
 * New/unknown test failure found: 'NR-DEC-Marrin.jp2-18-decode-md5'
 * New/unknown test failure found: 'NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5'
 * New/unknown test failure found: 'NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5'
 * New/unknown test failure found: 'NR-DEC-file409752.jp2-40-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue206_image-000.jp2-42-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue205.jp2-43-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue228.j2k-60-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue142.j2k-66-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue134.jp2-67-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue135.j2k-68-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue208.jp2-69-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue211.jp2-70-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-124-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-125-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-126-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-127-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-128-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-129-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-131-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-138-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p1_04.j2k-140-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p0_04.j2k-166-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p0_04.j2k-167-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p0_04.j2k-168-decode-md5'
 * New/unknown test failure found: 'NR-DEC-p0_04.j2k-172-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue205.jp2-253-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5'
 * New/unknown test failure found: 'NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5'
 * New/unknown test failure found: 'NR-DEC-db11217111510058.jp2-306-decode-md5'
 * New/unknown test failure found: 'NR-DEC-tnsot_zero.jp2-307-decode-md5'
Comment 11 ernsteiswuerfel archtester 2019-05-05 19:59:13 UTC
*** Bug 673806 has been marked as a duplicate of this bug. ***
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2020-03-27 13:05:03 UTC
These are caused by tiff-4.0.1+ and are fixed in 2.3.1-r1 (https://gitweb.gentoo.org/repo/gentoo.git/commit/media-libs/openjpeg?id=cc5624c83ee4d27e8beba205f28324ad8765adeb). Please file a new bug if you still run into test failures.