Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715422 - media-libs/openjpeg fails test suite depending on the instruction set used
Summary: media-libs/openjpeg fails test suite depending on the instruction set used
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2020-03-30 11:07 UTC by Robert Gusztav
Modified: 2020-12-29 02:59 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Gusztav 2020-03-30 11:07:20 UTC
media-libs/openjpeg generates slightly different images depending on whether it was compiled with "normal" instructions or with some "advanced" ones, e.g. using fused-multiply-add (FMA), FP387.
This lets the test suite of openjpeg fail.

For more details see bug #628430 and the references therein.

The FMA instructions are implied by -march=<ABC> in combination with -O2 (or higher) in the CFLAGS, which are very common if not recommended for users.
GCC allows to control the usage of FMA with the -ffp-contract= option [0]
In https://bugs.gentoo.org/628430#c4 there is also the -mfpmath= setting mentioned which might or might not disable FMA or similar instructions if set to -mfpmath=sse.

A possible fix/workaround would be to filter the offending flags from CFLAGS and/or add their disabled counterparts (e.g. -ffp-contract=off, -mfpmath=sse, ...).

[0] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ffp-contract
Comment 1 Larry the Git Cow gentoo-dev 2020-12-29 02:59:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77e5ad18b2cc380826ad062461b08357633889a6

commit 77e5ad18b2cc380826ad062461b08357633889a6
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2020-12-29 02:56:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-12-29 02:56:24 +0000

    media-libs/openjpeg: security bump to 2.4.0
    
    Bug: https://bugs.gentoo.org/675426
    Bug: https://bugs.gentoo.org/718918
    Closes: https://bugs.gentoo.org/715306
    Closes: https://bugs.gentoo.org/715422
    Closes: https://bugs.gentoo.org/715130
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/openjpeg/Manifest                       |   2 +
 .../files/openjpeg-2.4.0-gnuinstalldirs.patch      | 420 +++++++++++++++++++++
 media-libs/openjpeg/openjpeg-2.4.0.ebuild          | 139 +++++++
 3 files changed, 561 insertions(+)