Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715406 - media-libs/libjpeg-turbo: test failures on ppc
Summary: media-libs/libjpeg-turbo: test failures on ppc
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: 714874
  Show dependency tree
 
Reported: 2020-03-30 08:34 UTC by Agostino Sarubbo
Modified: 2020-08-08 04:42 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,109.62 KB, text/plain)
2020-03-30 08:34 UTC, Agostino Sarubbo
Details
build.log (2.0.3) (libjpeg-turbo-2.0.3:20200505-125201.log,185.16 KB, text/plain)
2020-05-05 13:02 UTC, ernsteiswuerfel
Details
build.log (2.0.4) (libjpeg-turbo-2.0.4:20200505-125339.log,185.53 KB, text/plain)
2020-05-05 13:02 UTC, ernsteiswuerfel
Details
emerge --info (file_715406.txt,6.18 KB, text/plain)
2020-05-05 13:03 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-03-30 08:34:10 UTC
This is an auto-filled bug because media-libs/libjpeg-turbo fails to compile on ppc. Feel free to adjust the summary to clarify the exact issue. Attached build log and emerge --info
Comment 1 Agostino Sarubbo gentoo-dev 2020-03-30 08:34:19 UTC
Created attachment 627170 [details]
build.log

build log and emerge --info
Comment 2 ernsteiswuerfel archtester 2020-05-05 13:01:25 UTC
Had a closer look at this. This is no build failure but 2 tests fail.

   libjpeg-turbo-2.0.3:

99% tests passed, 2 tests failed out of 302

Total Test time (real) =  15.75 sec

The following tests FAILED:
         83 - djpeg-shared-3x2-float-prog-cmp (Failed)
        234 - djpeg-static-3x2-float-prog-cmp (Failed)

   libjpeg-turbo-2.0.4:

99% tests passed, 2 tests failed out of 302

Total Test time (real) =  17.99 sec

The following tests FAILED:
         83 - djpeg-shared-3x2-float-prog-cmp (Failed)
        234 - djpeg-static-3x2-float-prog-cmp (Failed)


So at least it's no regression over 2.0.3.
Comment 3 ernsteiswuerfel archtester 2020-05-05 13:02:06 UTC
Created attachment 636198 [details]
build.log (2.0.3)
Comment 4 ernsteiswuerfel archtester 2020-05-05 13:02:34 UTC
Created attachment 636200 [details]
build.log (2.0.4)
Comment 5 ernsteiswuerfel archtester 2020-05-05 13:03:09 UTC
Created attachment 636202 [details]
emerge --info
Comment 6 ernsteiswuerfel archtester 2020-05-05 19:02:15 UTC
AT first sight it looked like upstream issue https://github.com/libjpeg-turbo/libjpeg-turbo/issues/344

Next I built libjpeg-turbo from git master natively on my PowerMac G4 DP which showed the same test failures. So I filed a new upstream bug:
https://github.com/libjpeg-turbo/libjpeg-turbo/issues/428
Comment 7 ernsteiswuerfel archtester 2020-05-05 21:05:59 UTC
Upstream says:
"On platforms that don't have SIMD support for the floating point DCT/IDCT algorithms, the mathematical output of those algorithms depends on the compiler and FPU. The build system sets reasonable defaults for most 64-bit compilers and most 32-bit compilers, but those defaults aren't universal. In your case, it appears as if the build system is setting the FLOATTEST CMake variable to 32bit when you really need it to be set to 64bit. That is consistent with my experience on PPC platforms. They seem to always require FLOATTEST=64bit, even when using 32-bit code."
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-06-11 16:18:17 UTC
(In reply to ernsteiswuerfel from comment #7)
> Upstream says:
> That is consistent with my experience on PPC platforms. They seem to always require FLOATTEST=64bit, even when using 32-bit code."

I mean, this is bizarre, but does this fix the issue for you?
Comment 9 ernsteiswuerfel archtester 2020-06-13 14:51:24 UTC
(In reply to Sam James (sec padawan) from comment #8)
> (In reply to ernsteiswuerfel from comment #7)
> > Upstream says:
> > That is consistent with my experience on PPC platforms. They seem to always require FLOATTEST=64bit, even when using 32-bit code."
> 
> I mean, this is bizarre, but does this fix the issue for you?
Forgot about this bug for a while...

Tried it out now on the G4, libjpeg-turbo from git-master. Yes, setting FLOATTEST:STRING=64bit works and all tests pass.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-06-13 19:32:19 UTC
(In reply to ernsteiswuerfel from comment #9)
> Tried it out now on the G4, libjpeg-turbo from git-master. Yes, setting
> FLOATTEST:STRING=64bit works and all tests pass.

You're a star. Could you let me know if this workaround is needed with 1.5.3-r3? I'm going to apply the workaround mentioned to 2.x, but not sure if it's needed there too.
Comment 11 ernsteiswuerfel archtester 2020-06-14 11:41:25 UTC
1.5.3-r3 passes tests without a workaround needed.
Comment 12 Larry the Git Cow gentoo-dev 2020-08-08 04:42:40 UTC
The bug has been closed via the following commit(s):

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

commit c3b6a9195cdcad8e233e5f570114c8ff18f68327
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2020-08-08 04:42:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-08-08 04:42:08 +0000

    media-libs/libjpeg-turbo: fix tests on ppc
    
    Fix tests on PPC by applying upstream-recommended
    workaround (-DFLOATTEST=64bit).
    
    See https://github.com/libjpeg-turbo/libjpeg-turbo/issues/428
    for details.
    
    Bug: https://bugs.gentoo.org/727010
    Closes: https://bugs.gentoo.org/715406
    Thanks-to: ernsteiswuerfel <erhard_f@mailbox.org>
    Package-Manager: Portage-3.0.1, Repoman-2.3.23
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libjpeg-turbo/libjpeg-turbo-2.0.4-r1.ebuild | 9 +++++++++
 media-libs/libjpeg-turbo/libjpeg-turbo-2.0.5.ebuild    | 9 +++++++++
 2 files changed, 18 insertions(+)