Closed
Bug 1259537
Opened 8 years ago
Closed 8 years ago
gfx/graphite2/src/Bidi.cpp: error: visibility does not match previous declaration __throw_bad_alloc
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox47 unaffected, firefox48 fixed, firefox49 fixed)
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox47 | --- | unaffected |
firefox48 | --- | fixed |
firefox49 | --- | fixed |
People
(Reporter: jbeich, Unassigned)
References
Details
(Keywords: regression)
Attachments
(2 files)
58 bytes,
text/x-review-board-request
|
glandium
:
review+
lizzard
:
approval-mozilla-aurora+
|
Details |
151.56 KB,
application/x-gzip
|
Details |
FreeBSD uses libc++ and config/gcc_hidden.h which build, recently, regressed. Aurora isn't affected yet. Workarounds are either to use -fvisibility=hidden instead (like OS X) or go with system graphite2 (bug 847568). Any pointers? c++ -o Unified_cpp_gfx_graphite2_src0.o -c -I/obj/dist/stl_wrappers -I/obj/dist/system_wrappers -include /m-c/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DGRAPHITE2_STATIC '-DPACKAGE_VERSION="moz"' '-DPACKAGE_BUGREPORT="http://bugzilla.mozilla.org/"' -DGRAPHITE2_NFILEFACE -DGRAPHITE2_NTRACING -DGRAPHITE2_NSEGCACHE '-DGRAPHITE2_CUSTOM_HEADER="MozGrMalloc.h"' -I/m-c/gfx/graphite2/src -I/obj/gfx/graphite2/src -I/obj/dist/include -I/obj/dist/include/nspr -I/obj/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /obj/mozilla-config.h -MD -MP -MF .deps/Unified_cpp_gfx_graphite2_src0.o.pp -Qunused-arguments -I/usr/local/include -Qunused-arguments -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wc++11-compat-pedantic -Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-compat -Wclass-varargs -Wimplicit-fallthrough -Wloop-analysis -Wthread-safety -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pipe -O -fomit-frame-pointer /obj/gfx/graphite2/src/Unified_cpp_gfx_graphite2_src0.cpp In file included from /obj/gfx/graphite2/src/Unified_cpp_gfx_graphite2_src0.cpp:2: In file included from /m-c/gfx/graphite2/src/Bidi.cpp:27: In file included from /m-c/gfx/graphite2/src/inc/Main.h:33: In file included from /m-c/gfx/graphite2/src/MozGrMalloc.h:13: In file included from /obj/dist/include/mozilla/mozalloc.h:18: In file included from /obj/dist/stl_wrappers/new:33: In file included from /obj/dist/system_wrappers/new:3: /usr/include/c++/v1/new:115:1: error: visibility does not match previous declaration _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec ^ /usr/include/c++/v1/__config:197:42: note: expanded from macro '_LIBCPP_FUNC_VIS' #define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default"))) ^ /m-c/config/gcc_hidden.h:6:13: note: previous attribute is here #pragma GCC visibility push(hidden) ^ 1 error generated. http://buildbot.rhaalovely.net/builders/mozilla-central-freebsd-amd64/builds/789/steps/build/logs/stdio
Removing -DGRAPHITE2_CUSTOM_HEADER= from CXXFLAGS doesn't help. In file included from /obj/gfx/graphite2/src/Unified_cpp_gfx_graphite2_src0.cpp:2: In file included from /m-c/gfx/graphite2/src/Bidi.cpp:28: In file included from /m-c/gfx/graphite2/src/inc/Slot.h:32: In file included from /m-c/gfx/graphite2/src/inc/Font.h:28: In file included from /obj/dist/stl_wrappers/cassert:33: In file included from /obj/dist/system_wrappers/new:3: /usr/include/c++/v1/new:115:1: error: visibility does not match previous declaration _LIBCPP_FUNC_VIS void __throw_bad_alloc(); // not in C++ spec ^ /usr/include/c++/v1/__config:197:42: note: expanded from macro '_LIBCPP_FUNC_VIS' #define _LIBCPP_FUNC_VIS __attribute__ ((__visibility__("default"))) ^ /m-c/config/gcc_hidden.h:6:13: note: previous attribute is here #pragma GCC visibility push(hidden) ^ 1 error generated.
g++5 with libc++ builds fine that code. Downgrading clang to 3.4-3.7 or libc++ to version shipped with FreeBSD 10.1 doesn't help. $ c++ -v FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) Target: x86_64-unknown-freebsd11.0 Thread model: posix InstalledDir: /usr/bin
Updated•8 years ago
|
Component: Graphics: Text → Build Config
After bug 1245076 mozalloc/throw_gcc.h can screw up __throw_bad_alloc() visibility if included *before* any C++ header that pulls <new>. As only libstdc++ needs <cstdlib> workaround it should be hidden behind #if defined(__GLIBCXX__). Mike, any plan to switch OS X to config/gcc_hidden.h after 10.6-10.8 are deprecated? It'd help with damage control from libstdc++ hacks
Review commit: https://reviewboard.mozilla.org/r/45471/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/45471/
Attachment #8739971 -
Flags: review?(mh+mozilla)
Comment on attachment 8739971 [details] MozReview Request: Bug 1259537 - Unbreak libc++ build after bug 1245076. r?glandium Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45471/diff/1-2/
Comment on attachment 8739971 [details] MozReview Request: Bug 1259537 - Unbreak libc++ build after bug 1245076. r?glandium Breaks build with GCC 6.x. Also, memory thrashing from GCC builds makes me want to give up.
Attachment #8739971 -
Attachment is obsolete: true
Attachment #8739971 -
Flags: review?(mh+mozilla)
Comment on attachment 8739971 [details] MozReview Request: Bug 1259537 - Unbreak libc++ build after bug 1245076. r?glandium Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45471/diff/2-3/
Attachment #8739971 -
Attachment description: MozReview Request: Bug 1259537 - Unbreak build with libc++ and config/gcc_hidden.h after bug 1245076. r?glandium → MozReview Request: Bug 1259537 - Unbreak libc++ build after bug 1245076. r?glandium
Attachment #8739971 -
Attachment is obsolete: false
Attachment #8739971 -
Flags: review?(mh+mozilla)
Comment 9•8 years ago
|
||
Please attach the preprocessor output for the file that fails to build. The error on its own doesn't make any sense.
Reporter | ||
Comment 10•8 years ago
|
||
Generated by |c++ -E|. To reproduce run: $ clang++ -m64 -std=gnu++11 -fPIC -Qunused-arguments -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wc++11-compat-pedantic -Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-compat -Wclass-varargs -Wimplicit-fallthrough -Wloop-analysis -Wthread-safety -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -O -fomit-frame-pointer -c Unified_cpp_gfx_graphite2_src0.cpp In file included from /obj/gfx/graphite2/src/Unified_cpp_gfx_graphite2_src0.cpp:2: In file included from /m-c/gfx/graphite2/src/Bidi.cpp:27: In file included from /m-c/gfx/graphite2/src/inc/Main.h:33: In file included from /m-c/gfx/graphite2/src/MozGrMalloc.h:13: In file included from /obj/dist/include/mozilla/mozalloc.h:18: In file included from /obj/dist/stl_wrappers/new:33: In file included from /obj/dist/system_wrappers/new:4: /usr/include/c++/v1/new:115:17: error: visibility does not match previous declaration __attribute__ ((__visibility__("default"))) void __throw_bad_alloc(); ^ /m-c/config/gcc_hidden.h:6:13: note: previous attribute is here #pragma GCC visibility push(hidden) ^ 1 error generated.
Attachment #8748073 -
Flags: feedback?(mh+mozilla)
Comment 11•8 years ago
|
||
Try adding throw_gcc.h to config/system-headers.
Updated•8 years ago
|
Attachment #8748073 -
Flags: feedback?(mh+mozilla)
Reporter | ||
Comment 12•8 years ago
|
||
Confirm. It builds fine with mozilla/throw_gcc.h in config/system-headers.
Updated•8 years ago
|
Attachment #8739971 -
Flags: review?(mh+mozilla)
Reporter | ||
Comment 13•8 years ago
|
||
Comment on attachment 8739971 [details] MozReview Request: Bug 1259537 - Unbreak libc++ build after bug 1245076. r?glandium Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45471/diff/3-4/
Attachment #8739971 -
Flags: review?(mh+mozilla)
Keywords: regression
Updated•8 years ago
|
Attachment #8739971 -
Flags: review?(mh+mozilla) → review+
Comment 14•8 years ago
|
||
Comment on attachment 8739971 [details] MozReview Request: Bug 1259537 - Unbreak libc++ build after bug 1245076. r?glandium https://reviewboard.mozilla.org/r/45471/#review47477
Keywords: checkin-needed
Comment 15•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/116d55d2af93
Keywords: checkin-needed
Reporter | ||
Comment 16•8 years ago
|
||
Comment on attachment 8739971 [details] MozReview Request: Bug 1259537 - Unbreak libc++ build after bug 1245076. r?glandium Approval Request Comment [Feature/regressing bug #]: bug 1245076 regression [User impact if declined]: broken build on Bitrig and FreeBSD [Describe test coverage new/current, TreeHerder]: m-i, m-c soon [Risks and why]: Low, can only break build. [String/UUID change made/needed]: None
Attachment #8739971 -
Flags: approval-mozilla-aurora?
Comment 17•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/116d55d2af93
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Comment 18•8 years ago
|
||
Comment on attachment 8739971 [details] MozReview Request: Bug 1259537 - Unbreak libc++ build after bug 1245076. r?glandium Fix for build issue, please uplift to aurora
Attachment #8739971 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 19•8 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-aurora/rev/bf290651a401
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•