Opened 14 years ago

Closed 14 years ago

#22692 closed defect (duplicate)

gcc-4.4.2 Error in GCJ - configuration error

Reported by: thomas@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc:
Port: gcc44

Description

There seems to be a problem with GCJ in gcc44, if I try to compile a simple java file with:

$ gcj-mp-4.4 Test.java

I get the following error:

gcj-mp-4.4: error trying to exec 'ecj1': execvp: No such file or directory

It seems to suggest that the ecj1 executable is missing. This in the meantime renders GCJ unusable.

I have tried with gcc43 and gcc45 the error persists. I have also tried a fresh install of Snow Leopard but, alas, no difference.

I cannot locate the ecj1 anywhere on my system.

Change History (4)

comment:1 Changed 14 years ago by thomas@…

Cc: thomas@… added

Cc Me!

comment:2 Changed 14 years ago by thomas@…

As it turns out it is caused by the build process failing to create the ecj1 script file. This is because it needs ecj.jar that is downloaded using ./contrib/download_ecj in the gcc svn root. The ecj1 script looks like this:

gij-mp-4.4 -cp <SOME PATH>/ecj.jar \ 
    org.eclipse.jdt.internal.compiler.batch.GCCMain \ 
    ${1+"$@"}

this gets me over the initial hurdle, but lead to a new error:

Exception in thread "main" java.lang.NoClassDefFoundError:  
   at java.lang.Throwable.<init>(libgcj.10.dylib)
   at java.lang.Throwable.<init>(libgcj.10.dylib)
   at gnu.java.lang.MainThread.run(libgcj.10.dylib)
Caused by: java.lang.ClassNotFoundException:   not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/opt/local/bin/ecj.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.10.dylib)
   at java.lang.ClassLoader.loadClass(libgcj.10.dylib)
   at java.lang.ClassLoader.loadClass(libgcj.10.dylib)
   ...1 more

I'm not quite sure what to make of this. There might be some sort of version incompatibility with the gcj.jar I downloaded?

comment:3 Changed 14 years ago by mf2k (Frank Schima)

Cc: mww thomas@… removed
Owner: changed from macports-tickets@… to mww@…

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: newclosed

Duplicate of #22066.

Note: See TracTickets for help on using tickets.