Issue 91641 - rhino fails to build with OpenJDK and IBM JDK
Summary: rhino fails to build with OpenJDK and IBM JDK
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: rene
QA Contact: Unknown
URL: http://zyklop.dyndns.org/~rene/rhino.log
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-14 13:31 UTC by rene
Modified: 2013-02-24 21:00 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch I use for refence (1.82 KB, patch)
2008-08-13 02:38 UTC, rene
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description rene 2008-07-14 13:31:43 UTC
Hi,

I was just trying to build 3.0.0beta2 with openjdk-6 and it fails to build in
rhino. Leaving out the 36 warnings, the 3 errors ant reports seems to be those ones:

    [javac] /home/rene/Debian/Pakete/OpenOffice.org/openoffice.org-3.0.0/ooo-bui
ld/build/current/rhino/unxlngx6.pro/misc/build/rhino1_5R5/toolsrc/org/mozilla/ja
vascript/tools/debugger/Main.java:3610: cannot find symbol
    [javac] symbol  : method getThisObj()
    [javac] location: class org.mozilla.javascript.NativeCall
    [javac]                 result = f.call(cx, scope, call.getThisObj(),
[...]
    [javac]
/home/rene/Debian/Pakete/OpenOffice.org/openoffice.org-3.0.0/ooo-build/build/current/rhino/unxlngx6.pro/misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java:2295:
org.mozilla.javascript.tools.debugger.FrameHelper is not abstract and does not
override abstract method onDebuggerStatement(org.mozilla.javascript.Context) in
org.mozilla.javascript.debug.DebugFrame
    [javac] class FrameHelper implements DebugFrame {
    [javac] ^
    [javac]
/home/rene/Debian/Pakete/OpenOffice.org/openoffice.org-3.0.0/ooo-build/build/current/rhino/unxlngx6.pro/misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java:1607:
cannot find symbol
    [javac] symbol  : method getThisObj()
    [javac] location: class org.mozilla.javascript.NativeCall
    [javac]                 obj = call.getThisObj();
    [javac]                           ^

Full log at http://zyklop.dyndns.org/~rene/rhino.log
Comment 1 rene 2008-07-14 13:33:00 UTC
6b10 fwiw
Comment 2 caolanm 2008-07-14 13:38:28 UTC
For reference, the 6b9 packaged in F-9 works, we don't have a 6b10 to confirm
that the difference is 6b10 vs 6b9 though
Comment 3 Martin Hollmichel 2008-07-15 11:28:43 UTC
reassign
Comment 4 kay.ramme 2008-07-15 11:32:02 UTC
Svante, could you throw a look at that?

Thanks

    Kay
Comment 5 svante.schubert 2008-07-15 11:48:24 UTC
I will take a look at it, going to install me OpenJDK.

@Rene: 

Is it an option to upgrade Rhino to 1.7R1 (2008-03-06)
http://www.mozilla.org/rhino/download.html

Regards,
Svante (sus)
Comment 6 rene 2008-07-15 14:04:44 UTC
sus: yes, see also issue 55641.

Of course, it should still be buildable with both openjdk-6 and java-gcj-compat...
Comment 7 svante.schubert 2008-08-04 19:55:27 UTC
There are three Java compiling issues, I examined one:

org.mozilla.javascript.tools.debugger.FrameHelper is not abstract and does not
override abstract method onDebuggerStatement(org.mozilla.javascript.Context) in
org.mozilla.javascript.debug.DebugFrame

This is an Java compiling issue, which should be independent from JDK.
For me it works on JDK 6 under Windows, there I take a closer look into 

rhino/download/rhino1_5R5.zip

especially on
rhino1_5R5/src/org/mozilla/javascript/debug/DebugFrame.java

you will not find the interface method 
onDebuggerStatement(..)

Which is claimed to be implemented by
org.mozilla.javascript.tools.debugger.FrameHelper (BTW as well missing in my
XSLTFILTER10 version of rhino).

But you will find online a version, where this interface exists:
http://mxr.mozilla.org/mozilla/source/js/rhino/src/org/mozilla/javascript/debug/DebugFrame.java

Could it be that you are somehow working on newer rhino sources?

Regards,
Svante
Comment 8 svante.schubert 2008-08-04 20:04:16 UTC
BTW two pages of deprecation warnings and interfaces completely changed, classes
missing, all this seems to be some slight indication that it might be time to
update the library.

http://www.mozilla.org/rhino/download.html
Perhaps to Rhino 1.7R1?

Anything that blocks us in doing so?
Pretty sure it will solve your problem, Rene.

Comment 9 rene 2008-08-04 22:13:01 UTC
> Could it be that you are somehow working on newer rhino sources?

no. simple beta2 tarball.
Comment 10 svante.schubert 2008-08-05 10:31:32 UTC
Rene: Here is a hands on for you:

Take a look into 
rhino1_5R5/src/org/mozilla/javascript/debug/DebugFrame.java

If you find an interface method 
onDebuggerStatement(..)

Your rhino/download/rhino1_5R5.zip differs from mine.

Somewhere the compile HAVE to find this method, it works for me on CWS
XSLTFILTER10 and DEV300 m29.

Comment 11 hjs 2008-08-05 11:09:59 UTC
.
Comment 12 rene 2008-08-05 11:46:54 UTC
> Your rhino/download/rhino1_5R5.zip differs from mine.

That cannot be, again: I use the rhino of the tree. really.
$ md5sum rhino1_5R5.zip 
798b2ffdc8bcfe7bca2cf92b62caf685  rhino1_5R5.zip

And that's what is in beta2, m28 and m29 (and thus also in xsltfilter10)

Maybe your rhino is different than what is in the tree?
Comment 13 svante.schubert 2008-08-05 16:20:05 UTC
It seems to be an OpenJDK issue, where no workaround is possible:

IRC log from #dev.openoffice.org:

<robilad> patch is at
http://icedtea.classpath.org/hg/icedtea6/file/63c7ccd8da7f/patches/icedtea-rhino.patch
<_rene_> robilad: what's the rationale for adding it? exchanging some binary stuff?
<robilad> it's not part of java 6 api, so it's not part of the open6 tarball,
but it is shipped along with sun jdk, so it was added back in.
<robilad> note that the rhino shipped by sun is 'bundled in', so it has been
moved into a sun-specific namespace.
<robilad> where as distributions just delegate that to the rhino package within
the mozilla namespace.
<robilad> so if you have code using (for whatever reasons) sun-internal
namespaces, you could experience issues - I don't know enough about rhino or the
scripting engine to be able to tell, though.
<robilad> you may want to raise the issue on the distro-pkg-dev@openjdk list,
though - that's where the icedtea folks are ;)

<Svante> rene_: What version of OpenJDK are you using, I got OpenJDK in my
environment, but I can not reproduce it (but not on Debian)
<_rene_> Svante_afk: ii  openjdk-6-jdk                      6b11-5  OpenJDK
Development Kit (JDK)
<_rene_> Svante_afk: Debians openjdk package. which, as robilad says, includes
that rhino patch he mentions
<_rene_> Svante_afk: thus we need a solution which works with both
Comment 14 svante.schubert 2008-08-05 16:24:54 UTC
AFAIK I belive there is no work-around
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-August/002835.html

Than to use a different OpenJDK or add the JAR to be build via -Xbootclasspath
to the OOo rhino module.

Please change status, if someone has a better idea..

Comment 15 svante.schubert 2008-08-06 11:52:05 UTC
sus->ab:
The reason for this issue is the special OpenJDK build (AFAIK works for Sun
builds), which includes Rhino with similar package structure.

There is already a reply:
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2008-August/002838.html
and an issue opened
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179

A possible workaround for this OOo build problem in that special environment
would be to update the Rhino of OOo to the version of the OpenJDK. This should
provide new JavaScript functionality as well.

Andreas you might evaluate if this is in general possible, in what timeframe,
etc., otherwise I would suggest to close this issue.

Thanks,
Svante
Comment 16 svante.schubert 2008-08-06 11:55:41 UTC
Final comment:

Rene can still try the workaround suggested from the reply linked before as
workaround:

"I think you can use -Xbootclasspath for javac to explicitly exclude the
rhino.jar (and only use the other standard bootclasses). But I haven't
tried myself yet."

It is hard for us to do so, as the build successed in our environment..
Comment 17 rene 2008-08-06 13:15:32 UTC
> "I think you can use -Xbootclasspath for javac to explicitly exclude the
> rhino.jar (and only use the other standard bootclasses). But I haven't
> tried myself yet."

If you tell me what I need to specify exactly, yes. 

>   -Xbootclasspath/p:<path>   Prepend to the bootstrap class path
>   -Xbootclasspath/a:<path>   Append to the bootstrap clidass path
>   -Xbootclasspath:<path>     Override location of bootstrap class files

is what javac tells me. But I neither want to append or prepend something, and I
neither want to override the whole bootstrap class path.. But I'll check..

>  It is hard for us to do so, as the build successed in our environment..

Yes, I see that you even don't want to try. It's not as if it would be hard to
find a distribution (development version) containing that OoenJDK and install it
a test machine ;-)
Comment 18 rene 2008-08-06 13:19:47 UTC
sus: and how do I specify that Xbootclasspath  thing in rhinos build.xml?
Comment 19 rene 2008-08-13 00:30:46 UTC
for the record, yes, using -Xbootclasspath works, (<compilerarg
value="-Xbootclasspath:/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar"/> in thhe
javac tasks in rhinos ant.xml and scriptings ant.xml (com)
Comment 20 rene 2008-08-13 02:38:48 UTC
Created attachment 55728 [details]
patch I use for refence
Comment 21 mechtilde 2008-11-06 21:28:05 UTC
close the invalid issue
Comment 22 rene 2008-12-04 16:43:22 UTC
reopening
Comment 23 rene 2008-12-04 16:44:42 UTC
pmladek has a generalized patch for this
(http://svn.gnome.org/viewvc/ooo-build/trunk/patches/dev300/buildfix-openjdk-6-no-rhino.diff?revision=14748&view=markup),
will add it.
Comment 24 rene 2008-12-04 16:45:49 UTC
done in cws configuretoplevel
Comment 25 rene 2008-12-04 16:57:08 UTC
.
Comment 26 caolanm 2009-01-16 11:54:47 UTC
looks good, verified
Comment 27 thorsten.ziehm 2009-07-20 14:53:34 UTC
This issue is closed automatically and wasn't rechecked in a current version of
OOo. The fixed issue should be integrated in OOo since more than half a year. If
you think this issue isn't fixed in a current version (OOo 3.1), please reopen
it and change the field 'Target Milestone' accordingly.

If you want to download a current version of OOo =>
http://download.openoffice.org/index.html
If you want to know more about the handling of fixed/verified issues =>
http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues
Comment 28 thorsten.ziehm 2009-07-20 15:36:11 UTC
Sorry this issue was wrongly closed. This issue will be reopened automatically.
And will be set after that back to fixed/verified.
Comment 29 thorsten.ziehm 2009-07-20 15:40:38 UTC
Set to state 'fixed'.
Comment 30 thorsten.ziehm 2009-07-20 15:44:37 UTC
Set back to state 'verified/fixed'.

Again. Sorry for the mass of mails.
Comment 31 thorsten.ziehm 2010-02-22 15:43:50 UTC
This issue is closed automatically. It should be fixed in a version with is
available for longer than half a year (OOo 3.1). If you think this issue isn't
fixed in the current version (OOo 3.2) please reopen it. But then please pay
attention about the field 'target milestone'.
The closure was approved by the Release Status Meeting at 22nd of February 2010
and it is based on the issue handling guideline for fixed/verified issues :
http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues