如何构建GNU Classpath和JamVM

时间:2009-04-14 14:05:33

标签: classpath gnu jamvm

我正在尝试构建GNU Classpath 0.98和JamVM 1.5.2 在JamVM自述文件之后,我做了'配置;使;在jamVM上进行make install,它运行良好。

然后我将jamvm和Sun javac添加到路径中 然后用GNU Classpath我做了这个:

./configure --enable-jni --disable-gtk-peer --disable-gconf-peer --disable-plugin

我收到了这个错误:

  

javac失败(请参阅config.log)

config.log上,我看到javac找不到VMStackWalker(这是特定于jamvm的) 我将jamvm类添加到CLASSPATH,然后我收到了这个错误:

  

Java VM jamvm失败(请参阅config.log)

config.log上,我发现jamvm找不到java.lang.Class

怎么了?!

4 个答案:

答案 0 :(得分:1)

答案 1 :(得分:1)

为Ubuntu12.04编译GNU Classpath的步骤: https://groups.google.com/forum/#!topic/jruby-gsoc/-fnKnP7zxbI

为Ubuntu 12.04编译JamVM的步骤: https://groups.google.com/forum/#!topic/jruby-gsoc/uJ6RlVvHR-0

答案 2 :(得分:0)

尝试ecj,classpath需要一个java编译器,而sun sdk在这里似乎并不好

答案 3 :(得分:0)

我的Mac OS X 10.11冒险:

JamVM

built with make clean && CFLAGS="-m32" ./configure

GNU Classpath

采取了更多:

# If you already made an attempt
make clean

## If you don't --disable-tools. I didn't have antlr, so I downloaded it.
#curl -O http://www.antlr.org/download/antlr-4.5.1-complete.jar

./configure --disable-gtk-peer --disable-gconf-peer \
    --disable-tools # for tools: --with-antlr-jar=antlr-4.5.1-complete.jar

如果你现在make,编译失败了 java_io_VMConsole.c:80:19: error: use of undeclared identifier 'IUCLC'。我最终googling what that symbol is - 它是一个八进制01000,并将其添加到源:

vim ./native/jni/java-io/java_io_VMConsole.c
# add this line in the beginning of the file: #define IUCLC   0001000

之后,。/ configure一直在抱怨你的javac不是GCJ。它看起来像一个GNU Classpath的旧bug,我发现了类似的问题。正如您所见,./configure已被破坏,并且除了javac之外的任何gcj都无法使用。

我最后只是编辑./configure

  • 在开头,我添加了一行export JAVAC=$(which javac)
  • 我用JAVAC_IS_GCJ=no
  • 替换了条件赋值

现在,./configure应该通过,但make赢了。

我为Makefiles./configure生成-fsource=所有-fsource,然后使用-source注释掉了行(如果它是特定于gcj的标志)有fsource参数的备用行,或仅用source替换Makefile

最后一步,我必须编辑顶级$(EXAMPLESDIR)并从SUBDIRS = ...行删除./gnu/classpath/examples/CORBA/NamingService/Demo.java:99: error: package gnu.classpath.tools.tnameserv does not exist gnu.classpath.tools.tnameserv.Main.main(args);" - 它没有编译错误:

$ DYLD_FALLBACK_LIBRARY_PATH=/usr/local/classpath/lib/classpath \
  /usr/local/jamvm/bin/jamvm -verbose:class -verbose:jni Test
...
Failed to open library /usr/local/classpath/lib/classpath/libjavanio:
dlopen(/usr/local/classpath/lib/classpath/libjavanio.so, 
1): image not found]
...
Exception occurred while printing exception (java/lang/NoClassDefFoundError)...
Original exception was java/lang/UnsatisfiedLinkError

它建成了!

运行它时出错,但是that's a totally different story ...

ng-repeat

(如果我设法运行它,我会更新答案)

相关问题