Closed Bug 519401 Opened 15 years ago Closed 15 years ago

js-ctypes failed to compile on Solaris with Sun Studio compiler

Categories

(Core :: js-ctypes, defect)

All
OpenSolaris
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- beta5-fixed

People

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

Details

Attachments

(1 file)

      No description provided.
Can you give the compiler output?
Sorry, I was in a hurry and didn't give the information.

First problem I met was -Wall is not acceptable for Sun Studio compiler.
Then I got undefined symbol of FFI_DEFAULT_ABI on compiling debug.c.
I assume, based on your comment, that it's breaking in the libffi build. If it's passing -Wall then libffi clearly can't deal with Sun Studio properly.

FFI_DEFAULT_ABI is defined unconditionally in js/ctypes/libffi/src/sparc/ffitarget.h, so I'm further assuming that the compiler flags are so wrong that the file isn't getting included properly.

Can you please attach full clobber build output? I need to see the result of libffi's configure, and libffi's build. You may need to gzip it.

If we can't figure it out we'll turn off jsctypes for Sun Studio.
Product: Other Applications → Core
Version: 1.9.2 Branch → unspecified
I can managed to get it built now.

It has 3 problems.
1) -Wall, -fexceptions are not valid for Sun Studio compiler.
How can I test with_gcc or something else in Makefile.in?

2) In ffitarget.h, Sun Studio doesn't define __i386__ and __x86_64__.
We can add || defined(__i386) and || defined (__x86_64).

3) ffi_common.h
FFI_ASSERT_AT should use (void)0.
(In reply to comment #4)
> It has 3 problems.
> 1) -Wall, -fexceptions are not valid for Sun Studio compiler.
> How can I test with_gcc or something else in Makefile.in?

ifdef GNU_CC

(or GNU_CXX, depending on which you really mean)
wait, which build system is this, the libffi one or Mozilla's? We just took libffi straight from their SVN, so you'll need to patch it upstream without reference to Mozilla's system, I think.
I think ifdef GNU_CC or GNU_CXX would not work because libffi's Makefile.in doesn't have a reference to Mozilla's system.
I just realized it's not going to work with Sun Studio at this moment, since it doesn't support __attribute__ ((regparm(1))).

So I've to use gcc for libffi.

The change for x86/ffitarget.h will be integrated into libffi-3.0.9rc2.
Assignee: nobody → ginn.chen
Status: NEW → ASSIGNED
Attachment #406115 - Flags: review?(benjamin)
Comment on attachment 406115 [details] [diff] [review]
patch (use CC=gcc for configure on Solaris)

The configure bit is fine, I guess, but I'm not hot on taking local changes to libffi. Have you submitted that patch upstream?
Attachment #406115 - Flags: review?(benjamin) → review?(dwitte)
Anthony Green <green@redhat.com> said he will do it in 3.0.9rc2.
I don't know if he did.
Comment on attachment 406115 [details] [diff] [review]
patch (use CC=gcc for configure on Solaris)

Sure, we can take this locally until it gets upstreamed. Anthony didn't get it in for 3.0.9rc2 but he did indicate on the mailinglist that he'll get to it...
Attachment #406115 - Flags: review?(dwitte) → review+
Attachment #406115 - Flags: approval1.9.2?
Please land on trunk first, and then I'll approve for 1.9.2
http://hg.mozilla.org/mozilla-central/rev/58f4e18525ae
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #406115 - Flags: approval1.9.2? → approval1.9.2+
Comment on attachment 406115 [details] [diff] [review]
patch (use CC=gcc for configure on Solaris)

a191=beltzner
Ginn - just to be clear, is the patch here required for building libffi using gcc?
Yes, gcc is required.
FWIW: The change for ffitarget.h didn't go into libffi 3.0.9 eleased on December 31, 2009.
Flags: in-testsuite-
Target Milestone: --- → mozilla1.9.3a1
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: