Bug 195334 (Beeblebrox) - graphics/png build breaks at pngvalid test
Summary: graphics/png build breaks at pngvalid test
Status: Closed Works As Intended
Alias: Beeblebrox
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-24 14:21 UTC by Beeblebrox
Modified: 2014-12-04 14:49 UTC (History)
1 user (show)

See Also:
dinoex: maintainer-feedback-


Attachments
poudriere build log (35.05 KB, text/plain)
2014-11-24 14:21 UTC, Beeblebrox
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Beeblebrox 2014-11-24 14:21:21 UTC
Created attachment 149769 [details]
poudriere build log

I've had this error for almost 2 months. The port build breaks early-on at test stage:

Running tests...
/usr/local/bin/ctest --force-new-ctest-process 
Test project /wrkdirs/usr/ports/graphics/png/work/libpng-1.5.20
    Start 1: pngtest
1/2 Test #1: pngtest ..........................   Passed    0.01 sec
    Start 2: pngvalid
2/2 Test #2: pngvalid .........................***Failed    6.26 sec
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-24 14:21:21 UTC
Auto-assigned to maintainer dinoex@FreeBSD.org
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2014-11-25 06:09:48 UTC
unable to reproduce on FreeVBSD-8, FreeBSD-9, FreeBSD-10

FreeBSD-11 unable to boot here.

please try:

cd /usr/ports/graphics/png
cd `make -V WRKSRC`'
ctest --force-new-ctest-process -V
Comment 3 Beeblebrox 2014-11-25 06:38:03 UTC
Hi.

/asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20 # ctest --force-new-ctest-process -V
UpdateCTestConfiguration  from :/asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20/DartConfiguration.tcl
UpdateCTestConfiguration  from :/asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20/DartConfiguration.tcl
Test project /asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: pngtest

1: Test command: /asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20/pngtest "/asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20/pngtest.png"
1: Test timeout computed to be: 9.99988e+06
1: 
1:  Testing libpng version 1.5.20
1:    with zlib   version 1.2.8
1: 
1: libpng version 1.5.20 - November 20, 2014
1: Copyright (c) 1998-2014 Glenn Randers-Pehrson
1: Copyright (c) 1996-1997 Andreas Dilger
1: Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1:  library (10520): libpng version 1.5.20 - November 20, 2014
1: 
1:  pngtest (10520): libpng version 1.5.20 - November 20, 2014
1: 
1:  Testing /asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20/pngtest.png:
1:  Pass 0: rwrwrwrwrwrwrwrwrw
1:  Pass 1: rwrwrwrwrwrwrwrwrw
1:  Pass 2: rwrwrwrwrwrwrwrw
1:  Pass 3: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1:  Pass 4: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1:  Pass 5: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1:          rwrwrwrw
1:  Pass 6: rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1:          rwrwrwrwrw
1:  PASS (9782 zero samples)
1:  Filter 0 was used 21 times
1:  Filter 1 was used 15 times
1:  Filter 2 was used 52 times
1:  Filter 3 was used 10 times
1:  Filter 4 was used 33 times
1:  tIME = 7 Jun 1996 17:58:08 +0000
1:  libpng passes test
1/2 Test #1: pngtest ..........................   Passed    0.01 sec
test 2
    Start 2: pngvalid

2: Test command: /asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20/pngvalid
2: Test timeout computed to be: 9.99988e+06
2: pngvalid: read: indexed-colour[8] 1 bit: transform: +rgb_to_gray(R(0.5767,0.2973,0.0270),G(0.1856,0.6274,0.0707),B(0.1882,0.0753,0.9913))^0.45471[overridden]: FP cHRM red(Y) error: 0.2026500 R(0.5767,0.5000,0.0270),G(0.2500,0.6274,0.1250),B(0.1882,0.1250,0.9913) ->
2: pngvalid: 1 errors, 0 warnings
2: FAIL: pngvalid (floating point arithmetic)
2/2 Test #2: pngvalid .........................***Failed    5.05 sec

50% tests passed, 1 tests failed out of 2

Total Test time (real) =   5.06 sec

The following tests FAILED:
	  2 - pngvalid (Failed)
Errors while running CTest
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2014-11-26 05:09:36 UTC
The output should look like:


2: Test command: /data/image/usr/ports/current/png/work/libpng-1.5.20/pngvalid
2: Test timeout computed to be: 9.99988e+06
2: Gamma correction error summary
2: 
2: The printed value is the maximum error in the pixel values
2: calculated by the libpng gamma correction code.  The error
2: is calculated as the difference between the output pixel
2: value (always an integer) and the ideal value from the
2: libpng specification (typically not an integer).
2: 
2: Expect this value to be less than .5 for 8 bit formats,
2: less than 1 for formats with fewer than 8 bits and a small
2: number (typically less than 5) for the 16 bit formats.
2: For performance reasons the value for 16 bit formats
2: increases when the image file includes an sBIT chunk.
2: 
2: Basic gamma correction:
2:   8 bit gray:  0.49933
2:   8 bit color: 0.49933
2:   indexed:     0.00000
2:  16 bit gray:  0.74080
2:  16 bit color: 0.74080
2: 
2: Gamma correction with sBIT:
2:  16 bit gray:  0.74058
2:  16 bit color: 0.74058
2: 
2: Gamma correction with 16 to 8 bit reduction:
2:  16 bit gray:  1.97052
2:  16 bit color: 1.97052
2: 
2: Gamma correction with background:
2:   8 bit gray:  3.71044
2:   8 bit color: 17.66429
2:  16 bit gray:  1.87968
2:  16 bit color: 100.32108
2: 
2: Gamma correction with alpha mode:
2:   8 bit gray:  17.48251
2:   8 bit color: 17.48251
2:  16 bit gray:  309.24044
2:  16 bit color: 310.97330
2: PASS: pngvalid (floating point arithmetic)
2/2 Test #2: pngvalid .........................   Passed   40.30 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =  40.34 sec


It looks like there is a regression in floating point math.
can you try and build with older clang or gcc?
Comment 5 Beeblebrox 2014-11-26 08:37:14 UTC
>> can you try and build with older clang or gcc?
Yes, that solves it:

# make USE_GCC=any
=> compile finishes cleanly. Code snippet from pngvalid test:

Running tests...
Test project /asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20
    Start 1: pngtest
1/2 Test #1: pngtest ..........................   Passed    0.01 sec
    Start 2: pngvalid
2/2 Test #2: pngvalid .........................   Passed   16.17 sec
100% tests passed, 0 tests failed out of 2
Total Test time (real) =  16.18 sec
===>  Staging for png-1.5.20
===>   png-1.5.20 depends on executable: gcc48 - found

-------------------------------------------------
Once compiled, running in the WRKSRC directory,
# ctest --force-new-ctest-process -V
also gives similar result:

2: PASS: pngvalid (floating point arithmetic)
2/2 Test #2: pngvalid .........................   Passed   15.58 sec
100% tests passed, 0 tests failed out of 2

-------------------------------------------------
Separate issue, but:
# make USE_GCC=yes
===>  png-1.5.20 Unknown version of GCC specified (USE_GCC=yes).

# gcc -v => gcc version 4.8.3 (FreeBSD Ports Collection) 

DK if this has any relevance for you:
CPU: AMD Phenom(tm) II X4 B60 Processor (3671.47-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
Comment 6 Dirk Meyer freebsd_committer freebsd_triage 2014-11-26 09:20:13 UTC
Thanks,

so it is an issue with new clang in FreeBSD-11.


Can you try annd build without optimizer?

make clean
make CFLAGS=-O0
Comment 7 Beeblebrox 2014-11-26 10:41:47 UTC
>> Can you try annd build without optimizer? (make CFLAGS=-O0)

Yes, that works as well:

Running tests...
Test project /asp/obj/asp/git/ports/graphics/png/work/libpng-1.5.20
    Start 1: pngtest
1/2 Test #1: pngtest ..........................   Passed    0.01 sec
    Start 2: pngvalid
2/2 Test #2: pngvalid .........................   Passed   23.07 sec
100% tests passed, 0 tests failed out of 2
Total Test time (real) =  23.09 sec
Comment 8 Dimitry Andric freebsd_committer freebsd_triage 2014-11-27 14:09:38 UTC
I've build graphics/png many times now on 11.0-CURRENT, and I've just tried again on one of the FreeBSD reference machines, which is: FreeBSD 11.0-CURRENT #0 r274297: Sat Nov  8 18:31:03 UTC 2014.

It works just fine:

Running tests...
Test project /scratch/tmp/dim/work/scratch/tmp/dim/ports/graphics/png/work/libpng-1.5.20
    Start 1: pngtest
1/2 Test #1: pngtest ..........................   Passed    0.01 sec
    Start 2: pngvalid
2/2 Test #2: pngvalid .........................   Passed   11.30 sec

100% tests passed, 0 tests failed out of 2

Do you have any special compilation flags that aren't show in the log output?

Also, can you try disabling ccache, and see if that fixes the problem?

What happens if you try building the port outside of poudriere, e.g. just directory in /usr/ports/graphics/png?
Comment 9 Beeblebrox 2014-11-27 14:50:24 UTC
>> can you try disabling ccache, and see if that fixes the problem?

I was just about to post when I saw your message.

On host-proper, in /etc/make.conf, if I disable
# WITH_CCACHE_BUILD=yes

The port builds correctly.

I was about to post because,
* yesterday buildworld failed with ccache enabled,
* today buildworld failed for i386 with ccache enabled

Both builds complete when ccache disabled (r275010), yet neither of these problems are recent (> 2 months).

I had posted on the mail list that clang seems to have a problem with ccache, probably with code bit id.