Closed Bug 593768 Opened 12 years ago Closed 11 years ago

Remove --enable-cpp-exceptions configure option


(Firefox Build System :: General, defect)

Not set


(Not tracked)



(Reporter: halton.huo, Assigned: emorley)




(1 file, 4 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8
Build Identifier: 

On my Ubuntu 10.04, Trunk (f203095c85de) build fails when you have the following line in your mozconfig file:

 ac_add_options --enable-cpp-exceptions

c++ -o nsDependentString.o -c -I../../../dist/stl_wrappers -I../../../dist/system_wrappers -include /home/halton/work/projects/mozilla/mozilla-central/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6\" -DOSARCH=Linux -D_IMPL_NS_COM  -I/home/halton/work/projects/mozilla/mozilla-central/xpcom/string/src -I. -I../../../dist/include -I../../../dist/include/nsprpub  -I/home/halton/work/projects/mozilla/qtdebug/dist/include/nspr -I/home/halton/work/projects/mozilla/qtdebug/dist/include/nss       -fPIC  -frtti -fexceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -fno-strict-aliasing -fshort-wchar -pthread -pipe  -DDEBUG -D_DEBUG -DTRACING -g   -DMOZILLA_CLIENT -include ../../../mozilla-config.h -MD -MF .deps/nsDependentString.pp /home/halton/work/projects/mozilla/mozilla-central/xpcom/string/src/nsDependentString.cpp
In file included from ../../../dist/include/mozilla/mozalloc.h:51,
                 from ../../../dist/include/nscore.h:50,
                 from ../../../dist/include/nsStringFwd.h:45,
                 from ../../../dist/include/nsAString.h:43,
                 from ../../../dist/include/nsSubstring.h:40,
                 from ../../../dist/include/nsString.h:44,
                 from ../../../dist/include/nsDependentString.h:43,
                 from /home/halton/work/projects/mozilla/mozilla-central/xpcom/string/src/nsDependentString.cpp:40:
../../../dist/stl_wrappers/new:45:4: error: #error "STL code can only be used with -fno-exceptions"
make[1]: *** [nsDependentString.o] Error 1
make[1]: Leaving directory `/home/halton/work/projects/mozilla/qtdebug/xpcom/string/src'

My configure script is 

Adding configure options from /home/halton/work/projects/mozilla/mozilla-central/mozconfig:

Reproducible: Always
Benjamin, is this even a supported build option nowadays?  I would think that if it is the #error should be compiled out when this option is used.
I don't think we have any plans to actually make Mozilla work with C++ exceptions anytime soon, so we should just remove this broken option.
Component: XPCOM → Build Config
Ever confirmed: true
QA Contact: xpcom → build-config
Summary: Trunk builds fail when using --enable-cpp-exceptions → Remove --enable-cpp-exceptions configure option
We should remove the RTTI option while we're at it.
Summary: Remove --enable-cpp-exceptions configure option → Remove --enable-cpp-exceptions and --enable-cpp-rtti configure options
Attached patch Patch v1.0 (obsolete) — Splinter Review
This patch removes the --enable-cpp-exceptions and --enable-cpp-rtti configure options.
Assignee: nobody → mitchell.field
Attachment #473380 - Flags: review?(ted.mielczarek)
OS: Linux → All
Hardware: x86 → All
Wait. The rtti option comes in handy every time we need to figure out which timer callbacks are keeping our threads awake, like in bug 565217.
Please keep the RTTI option.
Comment on attachment 473380 [details] [diff] [review]
Patch v1.0

r- per bsmedberg. I didn't know that cpp-rtti was still useful.
Attachment #473380 - Flags: review?(ted.mielczarek) → review-
Attached patch Patch v1.1 (obsolete) — Splinter Review
This removes --enable-cpp-exceptions.
Attachment #473380 - Attachment is obsolete: true
Attachment #473542 - Flags: review?(ted.mielczarek)
Summary: Remove --enable-cpp-exceptions and --enable-cpp-rtti configure options → Remove --enable-cpp-exceptions configure option
Attachment #473542 - Flags: review?(ted.mielczarek) → review+
Attached patch Patch v1.2 (obsolete) — Splinter Review
Sorry, that last patch was incomplete. I left out the mozalloc.h changes.
Attachment #473542 - Attachment is obsolete: true
Attachment #473564 - Flags: review?(ted.mielczarek)
Attachment #473564 - Flags: review?(ted.mielczarek) → review+
Attachment #473564 - Flags: approval2.0?
Let's wait until after branch, just to keep the tree clear for more important stuff.
Attachment #473564 - Flags: approval2.0? → approval2.0-
Just came across this bug and I think we are now far enough after the branch ;)
Attached patch Patch v1.2 rebased (obsolete) — Splinter Review
As last patch but updated to tip. Couple of hunks less now, since the Irix sections in configure have been removed by bug 680792.
Attachment #473564 - Attachment is obsolete: true
Comment on attachment 566499 [details] [diff] [review]
Patch v1.2 rebased

Ted, this has received r+ a year ago, but just wanted to:
- Confirm this is still wanted
- Ask what you wanted done about the |AC_DEFINE(CPP_THROW_NEW, [throw()])| (here:, now that has landed since.

Builds fine locally using MSVC2010, but will obviously send to try too before pushing.
Attachment #566499 - Flags: review?(ted.mielczarek)
Taking bug, just so this shows up on my searches. Mitch, hope that's ok :-) If you'd rather take over, that's fine. Patch author will be left as you obviously either way.
Assignee: mitchell.field → bmo
Flags: in-testsuite-
Attachment #566499 - Flags: review?(ted.mielczarek) → review+
Attached patch Patch v1.3Splinter Review
Updated to tip + mozalloc.h changes omitted since they've landed in bug 695171 since.
Attachment #566499 - Attachment is obsolete: true
Target Milestone: --- → mozilla10
Version: unspecified → Trunk
Closed: 11 years ago
Resolution: --- → FIXED
Blocks: 724700
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.