public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: GCCMain not found & test suite errors fatal?
@ 2009-12-31 17:17 John Poole
  2010-01-03 16:28 ` Andrew Haley
  0 siblings, 1 reply; 14+ messages in thread
From: John Poole @ 2009-12-31 17:17 UTC (permalink / raw)
  To: java

You wrote:

>>  I suggest you grab ecj.jar and put it in install/share/java.  That
>>  should get you a fully working gcj.


Thank you, Andrew, I had already tried to do so.

Previously I learned the hard way about the ecj.jar issue, so I ran 
the.../contrib/download_ecj script (which downloaded the ecj.jar from 
the predefined site) to install the ecj.jar into the trunk directory, I 
then ran the configuration again so the ecj.jar would be staged into my 
target for "make ... install".

In fact, I do have ecj.jar installed in my target tree: /usr/local/gcj.

I even tried adding it to the include parameter and still get the same 
result. Maybe I'm not using the correct parameter syntax??

plug local # pwd
/usr/local/gcj/usr/local
plug local # find . -name '*ecj*.jar'
./share/java/ecj.jar
plug local # export LD_LIBRARY_PATH=/usr/local/gcj/usr/local/lib
plug local #
plug local # ./bin/gcj  -I./lib/:./share/java/ecj.jar -c 
/var/work/gcj/HelloWorld.java [B
gcj: [B: No such file or directory
Exception in thread "main" java.lang.NoClassDefFoundError: 
org.eclipse.jdt.internal.compiler.batch.GCCMain
    at gnu.java.lang.MainThread.run(MainThread.java:100)
Caused by: java.lang.ClassNotFoundException: 
org.eclipse.jdt.internal.compiler.batch.GCCMain not found in 
gnu.gcj.runtime.SystemClassLoader{urls=[], 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
    at java.net.URLClassLoader.findClass(URLClassLoader.java:531)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:452)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:387)
    at gnu.java.lang.MainThread.run(MainThread.java:96)
plug local #




^ permalink raw reply	[flat|nested] 14+ messages in thread
* GCCMain not found & test suite errors fatal?
@ 2009-12-31 14:36 John Poole
  2009-12-31 14:49 ` Andrew Haley
  0 siblings, 1 reply; 14+ messages in thread
From: John Poole @ 2009-12-31 14:36 UTC (permalink / raw)
  To: java

I need help with two issues.

Background:
I'm trying to install a Java development and runtime environment on the 
Marvell SheevaPlug which runs off an ARMv5t processor.

I currently have Gentoo installed on my SheevaPlug.  Gentoo does not 
support Java for the ARMv5t platform.  I do know that Java works on the 
SheevaPlug as other people using an identical SheevaPlug have Ubuntu or 
other flavors of Linux installed and they are able to install a Java 
runtime and java based programs.  Moreover, Sun offers a run time 
environment, but Sun charges for it.  I would like to be able to set up 
a run time environment within Gentoo on the SheevaPlug without having to 
pay for a license or buy a black box technology.

I therefore undertook to compile icedtea6-1.6 and ran into a circular 
dependency of ANT.  ANT needs Java to install.  I logged Bug 387 with 
Iced Tea and I was advised to "use gcj to build openjdk build 
dependencies and bootstrap openjdk using gcj."  That endeavor brings me 
to this list.

I was able to successfully make Revision: 155206 of 
svn://gcc.gnu.org/svn/gcc/trunk.

I was unable to compile a test class, and logged Bug 42405; my problem 
had been failing to specify a library path; the comment "Make sure your 
install library path is in LD_LIBRARY_PATH." worked insofar as it got me 
past the error message 
"/usr/local/gcj/usr/local/bin/../libexec/gcc/armv5tel-unknown-linux-gnueabi/4.5.0/ecj1: 
error while loading shared libraries: libgcj_bc.so.1: cannot open shared 
object file: No such file or directory ."  By using these two commands, 
I was able to move past the problem:
    export LD_LIBRARY_PATH=/usr/local/gcj/usr/local/lib
    ./gcj -v -I /usr/local/gcj/usr/local/share/java/libgcj-4.5.0.jar 
/var/work/gcj/HelloWorld.java


Issue #1:
I then came across a new error, 
"org.eclipse.jdt.internal.compiler.batch.GCCMain" class not found, and 
opened Bug 42409 to track it.

It would be really helpful if in the GCJ documentation you had a simple 
test scenario which compiles (and runs?) a HelloWorld.java function.  
What often trips me up in Java is not having a class in the right path.  
In this case, the solution in Bug 42405 got me past that hurdle, but now 
with the problem in Bug 42409, I've most likely encountered another path 
type problem.  If I had a test scenario that identified all the path 
dependencies I could know that I have succeeded in getting something 
working.

Issue #2:
As an aside, I ran the test suite and had six errors.  Unfortunately, I 
do not know if these errors are show-stoppers or not and would 
appreciate anyone's opinion about whether they will block me from 
running a gcj compiler.  They details of the test suite are set forth in 
Bug 42409.

FAIL: calls execution - gij test
FAIL: findclass2 run
FAIL: Throw_2 execution - source compiled test
FAIL: Throw_2 -findirect-dispatch execution - source compiled test
FAIL: Throw_2 -O3 execution - source compiled test
FAIL: Throw_2 -O3 -findirect-dispatch execution - source compiled test
                 === libjava Summary ===

# of expected passes            2561
# of unexpected failures        6
# of untested testcases         6

Given then above test results coupled with the warning in the 
documentation that some errors would occur, I'm thinking I've been very 
successful.  Unfortunately, I do not seem to be able to use what I have 
created in what should be a simple test (Issue #1 above).

Basically, I'd like to be to compile ANT with gcj and any other 
dependencies IcedTea will present me and be on my way.  If anyone thinks 
of other problems I may run into, or that I'm undertaking a really poor 
approach, please speak up.

Thank you for any help and guidance.

John L. Poole




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-01-06 17:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-31 17:17 GCCMain not found & test suite errors fatal? John Poole
2010-01-03 16:28 ` Andrew Haley
2010-01-03 18:14   ` John Poole
2010-01-03 18:31     ` Andrew Haley
2010-01-03 18:45       ` John Poole
2010-01-03 19:00         ` Andrew Haley
     [not found]           ` <7230133d1001040328x4557cd0cn8eba6443e8c74616@mail.gmail.com>
2010-01-04 11:41             ` Andrew Haley
2010-01-05  2:43             ` John Poole
2010-01-05 10:17               ` Andrew Haley
2010-01-06 16:39                 ` RFD: Precompile ecj [Was Re: GCCMain not found & test suite errors fatal?] Andrew Haley
2010-01-06 17:01                   ` David Daney
2010-01-06 17:26                     ` Andrew Haley
  -- strict thread matches above, loose matches on Subject: below --
2009-12-31 14:36 GCCMain not found & test suite errors fatal? John Poole
2009-12-31 14:49 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).