I've compiled gnuplot to include pdfcairo support. When I try to run it, it segfaults. In my make.conf, I do have -ggdb and splitdebug set, but sadly that doesn't work, so this is all I can get from gdb: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000000000000001c 0x0000000100755bb6 in cairo_surface_get_font_options () (gdb) where #0 0x0000000100755bb6 in cairo_surface_get_font_options () #1 0x00000001002201f7 in _pango_cairo_update_context () #2 0x0000000100220473 in pango_cairo_create_context () #3 0x00000001002204ba in pango_cairo_create_layout () #4 0x00000001000d0501 in gp_cairo_set_termvar () #5 0x00000001000905fd in cairotrm_set_font () #6 0x0000000100090a7f in cairotrm_graphics () #7 0x00000001000aebba in term_start_plot () #8 0x0000000100036eb7 in do_plot () #9 0x0000000100056ba6 in plotrequest () #10 0x000000010000c773 in do_line () #11 0x0000000100048770 in load_file () #12 0x00000001000512be in main () It doesn't crash when I replace the pdfcairo with something else like png. These are my USE flags for these packages: [ebuild R ] sci-visualization/gnuplot-4.4.3 USE="cairo gd readline -X -doc -emacs (-ggi) -latex -lua -plotutils -svga -thin-splines -wxwidgets -xemacs" 0 kB [ebuild R ] x11-libs/cairo-1.10.2-r1 USE="aqua glib svg -X -debug (-directfb) -doc (-drm) (-gallium) -opengl (-openvg) -qt4 -static-libs -xcb" 0 kB [ebuild R *] x11-libs/pango-1.28.4 USE="introspection -X -debug -doc -test" 0 kB Reproducible: Always
Here's a really simple way to get it to segfault: gnuplot> set terminal pdfcairo Terminal type set to 'pdfcairo' Options are ' size 5.00in, 3.00in ' gnuplot> set output "test.pdf" gnuplot> plot 1 w lines Warning: empty y range [1:1], adjusting to [0.99:1.01] Segmentation fault I was trying something more complex before.
Can anyone help me figure out how to get more debug info for this? The debug USE flag doesn't do anything. gdb gives me lots of errors about being unable to find .o files, like this: warning: Could not find object file "/Users/millerti/Gentoo/var/tmp/portage/dev-libs/expat-2.0.1-r3/work/expat-2.0.1/lib/.libs/xmlrole.o" - no debug information available for "lib/xmlrole.c". Of course, I'm not surprised that there are no .o files under /var/tmp/portage. They'd have been cleaned up after the package was installed. Does splitdebug not work at all for Prefix? (This is on a Mac, BTW.)
IIRC, there's a problem with cairo 1.10 and ppc - your example doesn't segfault on x86.
I'm on x86. It segfaults for me.
I do not get any segfault either on ~x86: $ gnuplot G N U P L O T Version 4.4 patchlevel 3 (Gentoo revision r1) last modified Sat May 21 09:40:30 CEST 2011 System: Linux 3.0.4 Copyright (C) 1986-1993, 1998, 2004, 2007-2010 Thomas Williams, Colin Kelley and many others gnuplot home: http://www.gnuplot.info faq, bugs, etc: type "help seeking-assistance" immediate help: type "help" plot window: hit 'h' Terminal type set to 'x11' gnuplot> set terminal pdfcairo Terminal type set to 'pdfcairo' Options are ' size 5.00in, 3.00in ' gnuplot> set output "test.pdf" gnuplot> plot 1 w lines Warning: empty y range [1:1], adjusting to [0.99:1.01] gnuplot> Regarding you missing debug information, I have: /etc/make.conf: CFLAGS="-O2 -march=pentium4m -mmmx -msse -msse2 -pipe -fno-strict-aliasing -ggdb" FEATURES="splitdebug nostrip" /etc/local.d/baselayout1.start: echo "/var/dumps/core.%e.%p"> /proc/sys/kernel/core_pattern sysctl -w fs.suid_dumpable=2 $ ls -lad /var/dumps/ drwxrwxrwt 2 root root 32768 Sep 20 23:35 /var/dumps/ $ Actually, please vote for bugs #289364 and #289483, took me 15 minutes to find my own reports to give you the links. Grr.
(In reply to comment #4) > I'm on x86. It segfaults for me. @Timothy, Does this problem still persist with gngplot-4.4.4 and cairo-1.10.2-r1 ?
I gave up on trying to get pdfcairo to work. Instead, I emit eps and convert to pdf externally.