JS-ctypes fail to compile on Maemo ARM.

RESOLVED FIXED in mozilla1.9.3a1

Status

()

Core
js-ctypes
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
mozilla1.9.3a1
ARM
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(status1.9.2 beta4-fixed)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

8 years ago
Created attachment 411080 [details] [diff] [review]
Patch from bug URL, arm softfp

gcc -DHAVE_CONFIG_H -I. -Ijs/ctypes/libffi -I. -Ijs/ctypes/libffi/include -Iinclude -Ijs/ctypes/libffi/src -Wall -g -fexceptions -g -O2 -MT src/arm/ffi.lo -MD -MP -MF src/arm/.deps/ffi.Tpo -c js/ctypes/libffi/src/arm/ffi.c  -fPIC -DPIC -o src/arm/ffi.o
js/ctypes/libffi/src/arm/sysv.S: Assembler messages:
js/ctypes/libffi/src/arm/sysv.S:203: Error: selected processor does not support `stfeqs f0,[r2]'
js/ctypes/libffi/src/arm/sysv.S:208: Error: selected processor does not support `stfeqd f0,[r2]'
js/ctypes/libffi/src/arm/sysv.S:283: Error: selected processor does not support `ldfs f0,[sp]'
js/ctypes/libffi/src/arm/sysv.S:286: Error: selected processor does not support `ldfd f0,[sp]'
js/ctypes/libffi/src/arm/sysv.S:289: Error: selected processor does not support `ldfd f0,[sp]'
Attachment #411080 - Flags: review?(vladimir)

Updated

8 years ago
Attachment #411080 - Flags: review?(vladimir) → review-

Comment 1

8 years ago
Comment on attachment 411080 [details] [diff] [review]
Patch from bug URL, arm softfp

>diff -r a2205b22d77c configure.in
>--- a/configure.in	Sat Nov 07 20:28:54 2009 +0200
>+++ b/configure.in	Sun Nov 08 22:52:00 2009 +0200
>@@ -8165,8 +8165,6 @@ dnl Build jsctypes on the platforms we c
> dnl
> AC_SUBST(BUILD_CTYPES)
> case "$OS_TEST" in
>-arm*)
>-  ;;
> *)
>   BUILD_CTYPES=1
>   AC_DEFINE(BUILD_CTYPES)

This will enable ctypes for wince/arm as well, which we don't want. You'll have to call out linux/arm specifically.

Does this pass ctypes unit tests locally and on tryserver?

Thanks for the help here, this is great to see!

Updated

8 years ago
Duplicate of this bug: 519237
(Assignee)

Comment 3

8 years ago
> 
> This will enable ctypes for wince/arm as well, which we don't want. You'll have
> to call out linux/arm specifically.

Yep, I see build failure on wince and winmo

What is the best define for it? should I test it for linux only in arm case?


> 
> Does this pass ctypes unit tests locally and on tryserver?

I try it locally on N900:
https://developer.mozilla.org/en/JavaScript_code_modules/ctypes.jsm

Nokia-N900-46-2:/usr/lib/microb-engine# ./run-mozilla.sh ./xpcshell 
defined DISPLAY=:0.0
js> Components.utils.import("resource://gre/modules/ctypes.jsm");
[object BackstagePass]
js> var libc = ctypes.open("libc.so.6"); 
js> var puts = libc.declare("puts",ctypes.default_abi,ctypes.int32_t,ctypes.string);
js> var ret = puts("Hello World from js-ctypes!");
Hello World from js-ctypes!
js> 

It seems to works fine.
(Assignee)

Comment 4

8 years ago
Created attachment 411105 [details] [diff] [review]
TryServer arm_ctypes.v2
Attachment #411080 - Attachment is obsolete: true

Comment 5

8 years ago
(In reply to comment #3)
> What is the best define for it? should I test it for linux only in arm case?

Instead of the case statement, you could just disable ctypes only for OS_TARGET == WINCE and filter OS_TEST for arm.

> I try it locally on N900:

We have unit tests for it - "cd $OBJDIR/js/ctypes/tests && make xpcshell-tests" will run them.
(Assignee)

Comment 6

8 years ago
Created attachment 411392 [details] [diff] [review]
Fixed comments

Try server results for updated patch:
https://build.mozilla.org/tryserver-builds/romaxa@gmail.com-arm_ctypes.v3/
Attachment #411392 - Flags: review?(dwitte)

Comment 7

8 years ago
Comment on attachment 411392 [details] [diff] [review]
Fixed comments

Awesome. Let's get this on trunk and then look at a branch landing. I'll check with Stuart if we need to do anything special to get this into Fennec (and if, indeed, they want it).
Attachment #411392 - Flags: review?(dwitte) → review+

Updated

8 years ago
Assignee: nobody → romaxa
Version: 1.9.2 Branch → Trunk
(Assignee)

Comment 8

8 years ago
Pushed in:
http://hg.mozilla.org/mozilla-central/rev/c8f2a90879fb
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Comment on attachment 411392 [details] [diff] [review]
Fixed comments

I think this would be a nice addition to Fennec's binary extension story.
Attachment #411392 - Flags: approval1.9.2?

Comment 10

8 years ago
Any chance to see this patch land on 1.9.2 ? I have a use case with gstreamer that works well in fennec on trunk on a n810 (http://blog.desre.org/post/2009/11/19/Using-GStreamer-with-js-ctypes), and it would be great to use it with fennec 1.0

Comment 11

8 years ago
Comment on attachment 411392 [details] [diff] [review]
Fixed comments

Was this patch landed upstream in the ctypes repo?
Attachment #411392 - Flags: approval1.9.2? → approval1.9.2+
(In reply to comment #11)
> (From update of attachment 411392 [details] [diff] [review])
> Was this patch landed upstream in the ctypes repo?

I don't think it was. Do we have a process for that?

Comment 13

8 years ago
(In reply to comment #12)
> I don't think it was. Do we have a process for that?

It was; see gcc bug in the URL. (If it hasn't already been synced to libffi proper, they'll pick it up eventually.)

Comment 15

8 years ago
Pinged Anthony about getting this into libffi 3.0.9.
Target Milestone: --- → mozilla1.9.3a1
Depends on: 519146
You need to log in before you can comment on or make changes to this bug.