logo separator

[mkgmap-dev] Compiling Mkgmap failes

From Lambertus osm at na1400.info on Tue Dec 1 21:23:33 GMT 2009

I'm having problems compiling Mkgmap, maybe someone here is able to help 
with that:

Before compiling I removed all java stuff, then installed sun-java6-jdk 
on my ubuntu installation. Then downloaded Mkgmap from SVN, ran 'ant 
dist' as per Mkgmap wiki page and got the following error:

 > ant dist
Buildfile: build.xml

prepare:

compile:
    [javac] Compiling 317 source files to 
/home/lambertus/garmin/test/mkgmap/build/classes
    [javac] failed to read ecj.jar (reconfigure with --with-ecj-jar): 
/usr/share/java/eclipse-ecj.jar
    [javac] failed to load org.eclipse.jdt.internal.compiler.batch.Main 
from ecj.jar: /usr/share/java/eclipse-ecj.jar
    [javac] java.lang.ClassNotFoundException: 
org.eclipse.jdt.internal.compiler.batch.Main not found in 
java.net.URLClassLoader{urls=[file:/usr/share/java/eclipse-ecj.jar], 
parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/ant/lib/ant-launcher.jar,file:/usr/share/java/xmlParserAPIs.jar,file:/usr/share/java/xercesImpl.jar], 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
    [javac]    at java.net.URLClassLoader.findClass(libgcj.so.10)
    [javac]    at java.lang.ClassLoader.loadClass(libgcj.so.10)
    [javac]    at java.lang.ClassLoader.loadClass(libgcj.so.10)
    [javac]    at com.sun.tools.javac.Main.<clinit>(Main.java:91)
    [javac]    at java.lang.Class.initializeClass(libgcj.so.10)
    [javac]    at java.lang.Class.forName(libgcj.so.10)
    [javac]    at 
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:145)
    [javac]    at 
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:100)
    [javac]    at 
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1058)
    [javac]    at 
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882)
    [javac]    at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [javac]    at java.lang.reflect.Method.invoke(libgcj.so.10)
    [javac]    at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [javac]    at org.apache.tools.ant.Task.perform(Task.java:348)
    [javac]    at org.apache.tools.ant.Target.execute(Target.java:357)
    [javac]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [javac]    at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    [javac]    at 
org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    [javac]    at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [javac]    at 
org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    [javac]    at org.apache.tools.ant.Main.runBuild(Main.java:758)
    [javac]    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    [javac]    at 
org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    [javac]    at 
org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

BUILD FAILED
java.lang.ExceptionInInitializerError
   at java.lang.Class.initializeClass(libgcj.so.10)
   at java.lang.Class.forName(libgcj.so.10)
   at 
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:145)
   at 
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:100)
   at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1058)
   at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
   at java.lang.reflect.Method.invoke(libgcj.so.10)
   at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   at org.apache.tools.ant.Task.perform(Task.java:348)
   at org.apache.tools.ant.Target.execute(Target.java:357)
   at org.apache.tools.ant.Target.performTasks(Target.java:385)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
   at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
   at org.apache.tools.ant.Main.runBuild(Main.java:758)
   at org.apache.tools.ant.Main.startAnt(Main.java:217)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.NullPointerException
   at com.sun.tools.javac.Main.<clinit>(Main.java:106)
   at java.lang.Class.initializeClass(libgcj.so.10)
   ...19 more

Total time: 1 second


That error suggests that Eclipse needed to be installed, so I installed 
it. Unfortunately compiling after that resulted in the same error again.

The file ecj.jar is not referenced in the build.xml, 'ant clean dist' 
resulted in the same error. The compiler used is: javac 1.6.0_15

Any ideas?



More information about the mkgmap-dev mailing list