Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1715262

Summary: python-cartopy: FTBFS in Fedora rawhide
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-cartopyAssignee: Elliott Sales de Andrade <quantum.analyst>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: josdekloe, python-sig, quantum.analyst
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://apps.fedoraproject.org/koschei/package/python-cartopy
Whiteboard:
Fixed In Version: python-cartopy-0.17.0-5.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-03 15:26:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1706450    
Bug Blocks: 1700317, 1686977, 1732841    

Description Miro Hrončok 2019-05-30 00:25:44 UTC
Description of problem:
Package python-cartopy fails to build from source in Fedora rawhide.

Version-Release number of selected component (if applicable):
0.17.0-4.fc30

Steps to Reproduce:
koji build --scratch f31 python-cartopy-0.17.0-4.fc30.src.rpm

Additional info:
This package is tracked by Koschei. See:
http://apps.fedoraproject.org/koschei/package/python-cartopy

I suspect freetype update from 2.9.1-7.fc30 to 2.10.0-1.fc31 is to blame.

Comment 1 Jos de Kloe 2019-05-30 09:27:19 UTC
Confirmed by rebuilding using a local mock build.
By eye it is impossible to see a difference between the images that are reported to be different, but the idiff tool does report them to be different.

>idiff /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/python-cartopy-0.17.0-4.fc31.x86_64/usr/lib64/python3.7/site-packages/cartopy/tests/mpl/baseline_images/mpl/test_gridliner/gridliner_labels.png /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_gridliner/result-gridliner_labels.png

prints:
  Mean error = 0.00750987
  RMS error = 0.0690415
  Peak SNR = 23.2178
  Max error  = 1 @ (96, 121, R)  values are 0, 0, 0, 1 vs 1, 1, 1, 1
  23091 pixels (2.89%) over 1e-06
  23091 pixels (2.89%) over 1e-06
FAILURE

also a manual execution of the matplotlib compare_images test function (the one that is used by this test case) confirms this:

python3
>>> from matplotlib.testing.compare import compare_images
>>> result = compare_images(fn1, fn2, tol=20.3)
>>> print(result)
Error: Image files did not match.
  RMS Value: 20.32918495250937
  Expected:  
    /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILDROOT/python-cartopy-0.17.0-4.fc31.x86_64/usr/lib64/python3.7/site-packages/cartopy/tests/mpl/baseline_images/mpl/test_gridliner/gridliner_labels.png
  Actual:    
    /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_gridliner/result-gridliner_labels.png
  Difference:
    /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_gridliner/result-gridliner_labels-failed-diff.png
  Tolerance: 
    20.3

So it seems the tolerance provided in this test is just a little to tight now. Increasing it to 20.4 lets the test pass:

>>> result = compare_images(fn1, fn2, tol=20.4)
>>> print(result)
None
>>> 

Not sure what exectly changed in freetype, but I guess this change is going to affect users outside Fedora as well, so better get it solved upstream.
Therefore I would say the best thing to do is notify upstream and suggest they adjust their test tolerance, and maybe meanwhile patch the test so the Fedora build passes again.