intl/icu/source/common/utypeinfo.h:28: error: visibility does not match previous declaration: class _LIBCPP_EXCEPTION_ABI type_info

RESOLVED FIXED in Firefox 48

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jbeich, Unassigned)

Tracking

Trunk
mozilla48
Unspecified
FreeBSD
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment)

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 ICU. Any pointers? Bug 1259537 comment 1 doesn't help in this case.

c++ -o rbbi.o -c  -I/obj/dist/system_wrappers -include /m-c/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DU_COMMON_IMPLEMENTATION -DLOCALE_SNAME=92 -DUCONFIG_NO_BREAK_ITERATION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_LEGACY_CONVERSION -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DU_CHARSET_IS_UTF8 -I/m-c/config/external/icu/common -I/obj/config/external/icu/common -I/m-c/intl/icu/source/common -I/m-c/intl/icu/source/i18n -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/rbbi.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 -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++11 -pipe  -O -fomit-frame-pointer -frtti   /m-c/intl/icu/source/common/rbbi.cpp
In file included from /m-c/intl/icu/source/common/rbbi.cpp:13:
In file included from /m-c/intl/icu/source/common/utypeinfo.h:28:
In file included from /obj/dist/system_wrappers/typeinfo:3:
/usr/include/c++/v1/typeinfo:72:7: error: visibility does not match previous declaration
class _LIBCPP_EXCEPTION_ABI type_info
      ^
/usr/include/c++/v1/__config:221:47: note: expanded from macro '_LIBCPP_EXCEPTION_ABI'
#define _LIBCPP_EXCEPTION_ABI __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/804/steps/build/logs/stdio
Summary: intl/icu/source/common/utypeinfo.h:28: error: visibility does not match previous declaration → intl/icu/source/common/utypeinfo.h:28: error: visibility does not match previous declaration: class _LIBCPP_EXCEPTION_ABI type_info
OS: Unspecified → FreeBSD
Blocks: 1239083
Confirming, it builds fine with bug 1239083 reverted.
Flags: needinfo?(ted)
I don't really know enough about visibility attributes to say anything useful here. ICU does build with C++ exceptions enabled, so presumably nothing else pulled that header in in the past. Digging around a little bit does bring up https://llvm.org/bugs/show_bug.cgi?id=12947 , in which it's indicated that this might be a libc++ bug.
Flags: needinfo?(ted)
After bug 1239083 ICU itself is now built with -include config/gcc_hidden.h, so bug 1228227 just resurfaced in a different file. Once again removing the following block helps

  #if !defined(_MSC_VER)
  namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364
  #endif
Depends on: 1228227
Comment on attachment 8739927 [details]
MozReview Request: Bug 1263325 - Unbreak build with libc++ and config/gcc_hidden.h after bug 1239083. r?glandium

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/45443/diff/1-2/
Comment on attachment 8739927 [details]
MozReview Request: Bug 1263325 - Unbreak build with libc++ and config/gcc_hidden.h after bug 1239083. r?glandium

https://reviewboard.mozilla.org/r/45443/#review42173
Attachment #8739927 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/061ad34e7f0f
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.