WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
139056
[jhBuild] cairo build error (-flto)
https://bugs.webkit.org/show_bug.cgi?id=139056
Summary
[jhBuild] cairo build error (-flto)
Fabien Vallée
Reported
2014-11-26 01:27:12 PST
Using jhbuild w/ GTK port (but EFL is very likely to have same issue). Cairo fails to build on Debian Testing using binutils (2.24.90.20141023-1) : using gnu-ld : CC cairo-boilerplate-svg.lo CC cairo-boilerplate-constructors.lo /usr/bin/ld: -f may not be used without -shared collect2: error: ld returned 1 exit status Makefile:1468: recipe for target 'any2ppm' failed make[4]: *** [any2ppm] Error 1 make[4]: *** Waiting for unfinished jobs.... using gold: CCLD any2ppm CC cairo-boilerplate-xcb.lo CC cairo-boilerplate-egl.lo CC cairo-boilerplate-glx.lo CC cairo-boilerplate-script.lo CC cairo-boilerplate-ps.lo CC cairo-boilerplate-pdf.lo CC cairo-boilerplate-svg.lo CC cairo-boilerplate-constructors.lo /usr/lib/gold-ld/ld: fatal error: -f/--auxiliary may not be used without -shared collect2: error: ld returned 1 exit status Makefile:1468: recipe for target 'any2ppm' failed make[4]: *** [any2ppm] Error 1 After investigation, it seems the error is related to LTO support. Cairo has been added some lto support here :
http://cgit.freedesktop.org/cairo/commit/?id=d486ea30f1a58640a1178de74f705a73845b1cda
This commit is included in cairo package used by jhbuild (
http://www.cairographics.org/news/cairo-1.12.8
for gtk or 1.12.4 for ELF). The lto related commit has been amended here
http://cgit.freedesktop.org/cairo/commit/?id=c3645d97ebd24c6f7ad850785d585aebc706a11c
and even reverted here
http://cgit.freedesktop.org/cairo/commit/?id=c7ff9bb32e20679d6da4e8a2856be716e5bd9e12
, however we don't have theses commits. Strange thing is that lto support is already supposed to be deactivated in cairo after
http://trac.webkit.org/changeset/158866
. But it doesn't seems to work using gcc 4.9.1 / binutils 2.24.90.20141023-1.
Attachments
Patch
(4.15 KB, patch)
2014-12-10 01:42 PST
,
Fabien Vallée
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Fabien Vallée
Comment 1
2014-11-26 01:43:20 PST
The issue can be fixed in Tools/gtk/jhbuild.modules updating the cairo section: - <autotools id="cairo" autogen-sh="configure" - autogenargs="--enable-gl=yes --enable-egl=yes --enable-glx=yes ac_cv_func_rsvg_pixbuf_from_file=no" - makeargs="CFLAGS=-fno-lto CXXFLAGS=-fno-lto LDFLAGS=-fno-lto"> + <autotools id="cairo" + autogenargs="--enable-gl=yes --enable-egl=yes --enable-glx=yes ac_cv_func_rsvg_pixbuf_from_file=no --disable-lto" + makeargs=""> <dependencies> <dep package="fontconfig"/> <dep package="pixman"/> @@ -71,6 +71,7 @@ repo="cairographics.org" hash="sha256:8fbb6fc66117ab4100bad830cb4479497e53c6f3facb98bf05c8d298554ebdd9" md5sum="8b3dcade859c44fb7e56fc68edfe9a45"> + <patch file="cairo-1.12.8-add_disable-lto.patch" strip="1"/> </branch> </autotools> 1) apply cairo commit "configure.ac: Add a --disable-lto configure option"
http://cgit.freedesktop.org/cairo/commit/?id=c3645d97ebd24c6f7ad850785d585aebc706a11c
2) add the --disable-lto to autogenargs 3) remove makeargs (CFLAGS=-fno-lto CXXFLAGS=-fno-lto LDFLAGS=-fno-lto) 4) remove autogen-sh="configure" to force the updated configure.ac to be reparsed I don't think the changes are good enough to be submitted as-is (but they are good enough to fix my build and are not breaking build w/ gcc 4.8.1 / ld 2.23.2).
Lorenzo Tilve
Comment 2
2014-11-26 09:46:51 PST
I can confirm that I have applied these changes and they are also repairing my build. I think that it would be a good idea to format them and submit the patch.
Fabien Vallée
Comment 3
2014-12-10 01:42:06 PST
Created
attachment 243002
[details]
Patch
Fabien Vallée
Comment 4
2014-12-10 01:45:43 PST
uploaded patch "as-is", if anyone is willing to look at this issue, please feel free to review and/or amend and/or discard the patch and find another way to fix the build. Thanks.
Alberto Garcia
Comment 5
2014-12-10 05:59:31 PST
It works fine, thanks!
WebKit Commit Bot
Comment 6
2014-12-29 04:53:26 PST
Comment on
attachment 243002
[details]
Patch Clearing flags on attachment: 243002 Committed
r177789
: <
http://trac.webkit.org/changeset/177789
>
WebKit Commit Bot
Comment 7
2014-12-29 04:53:30 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug