Skip Menu |

This queue is for tickets about the Cairo CPAN distribution.

Report information
The Basics
Id: 62603
Status: resolved
Priority: 0/
Queue: Cairo

People
Owner: Nobody in particular
Requestors: garu [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.061
Fixed in: (no value)



Subject: failing tests in t/CairoSurface.t
Hi there, Thanks for such a great module! I'm having some trouble installing it in kubuntu 10.10, though. My problem appears to be just like the one in: http://www.cpantesters.org/cpan/report/21ea2256-d25e-11df-b31b-a2b63073ca9e This is my perl version and architecture: garu@bebop:~$ perl -v This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi (with 40 registered patches, see perl -V for more detail) I saw one of the resolved bugs also had the 'no-memory' problem, but even after running "fc-cache" I got the same results. I did, however, try the code you provided back then: garu@bebop:~$ cat cairo-test.c #include <cairo/cairo.h> /* gcc `pkg-config --cflags --libs cairo` cairo-test.c -o cairo-test */ int main (int argc, char **argv) { cairo_t *cr; cairo_surface_t *surface; surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 256, 256); cr = cairo_create (surface); cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_move_to (cr, 0, 0); cairo_line_to (cr, 256, 256); cairo_stroke (cr); cairo_surface_write_to_png (surface, "cairo-test.png"); cairo_destroy (cr); cairo_surface_destroy (surface); } garu@bebop:~$ gcc `pkg-config --cflags --libs cairo` cairo-test.c -o cairo-test garu@bebop:~$ ldd cairo-test linux-vdso.so.1 => (0x00007fff0c9f0000) libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f9548c0e000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f95489f1000) libc.so.6 => /lib/libc.so.6 (0x00007f954866d000) libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f954840e000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f95481d9000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f9547f51000) libpng12.so.0 => /lib/libpng12.so.0 (0x00007f9547d2a000) libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f9547b27000) libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f954791d000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f9547700000) libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f95474f6000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f95471bf000) libz.so.1 => /lib/libz.so.1 (0x00007f9546fa7000) libm.so.6 => /lib/libm.so.6 (0x00007f9546d24000) /lib64/ld-linux-x86-64.so.2 (0x00007f9548eeb000) libexpat.so.1 => /lib/libexpat.so.1 (0x00007f9546afa000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f95468f7000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f95466f1000) libdl.so.2 => /lib/libdl.so.2 (0x00007f95464ec000) And yes, running the program gives me a transparent png file with a diagonal line. Below is the installation output with failing tests. Any advice on how to fix these would be *greatly* appreciated. Thanks! garu@bebop: cpanm Cairo cpanm (App::cpanminus) 1.0015 on perl 5.010001 built for x86_64-linux-gnu-thread-multi Work directory is /home/garu/.cpanm/work/1288583406.15489 You have make /usr/bin/make You have LWP 5.837 You have /bin/tar: tar (GNU tar) 1.23 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. You have /usr/bin/unzip Searching Cairo on cpanmetadb ... Checking if you have ExtUtils::MakeMaker 6.31 ... Yes (6.56) Checking if you have ExtUtils::Install 1.46 ... Yes (1.54) Checking if you have Module::Build 0.28 ... Yes (0.3607) --> Working on Cairo Fetching http://search.cpan.org/CPAN/authors/id/T/TS/TSCH/Cairo-1.061.tar.gz -> OK Unpacking Cairo-1.061.tar.gz Entering Cairo-1.061 Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.56) Checking if you have ExtUtils::Depends 0.2 ... Yes (0.302) Checking if you have ExtUtils::PkgConfig 1 ... Yes (1.12) Configuring Cairo-1.061 Running Makefile.PL Compiling Cairo with FreeType support Checking if your kit is complete... Looks good Writing Makefile for Cairo -> OK Finding PREREQ from Makefile ... Checking if you have ExtUtils::Depends 0.2 ... Yes (0.302) Checking if you have ExtUtils::PkgConfig 1 ... Yes (1.12) Building and testing Cairo-1.061 cp lib/Cairo.pm blib/lib/Cairo.pm cp build/IFiles.pm blib/arch/Cairo/Install/Files.pm cp cairo-perl.typemap blib/arch/Cairo/Install/cairo-perl.typemap cp doctypes blib/arch/Cairo/Install/doctypes cp cairo-perl.h blib/arch/Cairo/Install/cairo-perl.h cp build/cairo-perl-auto.typemap blib/arch/Cairo/Install/cairo-perl-auto.typemap cp build/cairo-perl-auto.h blib/arch/Cairo/Install/cairo-perl-auto.h /usr/bin/perl /home/garu/perl5/lib/perl5/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.10/ExtUtils/typemap -typemap build/cairo-perl-auto.typemap -typemap cairo-perl.typemap Cairo.xs > Cairo.xsc && mv Cairo.xsc Cairo.c cc -c -I. -Ibuild -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.061\" -DXS_VERSION=\"1.061\" -fPIC "-I/usr/lib/perl/5.10/CORE" Cairo.c /usr/bin/perl /home/garu/perl5/lib/perl5/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.10/ExtUtils/typemap -typemap build/cairo-perl-auto.typemap -typemap cairo-perl.typemap CairoFont.xs Show quoted text
> CairoFont.xsc && mv CairoFont.xsc CairoFont.c
cc -c -I. -Ibuild -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.061\" -DXS_VERSION=\"1.061\" -fPIC "-I/usr/lib/perl/5.10/CORE" CairoFont.c /usr/bin/perl /home/garu/perl5/lib/perl5/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.10/ExtUtils/typemap -typemap build/cairo-perl-auto.typemap -typemap cairo-perl.typemap CairoMatrix.xs > CairoMatrix.xsc && mv CairoMatrix.xsc CairoMatrix.c cc -c -I. -Ibuild -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.061\" -DXS_VERSION=\"1.061\" -fPIC "-I/usr/lib/perl/5.10/CORE" CairoMatrix.c /usr/bin/perl /home/garu/perl5/lib/perl5/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.10/ExtUtils/typemap -typemap build/cairo-perl-auto.typemap -typemap cairo-perl.typemap CairoPath.xs Show quoted text
> CairoPath.xsc && mv CairoPath.xsc CairoPath.c
cc -c -I. -Ibuild -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.061\" -DXS_VERSION=\"1.061\" -fPIC "-I/usr/lib/perl/5.10/CORE" CairoPath.c /usr/bin/perl /home/garu/perl5/lib/perl5/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.10/ExtUtils/typemap -typemap build/cairo-perl-auto.typemap -typemap cairo-perl.typemap CairoPattern.xs > CairoPattern.xsc && mv CairoPattern.xsc CairoPattern.c cc -c -I. -Ibuild -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.061\" -DXS_VERSION=\"1.061\" -fPIC "-I/usr/lib/perl/5.10/CORE" CairoPattern.c /usr/bin/perl /home/garu/perl5/lib/perl5/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.10/ExtUtils/typemap -typemap build/cairo-perl-auto.typemap -typemap cairo-perl.typemap CairoSurface.xs > CairoSurface.xsc && mv CairoSurface.xsc CairoSurface.c cc -c -I. -Ibuild -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.061\" -DXS_VERSION=\"1.061\" -fPIC "-I/usr/lib/perl/5.10/CORE" CairoSurface.c /usr/bin/perl /home/garu/perl5/lib/perl5/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.10/ExtUtils/typemap -typemap build/cairo-perl-auto.typemap -typemap cairo-perl.typemap CairoFt.xs > CairoFt.xsc && mv CairoFt.xsc CairoFt.c cc -c -I. -Ibuild -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.061\" -DXS_VERSION=\"1.061\" -fPIC "-I/usr/lib/perl/5.10/CORE" CairoFt.c cc -c -I. -Ibuild -pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.061\" -DXS_VERSION=\"1.061\" -fPIC "-I/usr/lib/perl/5.10/CORE" cairo-perl-enums.c Running Mkbootstrap for Cairo () chmod 644 Cairo.bs rm -f blib/arch/auto/Cairo/Cairo.so LD_RUN_PATH="/usr/lib" cc -shared -O2 -g -L/usr/local/lib -fstack-protector Cairo.o CairoFont.o CairoMatrix.o CairoPath.o CairoPattern.o CairoSurface.o CairoFt.o cairo-perl-enums.o -o blib/arch/auto/Cairo/Cairo.so \ -lcairo -lfreetype \ chmod 755 blib/arch/auto/Cairo/Cairo.so cp Cairo.bs blib/arch/auto/Cairo/Cairo.bs chmod 644 blib/arch/auto/Cairo/Cairo.bs Manifying blib/man3/Cairo.3pm PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/Cairo.t ......... ok t/CairoFont.t ..... ok t/CairoFt.t ....... skipped: need Cairo with FreeType support and Font::FreeType t/CairoMatrix.t ... ok t/CairoPath.t ..... ok t/CairoPattern.t .. ok # Failed test at t/CairoSurface.t line 82. # got: 'color' # expected: 'color-alpha' # Failed test at t/CairoSurface.t line 93. # Structures begin differing at: # $got->[0] = '0' # $expected->[0] = '23' # Failed test at t/CairoSurface.t line 100. # got: 'no-memory' # expected: 'success' unknown surface type 16 encountered at t/CairoSurface.t line 197. # Looks like you failed 3 tests of 72. t/CairoSurface.t .. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/72 subtests Test Summary Report ------------------- t/CairoSurface.t (Wstat: 768 Tests: 72 Failed: 3) Failed tests: 15, 17, 19 Non-zero exit status: 3 Files=7, Tests=204, 1 wallclock secs ( 0.06 usr 0.02 sys + 0.22 cusr 0.03 csys = 0.33 CPU) Result: FAIL Failed 1/7 test programs. 3/204 subtests failed. make: *** [test_dynamic] Error 3
This might give some hints on the matter: I found it strange that the latest CPAN version is 1.061 and Ubuntu has libcairo-perl referring to version 1.070-1. Looking into it, I found the following record on ubuntu's package changelog: libcairo-perl (1.070-1ubuntu1) maverick; urgency=low * Temporarily deactivate failing tests in the testsuite: newer cairo causing test failures that will not be addressed by Maverick release (according to slomo the test suite needs to be updated). Thanks to Didier Roche for investigating the issue. (LP: #187823) -- Emmet Hikory <persia@ubuntu.com> Thu, 23 Sep 2010 18:37:35 +0900 The full changelog can be seen here: http://changelogs.ubuntu.com/changelogs/pool/main/libc/libcairo-perl/libcairo-perl_1.070-1ubuntu1/changelog
I have the exact same test failures. I am using ArchLinux. I am packaging this module and for now I am skipping the tests... which I don't normally like to do.
I've produced this behavior on Arch Linux as well, with Cairo-1.061. The tests fail when building against cairo 1.10, but if I revert the package version to cairo 1.08, Cairo-1.061 passes all tests successfully.
On investigating this bug for Debian <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613190> I discovered that upstream now appears to be <http://gtk2-perl.sourceforge.net/> and their bugtracker has another report of this issue at <https://bugzilla.gnome.org/show_bug.cgi?id=632040>. This explains why 1.070 is in Debian/Ubuntu but not CPAN.
This issue has been fixed in Cairo 1.062. Sorry for the late response.
On Sat May 14 07:02:49 2011, TSCH wrote: Show quoted text
> This issue has been fixed in Cairo 1.062. Sorry for the late response.
I can confirm it installs perfectly now. Thank you very much for such a nice module and for taking the time to update it. I really appreciate it =)