FS#40313 - [cairo] build fails

Attached to Project: Arch Linux
Opened by Joel Teichroeb (klusark) - Sunday, 11 May 2014, 20:14 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 30 May 2014, 14:11 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:


(cd . && sh ./make-cairo-boilerplate-constructors.sh cairo-boilerplate-getopt.c cairo-boilerplate-system.c cairo-boilerplate.c cairo-boilerplate-xlib.c cairo-boilerplate-xcb.c cairo-boilerplate-egl.c cairo-boilerplate-glx.c cairo-boilerplate-script.c cairo-boilerplate-ps.c cairo-boilerplate-pdf.c cairo-boilerplate-svg.c ) > cairo-boilerplate-constructors.c
CC cairo-boilerplate-constructors.lo
CCLD libcairoboilerplate.la
make[5]: Leaving directory '/build/cairo/src/cairo-1.12.16/boilerplate'
CCLD cairo-sphinx
/tmp/ccIUTScz.ltrans0.ltrans.o: In function `main':
ccIUTScz.ltrans0.o:(.text.startup+0x13d): undefined reference to `cairo_boilerplate_get_target_by_name'
ccIUTScz.ltrans0.o:(.text.startup+0x191): undefined reference to `cairo_boilerplate_xmalloc'
ccIUTScz.ltrans0.o:(.text.startup+0x26d): undefined reference to `cairo_boilerplate_xmalloc'
ccIUTScz.ltrans0.o:(.text.startup+0x410): undefined reference to `cairo_boilerplate_xmalloc'
ccIUTScz.ltrans0.o:(.text.startup+0x591): undefined reference to `cairo_boilerplate_xmalloc'
ccIUTScz.ltrans0.o:(.text.startup+0x5f2): undefined reference to `cairo_boilerplate_xmalloc'
/tmp/ccIUTScz.ltrans0.ltrans.o:ccIUTScz.ltrans0.o:(.text.startup+0x673): more undefined references to `cairo_boilerplate_xmalloc' follow
/tmp/ccIUTScz.ltrans0.ltrans.o: In function `main':
ccIUTScz.ltrans0.o:(.text.startup+0x99b): undefined reference to `cairo_boilerplate_xrealloc'
ccIUTScz.ltrans0.o:(.text.startup+0xc2d): undefined reference to `cairo_boilerplate_xrealloc'
ccIUTScz.ltrans0.o:(.text.startup+0xfd7): undefined reference to `cairo_boilerplate_xrealloc'
ccIUTScz.ltrans0.o:(.text.startup+0x11ca): undefined reference to `cairo_boilerplate_xrealloc'
/tmp/ccIUTScz.ltrans1.ltrans.o: In function `_surface_create.lto_priv.8':
ccIUTScz.ltrans1.o:(.text+0x56): undefined reference to `cairo_boilerplate_xmalloc'
/tmp/ccIUTScz.ltrans1.ltrans.o: In function `get_surface_size':
ccIUTScz.ltrans1.o:(.text+0x153): undefined reference to `cairo_boilerplate_xmalloc'
/tmp/ccIUTScz.ltrans1.ltrans.o: In function `_context_create.lto_priv.9':
ccIUTScz.ltrans1.o:(.text+0x1d8): undefined reference to `cairo_boilerplate_xmalloc'
/tmp/ccIUTScz.ltrans1.ltrans.o: In function `recorder.lto_priv.11':
ccIUTScz.ltrans1.o:(.text+0xf54): undefined reference to `cairo_boilerplate_xmalloc'
ccIUTScz.ltrans1.o:(.text+0x114a): undefined reference to `cairo_boilerplate_xrealloc'
collect2: error: ld returned 1 exit status
Makefile:527: recipe for target 'cairo-sphinx' failed
make[4]: *** [cairo-sphinx] Error 1
make[4]: Leaving directory '/build/cairo/src/cairo-1.12.16/util/cairo-sphinx'
Makefile:706: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/build/cairo/src/cairo-1.12.16/util'
Makefile:498: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/build/cairo/src/cairo-1.12.16/util'
Makefile:632: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/build/cairo/src/cairo-1.12.16'
Makefile:483: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...


Steps to reproduce:
sudo extra-x86_64-build
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 30 May 2014, 14:11 GMT
Reason for closing:  Upstream
Comment by Lubosz Sarnecki (lubosz) - Tuesday, 13 May 2014, 11:01 GMT
I can reproduce this.

I experienced this when trying to build cairo from source with cerbero. But the PKGBUILD also fails.
Comment by Jan de Groot (JGC) - Tuesday, 13 May 2014, 11:48 GMT
This is a known issue upstream, caused by gcc 4.9. This can be fixed by adding "-fno-lto" to the CFLAGS, but I don't know if that is the best solution here. Allan, what do you think?
Comment by Andreas Radke (AndyRTR) - Tuesday, 13 May 2014, 18:49 GMT
This should be the upstream report: https://bugs.freedesktop.org/show_bug.cgi?id=77060

There's no fix in cairo git so far.
Comment by Lubosz Sarnecki (lubosz) - Tuesday, 13 May 2014, 18:53 GMT
The mentioned bug url is the correct upstream bug.
I was told on IRC to add "-flto -ffat-lto-objects" to CFLAGS.

When I try the flags from IRC or JGC's flags, I get a linker error in the tests directory:

/tmp/ccvkGzy8.ltrans0.ltrans.o: In function `main':
ccvkGzy8.ltrans0.o:(.text.startup+0x16eb): undefined reference to `_cairo_getopt'
collect2: error: ld returned 1 exit status
Makefile:1487: recipe for target 'cairo-test-suite' failed
make[4]: *** [cairo-test-suite] Error 1

How do I get this built?
Comment by Allan McRae (Allan) - Wednesday, 14 May 2014, 05:01 GMT
I don't think this is a gcc issue. Looks like it is an intended change in LTO handling.
Comment by Allan McRae (Allan) - Friday, 16 May 2014, 05:02 GMT
Escaping from assignees... Reassign to me if it is found to be a gcc issue.
Comment by Andreas Radke (AndyRTR) - Friday, 30 May 2014, 14:11 GMT
I'm CC'ed to the upstream bug. For workaround I've disabled LTO to make it build again.

Loading...