Cairo seems to raise specific issues with system headers while compiling util/cairo-trace. When I disable the compilation of cairo-trace in its Makefile the build is succesful. Reproducible: Always
1) Please post your `emerge --info' output in a comment. 2) Please attach the entire build log to this bug report.
(In reply to Jeroen Roovers from comment #1) > 1) Please post your `emerge --info' output in a comment. > 2) Please attach the entire build log to this bug report. Please provide the above requested information, thank you.
Created attachment 357910 [details] emerge --info
Created attachment 357914 [details] build.log
Still in 3.3
*** Bug 502478 has been marked as a duplicate of this bug. ***
Created attachment 382588 [details, diff] Remove libiberty include from util/cairo-trace/lookup-symbol.c
Clang seems to be stricter than GCC as far as #includes go. I have attached a patch that removes the libiberty.h include from util/cairo-trace/lookup-symbol.c. This makes the file compile. Both bfd.h and libiberty.h pull in ansidecl.h, which makes clang think there is a redefinition of the same objects. Compilation is now fine, I have yet to test run the program (cairo-trace) properly because I'm working remotely (needs a graphic environment to start applications for which to trace calls). Note that cairo *still fails tests* with both clang-3.4.2 and GCC 4.8.3, which makes me think it's not a clang issue.
Addendum: The program runs fine when invoked as "cairo-trace --help". I couldn't find references of the problem being already fixed on the web, and I'm using binutils-2.24-r3.
What is the status of this with 1.14.6?
I'm still hitting this with cairo-1.14.6 and clang/llvm-3.8.0. Applying the patch I posted is still solving the issue for me.
The patch was not sent upstream from what I can tell, this would be the first step to get it applied.
Bug opened: https://bugs.freedesktop.org/show_bug.cgi?id=96467
Even though the upstream bug is still open, I can currently compile x11-libs/cairo-1.14.8 and x11-libs/cairo-1.14.10 with clang-3.9.1 without applying any patches. Test suite passes (as long as I remove RESTRICT="test", should not be there in the first place, since it's only set to prevent circular dependencies, but that's another story). Should this bug be closed?
(In reply to moxian from comment #14) > Even though the upstream bug is still open, I can currently compile > x11-libs/cairo-1.14.8 and x11-libs/cairo-1.14.10 with clang-3.9.1 without > applying any patches. Test suite passes (as long as I remove > RESTRICT="test", should not be there in the first place, since it's only > set to prevent circular dependencies, but that's another story). > > Should this bug be closed? I think so. It also works for me with cairo-1.14.12 and clang-6.0.1.