Last Comment Bug 593768 - Remove --enable-cpp-exceptions configure option
: Remove --enable-cpp-exceptions configure option
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: Ed Morley [:emorley]
:
Mentors:
Depends on:
Blocks: 724700
  Show dependency treegraph
 
Reported: 2010-09-06 01:54 PDT by Halton Huo
Modified: 2012-02-06 15:16 PST (History)
13 users (show)
emorley: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1.0 (25.33 KB, patch)
2010-09-08 20:29 PDT, Mitchell Field [:Mitch]
ted: review-
Details | Diff | Review
Patch v1.1 (17.20 KB, patch)
2010-09-09 07:44 PDT, Mitchell Field [:Mitch]
ted: review+
Details | Diff | Review
Patch v1.2 (20.80 KB, patch)
2010-09-09 08:38 PDT, Mitchell Field [:Mitch]
ted: review+
benjamin: approval2.0-
Details | Diff | Review
Patch v1.2 rebased (15.89 KB, patch)
2011-10-12 05:18 PDT, Ed Morley [:emorley]
ted: review+
Details | Diff | Review
Patch v1.3 (12.23 KB, patch)
2011-10-21 09:07 PDT, Ed Morley [:emorley]
no flags Details | Diff | Review

Description Halton Huo 2010-09-06 01:54:12 PDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) 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:
  --prefix=/usr
  --libdir=/usr/lib
  --with-system-jpeg
  --with-system-zlib
  --enable-debug
  --disable-optimize
  --enable-logging
  --disable-tests
  --disable-installer
  --disable-crashreporter
  --disable-javaxpcom
  --enable-printing
  --disable-embedding-tests
  --disable-elf-dynstr-gc
  --disable-updater
  --enable-meego
  --enable-meegotouch
  --enable-application=mobile
  --disable-necko-wifi
  --disable-accessibility
  --disable-thumb2
  --enable-gstreamer
  --enable-cpp-rtti
  --enable-cpp-exceptions
  --enable-default-toolkit=cairo-qt


Reproducible: Always
Comment 1 Boris Zbarsky [:bz] 2010-09-06 08:57:54 PDT
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.
Comment 2 Ted Mielczarek [:ted.mielczarek] 2010-09-08 07:45:45 PDT
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.
Comment 3 Mitchell Field [:Mitch] 2010-09-08 20:22:20 PDT
We should remove the RTTI option while we're at it.
Comment 4 Mitchell Field [:Mitch] 2010-09-08 20:29:25 PDT
Created attachment 473380 [details] [diff] [review]
Patch v1.0

This patch removes the --enable-cpp-exceptions and --enable-cpp-rtti configure options.
Comment 5 Ben Turner (not reading bugmail, use the needinfo flag!) 2010-09-08 21:57:21 PDT
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.
Comment 6 Benjamin Smedberg [:bsmedberg] 2010-09-09 04:05:52 PDT
Please keep the RTTI option.
Comment 7 Ted Mielczarek [:ted.mielczarek] 2010-09-09 07:35:19 PDT
Comment on attachment 473380 [details] [diff] [review]
Patch v1.0

r- per bsmedberg. I didn't know that cpp-rtti was still useful.
Comment 8 Mitchell Field [:Mitch] 2010-09-09 07:44:41 PDT
Created attachment 473542 [details] [diff] [review]
Patch v1.1

This removes --enable-cpp-exceptions.
Comment 9 Mitchell Field [:Mitch] 2010-09-09 08:38:57 PDT
Created attachment 473564 [details] [diff] [review]
Patch v1.2

Sorry, that last patch was incomplete. I left out the mozalloc.h changes.
Comment 10 Benjamin Smedberg [:bsmedberg] 2010-11-01 08:03:04 PDT
Let's wait until after branch, just to keep the tree clear for more important stuff.
Comment 11 Johannes Pfrang [:johnp] 2011-06-17 10:50:19 PDT
Just came across this bug and I think we are now far enough after the branch ;)
Comment 12 Ed Morley [:emorley] 2011-10-12 05:18:40 PDT
Created attachment 566499 [details] [diff] [review]
Patch v1.2 rebased

As last patch but updated to tip. Couple of hunks less now, since the Irix sections in configure have been removed by bug 680792.
Comment 13 Ed Morley [:emorley] 2011-10-12 05:29:48 PDT
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: https://bugzilla.mozilla.org/attachment.cgi?id=566499&action=diff#a/configure.in_sec5), now that http://hg.mozilla.org/mozilla-central/diff/78af9261582f/configure.in#l1.100 has landed since.

Builds fine locally using MSVC2010, but will obviously send to try too before pushing.
Comment 14 Ed Morley [:emorley] 2011-10-12 05:32:49 PDT
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.
Comment 15 Ed Morley [:emorley] 2011-10-21 09:07:18 PDT
Created attachment 568663 [details] [diff] [review]
Patch v1.3

Updated to tip + mozalloc.h changes omitted since they've landed in bug 695171 since.
Comment 17 Ed Morley [:emorley] 2011-10-22 06:07:36 PDT
https://hg.mozilla.org/mozilla-central/rev/838ec216947e

Note You need to log in before you can comment on or make changes to this bug.