This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gcj-eclipse-merge-branch] MinGW ecj: Cross-built ecjx?! (was Re: ecj branch)



On Tue, 5 Dec 2006, Tom Tromey wrote:


"Andi" == Andi Vajda <andi@osafoundation.org> writes:

Andi> I've had problems with bytecode and platform independence recently, Andi> albeit not with ecj1. The issue I've noticed is that when compiling Andi> Java Lucene from .java to .class to .jar with a non gcj javac such as Andi> Apple's, Sun's or Blackdown's, using these bits to then compile from Andi> .jar to .o with gcj, the resulting executables will or will not Andi> perform correctly depending on where the .java compilation took place.

This is very, very weird.  It is weird enough that I'm having trouble
thinking of a way this could happen.

What does the failure look like?

Various PyLucene unit tests fail.


Maybe comparing 2 such .class files would be helpful.

Yes, I've found this unexpected and mystifying too. I didn't look much into it once I found a combination that worked. If someone is interested in trying to reproduce this, it's as simple as downloading a PyLucene source tarball [1] and compiling it with a gcj 4.x compiler. Again, the ones I tried are:
- gcj 4.0.2 patched with [2] (err [3] actually) on Mac OS X 10.4.8 (intel)
- gcj 4.2.0 20061121 snapshot (unpatched) on Ubuntu 64 (6.10 Edy Eft)


To build PyLucene see instructions at [4]. Once PyLucene is built and installed, if "make test" fails, you've reproduced the problem.

Andi..

[1] http://downloads.osafoundation.org/PyLucene/src/PyLucene-src-2.0.0-5.tar.gz
    the .jar files included were built on Mac OS X PPC 10.4 with Apple's javac

[2] http://gcc.gnu.org/ml/java/2006-05/msg00151.html
    Sandro Tolaini's original Intel OS X gcj 4.0.2 patches

[3] https://bugzilla.osafoundation.org/attachment.cgi?id=2935
    The same patches + a GC fix we made

[4] http://svn.osafoundation.org/pylucene/trunk/INSTALL


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]