Closed Bug 413226 Opened 12 years ago Closed 8 years ago

GCC spews thousands of visibility warnings when compiling Cairo

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: mats, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

GCC spews thousands of visibility warnings when compiling Cairo:

cairoint.h:2192: warning: redeclaration of '_moz_cairo_clip_preserve' with different visibility (old visibility preserved)
cairo.h:649: warning: previous declaration of '_moz_cairo_clip_preserve' was here
cairoint.h:2193: warning: redeclaration of '_moz_cairo_close_path' with different visibility (old visibility preserved)
cairo.h:585: warning: previous declaration of '_moz_cairo_close_path' was here

This is a problem we need to fix since it makes it hard to see warnings
that flags real problems (bug 413169 as an example).
In case it's a local problem, this is Ubuntu 7.10 x86_64 with gcc:
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
BTW, it also doesn't have the desired effect (if I understand the
purpose of these macros correctly).

"objdump -x libthebes.so" tells me:
00039e90 g F .text  0000002f INT__moz_cairo_clip_preserve
00039e90 g F .text  0000002f _moz_cairo_clip_preserve

I think what is desired is something like this:
00038370 l F .text  0000002f .hidden INT__moz_cairo_clip_preserve
00038370 g F .text  0000002f _moz_cairo_clip_preserve
Attached patch hackSplinter Review
FWIW, this hack seems to give the desired result.
Blocks: 413984
Jeff, is there any chance of getting this hack (or a non-hack accomplishing the same thing) in the tree?
Blocks: buildwarning
Whiteboard: [build_warning]
I believe this has been fixed with a cairo update.

Please reopen if you can still reproduce this.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
The warnings about visibility are gone on trunk.  I still get 352 other
warnings when compiling gfx/cairo/
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.