代码之家  ›  专栏  ›  技术社区  ›  michelemarcon

如何构建GNU类路径和JAMV

  •  5
  • michelemarcon  · 技术社区  · 16 年前

    我正在尝试构建GNU类路径0.98和JAMVM1.5.2。
    在JamVM自述之后,我进行了“配置”;制作在jamVM上进行“安装”,它就工作了。


    然后使用GNU类路径,我做了以下工作:

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

    我得到了这个错误:

    javac失败(请参阅config.log)

    config.log ,我发现javac找不到VMStackWalker(这是jamvm特有的) 我将jamvm类添加到类路径,然后出现以下错误:

    config.log ,我看到jamvm找不到 java.lang.Class

    怎么了?!

    4 回复  |  直到 13 年前
        2
  •  1
  •   Kumar Sukhani    12 年前

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

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

        3
  •  0
  •   Daniel Shi    15 年前

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

        4
  •  0
  •   Community CDub    8 年前

    我的Mac OS X 10.11冒险:

    贾姆姆

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

    GNU类路径

    需要更多的时间:

    # 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类路径的一个老bug,我发现了类似的问题。正如你在下面看到的, ./configure 已损坏,无法与任何 爪哇语 除了 gcj .

    我最后只是编辑 /配置

    • 开始时,我添加了一行 export JAVAC=$(which javac)
    • 我将条件赋值替换为 JAVAC_IS_GCJ=no

    应该通过,但是 制作 不会。

    我把所有的钱都记下来了 Makefiles /配置 生成用于 -fsource= -fsource (这是一个gcj特定的标志)如果有与 -source 争论,还是刚刚被取代 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);"
    

    that's a totally different story ...

    $ 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
    

    推荐文章