Enable STL wrappers on Android

RESOLVED FIXED in Firefox 49

Status

defect
RESOLVED FIXED
3 years ago
Last year

People

(Reporter: jbeich, Unassigned)

Tracking

Trunk
mozilla49
Unspecified
Android
Dependency tree / graph

Firefox Tracking Flags

(firefox49 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

793 bytes, patch
glandium
: review+
Details | Diff | Splinter Review
Reporter

Description

3 years ago
Posted patch v1 (obsolete) — Splinter Review
After Android switches to libc++ it can use the same code as Linux. This should also help Tier3 with libc++ from regressing build.

vanilla: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e1ba1be3a634
bug 1269171: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1fe4c1b1d1a6
bug 1259537: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d1f6ad2262b7
Attachment #8747582 - Flags: review?(mh+mozilla)
Attachment #8747582 - Flags: feedback?(nfroyd)
Reporter

Comment 1

3 years ago
This bug is mainly about dogfooding. For OS X one may need to investigate the relationship between -Idist/system_wrappers (bug 273336) and -Idist/stl_wrappers (bug 551254).

If there's no actual benefit I'll make Bitrig, FreeBSD and (unlikely) Linux with libc++ flee from STL wrappers as well. Tier3 has to follow Tier1 closely in order to survive: OS X and Android are soon to converge on libc++ but both don't use STL wrappers which sends a message (for new platforms) they're only supported with libstdc++.
Comment on attachment 8747582 [details] [diff] [review]
v1

Review of attachment 8747582 [details] [diff] [review]:
-----------------------------------------------------------------

Sure.
Attachment #8747582 - Flags: feedback?(nfroyd) → feedback+
Comment on attachment 8747582 [details] [diff] [review]
v1

Review of attachment 8747582 [details] [diff] [review]:
-----------------------------------------------------------------

::: old-configure.in
@@ +1672,5 @@
>    esac
>  fi         # GNU_CC
>  
>  case "${OS_TARGET}" in
> +WINNT|Darwin)

We should probably enable it on OSX too. Note it's already enabled on Windows with MSVC, cf. the test for MOZ_MSVC_STL_WRAP_RAISE. I'm not sure why we're not enabling this for mingw GCC too...
Attachment #8747582 - Flags: review?(mh+mozilla) → review+
Georg, was it you doing mingw GCC builds of Tor browser? If so, would you mind testing if removing the case for WINNT (see patch attached to this bug) works for you, and if not, report how it fails?
Flags: needinfo?(gk)
Reporter

Comment 5

3 years ago
(In reply to Mike Hommey [:glandium] from comment #3)
> We should probably enable it on OSX too.

OS X needs more work. Bug 1269790 obsoleted bug 1246743, so I assume OS X uses libc++ now.

python2.7 /m-c/sccache/sccache.py /m-c/clang/bin/clang++ -arch x86_64 -std=gnu++11 -o TextureImageCGL.o -c -I/obj/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_MACOSX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/m-c/gfx/gl -I/obj/gfx/gl -I/obj/ipc/ipdl/_ipdlheaders -I/m-c/ipc/chromium/src -I/m-c/ipc/glue -I/m-c/gfx/skia -I/m-c/gfx/skia/skia/include/config -I/m-c/gfx/skia/skia/include/core -I/m-c/gfx/skia/skia/include/gpu -I/m-c/gfx/skia/skia/include/utils -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/TextureImageCGL.o.pp -Qunused-arguments  -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 -Werror=non-literal-null-conversion -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 -isysroot /Developer/SDKs/MacOSX10.7.sdk -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe  -g -O3 -fno-omit-frame-pointer  -Werror -I/obj/dist/include/cairo -Wshadow -fobjc-exceptions   /m-c/gfx/gl/TextureImageCGL.mm
In file included from /m-c/gfx/gl/GLContextProviderCGL.mm:6:
In file included from /m-c/gfx/gl/GLContextProvider.h:13:
In file included from /obj/dist/include/nsSize.h:11:
In file included from /obj/dist/include/mozilla/gfx/Point.h:13:
In file included from /obj/dist/include/mozilla/gfx/BasePoint.h:10:
/obj/dist/stl_wrappers/ostream:14:4: error: "STL code can only be used with -fno-exceptions"
#  error "STL code can only be used with -fno-exceptions"
   ^

https://treeherder.mozilla.org/#/jobs?repo=try&revision=7a8ded113b94

Comment 6

3 years ago
(In reply to Mike Hommey [:glandium] from comment #4)
> Georg, was it you doing mingw GCC builds of Tor browser? If so, would you
> mind testing if removing the case for WINNT (see patch attached to this bug)
> works for you, and if not, report how it fails?

Yes and, yes, I can do that. I put it on my ToDo list for next week.
Flags: needinfo?(gk)

Comment 7

3 years ago
(In reply to Georg Koppen from comment #6)
> (In reply to Mike Hommey [:glandium] from comment #4)
> > Georg, was it you doing mingw GCC builds of Tor browser? If so, would you
> > mind testing if removing the case for WINNT (see patch attached to this bug)
> > works for you, and if not, report how it fails?
> 
> Yes and, yes, I can do that. I put it on my ToDo list for next week.

Removing "WINNT|" still allows me to cross-compile with mingw-w64/GCC.
Reporter

Comment 8

3 years ago
Fresh Try build after bug 1269171 (different version):
https://treeherder.mozilla.org/#/jobs?repo=try&revision=082bc67b662b
Reporter

Comment 9

3 years ago
Attachment #8747582 - Attachment is obsolete: true
Attachment #8753646 - Flags: review?(mh+mozilla)
Comment on attachment 8753646 [details] [diff] [review]
v2 (android + windows/mingw)

Review of attachment 8753646 [details] [diff] [review]:
-----------------------------------------------------------------

Can you file a followup for OSX, possibly with a copy/paste of the errors that show up when trying that?
Attachment #8753646 - Flags: review?(mh+mozilla) → review+
Reporter

Updated

3 years ago
See Also: → 1274334
Reporter

Updated

3 years ago
Keywords: checkin-needed

Comment 12

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7340f8d06cf0
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
(In reply to Georg Koppen from comment #7)
> (In reply to Georg Koppen from comment #6)
> > (In reply to Mike Hommey [:glandium] from comment #4)
> > > Georg, was it you doing mingw GCC builds of Tor browser? If so, would you
> > > mind testing if removing the case for WINNT (see patch attached to this bug)
> > > works for you, and if not, report how it fails?
> > 
> > Yes and, yes, I can do that. I put it on my ToDo list for next week.
> 
> Removing "WINNT|" still allows me to cross-compile with mingw-w64/GCC.

I get following errors

/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `std::__throw_bad_exception()':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/src/c++11/../../../../../libstdc++-v3/src/c++11/functexcept.cc:55: multiple definition of `std::__throw_bad_exception()'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt21__throw_bad_exceptionv[_ZSt21__throw_bad_exceptionv]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_bad_alloc()'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt17__throw_bad_allocv[_ZSt17__throw_bad_allocv]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_bad_cast()'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt16__throw_bad_castv[_ZSt16__throw_bad_castv]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_bad_typeid()'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt18__throw_bad_typeidv[_ZSt18__throw_bad_typeidv]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_logic_error(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt19__throw_logic_errorPKc[_ZSt19__throw_logic_errorPKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_domain_error(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt20__throw_domain_errorPKc[_ZSt20__throw_domain_errorPKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_invalid_argument(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt24__throw_invalid_argumentPKc[_ZSt24__throw_invalid_argumentPKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_length_error(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt20__throw_length_errorPKc[_ZSt20__throw_length_errorPKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_out_of_range(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt20__throw_out_of_rangePKc[_ZSt20__throw_out_of_rangePKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_runtime_error(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt21__throw_runtime_errorPKc[_ZSt21__throw_runtime_errorPKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_range_error(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt19__throw_range_errorPKc[_ZSt19__throw_range_errorPKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_overflow_error(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt22__throw_overflow_errorPKc[_ZSt22__throw_overflow_errorPKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_underflow_error(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt23__throw_underflow_errorPKc[_ZSt23__throw_underflow_errorPKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_ios_failure(char const*)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt19__throw_ios_failurePKc[_ZSt19__throw_ios_failurePKc]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_system_error(int)'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt20__throw_system_errori[_ZSt20__throw_system_errori]+0x0): first defined here
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libstdc++.a(functexcept.o): In function `__exchange_and_add':
/builddir/build/BUILD/gcc-4.9.3/build_win64/x86_64-w64-mingw32/libstdc++-v3/include/ext/atomicity.h:49: multiple definition of `std::__throw_bad_function_call()'
../misc/TimeStamp.o:TimeStamp.cpp:(.text$_ZSt25__throw_bad_function_callv[_ZSt25__throw_bad_function_callv]+0x0): first defined here

Updated

2 years ago
Depends on: 1392604

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.