Nixpkgs: pythonPackages.cairocffi is broken

Created on 28 May 2018  路  11Comments  路  Source: NixOS/nixpkgs

Issue description

A test of cairocffi fails due to a segmentation fault, causing building cairocffi impossible.

Steps to reproduce

Clone the latest upstream. Then,

$ nix-build -A pythonPackages.cairocffi

or

$ nix-build -A python3Packages.cairocffi

Technical details

Logs:
(python2) https://pastebin.com/BEig2Li2
(python3) https://pastebin.com/mseEACEj

Both of them fails at the same line.

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

$ nix-shell -p nix-info --run 'nix-info -m'
 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.29, NixOS, 18.09pre133640.ea145b68a01 (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.0`
 - channels(pan): `"nixpkgs-18.09pre133932.ee28e35ba37"`
 - channels(root): `"nixos-18.09pre133640.ea145b68a01"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`

All 11 comments

According to git bisect, b9219912de7ea94e7d420f3846d56a79f67be373 introduced this bug.

@pandaman64 Perhaps your find warrants an upstream bug report? It looks like this is an ABI incompatibility that needs to be addressed in cairocffi.

@jtojnar do you mind dealing with this issue?

Not sure how to fix it. For what is worth, Arch uses cairo 1.15 as well, and they allow the tests to fail https://www.archlinux.org/packages/community/any/python-cairocffi/. Issue should probably opened with https://github.com/Kozea/cairocffi/issues

Unfortunately, there is another failing test remaining after the commit.

$ nix-build -A python3Packages.cairocffi
...a lot of lines...
../../nix/store/kxliv1nymfjw3yvrab0lp0sz6nbj065w-python3.6-cairocffi-0.8.0/lib/python3.6/site-packages/cairocffi/test_pixbuf.py . [ 92%]
x..                                                                      [100%]

=================================== FAILURES ===================================
_______________________________ test_pdf_surface _______________________________

    def test_pdf_surface():
        with temp_directory() as tempdir:
            filename = os.path.join(tempdir, 'foo.pdf')
            filename_bytes = filename.encode(sys.getfilesystemencoding())
            file_obj = io.BytesIO()
            for target in [filename, filename_bytes, file_obj, None]:
                surface = PDFSurface(target, 123, 432)
                surface.finish()
            with open(filename, 'rb') as fd:
                assert fd.read().startswith(b'%PDF')
            with open(filename_bytes, 'rb') as fd:
                assert fd.read().startswith(b'%PDF')
            pdf_bytes = file_obj.getvalue()
            assert pdf_bytes.startswith(b'%PDF')
            assert b'/MediaBox [ 0 0 123 432 ]' in pdf_bytes
>           assert pdf_bytes.count(b'/Type /Page\n') == 1
E           AssertionError: assert 0 == 1
E            +  where 0 = <built-in method count of bytes object at 0xa5d6b0>(b'/Type /Page\n')
E            +    where <built-in method count of bytes object at 0xa5d6b0> = b'%PDF-1.5\n%\xb5\xed\xae\xfb\n4 0 obj\n<< /Length 5 0 R\n   /Filter /FlateDecode\n>>\nstream\nx\x9c3T0\x00B]C abl\xa4...000444 00000 n \n0000000555 00000 n \ntrailer\n<< /Size 8\n   /Root 7 0 R\n   /Info 6 0 R\n>>\nstartxref\n607\n%%EOF\n'.count

/nix/store/kxliv1nymfjw3yvrab0lp0sz6nbj065w-python3.6-cairocffi-0.8.0/lib/python3.6/site-packages/cairocffi/test_cairo.py:295: AssertionError
========== 1 failed, 40 passed, 1 skipped, 1 xfailed in 0.38 seconds ===========
builder for '/nix/store/7v7pklw0iqglnl6wb4ycmr1c4mx92hx0-python3.6-cairocffi-0.8.0.drv' failed with exit code 1

@orivej Is this another cairo bug?

Maybe not, I have not seen this before.

Fixed in 6db9f4685a310f1ae65e35afacd977d2ed8fb01d, upstreaming in https://github.com/Kozea/cairocffi/pull/114.

dlopen fails on darwin :cry:
https://github.com/NixOS/nixpkgs/pull/40395#issuecomment-394905930

Fixed in 832973d1791cacedb22f3ee4be87c4c84288f581.

Was this page helpful?
0 / 5 - 0 ratings