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
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at if you want to take care of it
Depends on:
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: ---


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 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, ...).

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):

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

    media-libs/openjpeg: security bump to 2.4.0
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Signed-off-by: Sam James <>

 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(+)