mozalloc failed to build on Solaris

RESOLVED FIXED in mozilla1.9.3a4

Status

()

Core
XPCOM
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Ginn Chen, Assigned: Ginn Chen)

Tracking

Trunk
mozilla1.9.3a4
All
Solaris
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 8 obsolete attachments)

(Assignee)

Description

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

I'm working on it.
(Assignee)

Comment 1

8 years ago
Created attachment 430490 [details] [diff] [review]
patch

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)
(Assignee)

Comment 2

8 years ago
Created attachment 430496 [details] [diff] [review]
patch

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+

Comment 4

8 years ago
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.

Comment 5

8 years ago
Created attachment 431028 [details] [diff] [review]
WIP: updated attachment 430496 [details] [diff] [review]

I suppose this is more generic.

BTW, does SUNPRO_CC always enable exception handling?

Comment 6

8 years ago
Created attachment 431052 [details] [diff] [review]
WIP: updated attachment 430496 [details] [diff] [review]
Attachment #431028 - Attachment is obsolete: true

Comment 7

8 years ago
(In reply to comment #6)
> WIP: updated attachment 430496 [details] [diff] [review]
WIP: updated attachment 431028 [details] [diff] [review].
(Assignee)

Comment 8

8 years ago
Thanks you, Takanori.

I'll update my patch based on yours.
(Assignee)

Comment 9

8 years ago
Created attachment 431060 [details] [diff] [review]
patch v2

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)
Blocks: 441324
(Assignee)

Comment 10

8 years ago
Created attachment 432499 [details] [diff] [review]
patch v2 update to head
Attachment #431060 - Attachment is obsolete: true
Attachment #432499 - Flags: review?(benjamin)
Attachment #431060 - Flags: review?(benjamin)

Updated

8 years ago
Attachment #432499 - Attachment is patch: true
Attachment #432499 - Attachment mime type: application/octet-stream → text/plain

Comment 11

8 years ago
Created attachment 433354 [details] [diff] [review]
fix

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.

Updated

8 years ago
Attachment #433354 - Flags: review?(ginn.chen)
(Assignee)

Comment 12

8 years ago
Created attachment 433524 [details] [diff] [review]
patch v3

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)
(Assignee)

Comment 13

8 years ago
Created attachment 435113 [details] [diff] [review]
merge after Bug 441324

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 14

8 years ago
Comment on attachment 435113 [details] [diff] [review]
merge after Bug 441324

Yes, it works great, thanks.
Attachment #435113 - Flags: feedback?(jacek) → feedback+

Comment 15

8 years ago
Created attachment 437183 [details] [diff] [review]
merge after bug 538324

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)
(Assignee)

Updated

8 years ago
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".

Updated

8 years ago
Attachment #435113 - Flags: review?(benjamin) → review+
(Assignee)

Comment 17

8 years ago
http://hg.mozilla.org/mozilla-central/rev/43241b879901

comment 16 addressed.
Status: NEW → RESOLVED
Last Resolved: 8 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
Blocks: 552635
You need to log in before you can comment on or make changes to this bug.