Closed Bug 550371 Opened 14 years ago Closed 14 years ago

mozalloc failed to build on Solaris

Categories

(Core :: XPCOM, defect)

All
Solaris
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a4

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

References

Details

Attachments

(2 files, 8 obsolete files)

Error: std::bad_alloc is not in the current exception specification.

I'm working on it.
Attached patch patch (obsolete) — Splinter Review
matches Sun C++ compiler header file
I'm not sure if it is what we want, it passed compilation.
Attachment #430490 - Flags: review?(jones.chris.g)
Attached patch patch (obsolete) — Splinter Review
Need one more change to make it build with Sun Studio 12.
SS12 throws warnings on unsupported attributes, so it passed configure.
When these attributes put together, SS12 failed to work, might be a bug of SS12.
Attachment #430490 - Attachment is obsolete: true
Attachment #430496 - Flags: review?(jones.chris.g)
Attachment #430490 - Flags: review?(jones.chris.g)
Comment on attachment 430496 [details] [diff] [review]
patch

>diff --git a/js/ctypes/tests/Makefile.in b/js/ctypes/tests/Makefile.in
>--- a/js/ctypes/tests/Makefile.in
>+++ b/js/ctypes/tests/Makefile.in
>@@ -48,17 +48,17 @@ LIBRARY_NAME = jsctypes-test
> SHORT_LIBNAME = jscttest
> FORCE_SHARED_LIB = 1
> NO_DIST_INSTALL = 1
> 
> CPPSRCS = jsctypes-test.cpp
> 
> EXTRA_DSO_LDOPTS += \
>     $(XPCOM_STANDALONE_GLUE_LDOPTS) \
>-    $(MOZALLOC_LIB) \
>+    -L$(LIBXUL_DIST)/lib $(MOZALLOC_LIB) \
>     $(NSPR_LIBS) \
>     $(NULL)
> 

This isn't my territory, calling in :bs for review.

I'm OK with the rest, r+ conditional on :bs's.
Attachment #430496 - Flags: review?(jones.chris.g)
Attachment #430496 - Flags: review?(benjamin)
Attachment #430496 - Flags: review+
I think mozalloc part of fix is not __SUNPRO_CC specific but all compilers if exception handling is enabled.

If "--enable-cpp-exceptions" is set in configure script, we will get same error.
Attached patch WIP: updated attachment 430496 (obsolete) — Splinter Review
I suppose this is more generic.

BTW, does SUNPRO_CC always enable exception handling?
Attached patch WIP: updated attachment 430496 (obsolete) — Splinter Review
Attachment #431028 - Attachment is obsolete: true
Thanks you, Takanori.

I'll update my patch based on yours.
Attached patch patch v2 (obsolete) — Splinter Review
add flags to enable/disable c++ except for sun studio compiler.
Attachment #430496 - Attachment is obsolete: true
Attachment #431052 - Attachment is obsolete: true
Attachment #431060 - Flags: review?(benjamin)
Attachment #430496 - Flags: review?(benjamin)
Attached patch patch v2 update to head (obsolete) — Splinter Review
Attachment #431060 - Attachment is obsolete: true
Attachment #432499 - Flags: review?(benjamin)
Attachment #431060 - Flags: review?(benjamin)
Attachment #432499 - Attachment is patch: true
Attachment #432499 - Attachment mime type: application/octet-stream → text/plain
Attached patch fix (obsolete) — Splinter Review
I had similar problem on mingw. I've attached my patch proposal. It integrates configure with rules.mk so that makefile ENABLE_CXX_EXCEPTIONS is always handled properly. Not tested on Solaris.
Attachment #433354 - Flags: review?(ginn.chen)
Attached patch patch v3 (obsolete) — Splinter Review
Combine Jacek's change of rules.mk
BTW: Do we still care VC++ 2003 or earlier?

Put AC_DEFINE(MOZ_CPP_EXCEPTIONS) to the right place.
Attachment #432499 - Attachment is obsolete: true
Attachment #433524 - Flags: review?(benjamin)
Attachment #432499 - Flags: review?(benjamin)
Jacek, does it work on mingw?
Attachment #433354 - Attachment is obsolete: true
Attachment #433524 - Attachment is obsolete: true
Attachment #435113 - Flags: review?(benjamin)
Attachment #435113 - Flags: feedback?(jacek)
Attachment #433524 - Flags: review?(benjamin)
Attachment #433354 - Flags: review?(ginn.chen)
Comment on attachment 435113 [details] [diff] [review]
merge after Bug 441324

Yes, it works great, thanks.
Attachment #435113 - Flags: feedback?(jacek) → feedback+
After http://hg.mozilla.org/mozilla-central/rev/2ffce4096c56
js/ctypes/tests/Makefile.in is moved to toolkit/components/ctypes/tests/Makefile.in.
Attachment #437183 - Flags: feedback?(ginn.chen)
Attachment #437183 - Flags: feedback?(ginn.chen) → feedback+
Comment on attachment 437183 [details] [diff] [review]
merge after bug 538324

>-dnl C++ exceptions (g++/egcs only - for now)
>+dnl C++ exceptions (g++/egcs/VC/irix6/Sun only - for now)

EGCS was a pre-GCC 2.95 fork. Please remove both instances of "egcs".
Attachment #435113 - Flags: review?(benjamin) → review+
http://hg.mozilla.org/mozilla-central/rev/43241b879901

comment 16 addressed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
(In reply to comment #12)
> BTW: Do we still care VC++ 2003 or earlier?
Don't worry, VC++2003 supports -EHsc anyway.
Flags: in-testsuite-
Target Milestone: --- → mozilla1.9.3a4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: