载 javac。我不知道为什么 JAVA_HOME 不够好,但是我们可以尝试只将其设置为正常的 JDK 目录:
$ export ALT_JDK_IMPORT_PATH=/usr/local/java
现在构建似乎在前进。系统出现了许多不同类型的错误消息,比如:
../../../../../../../src/share/classes/org/omg/CORBA/ORB.java:593: warning:
non-varargs call of varargs method with inexact argument type for last parameter;
cast to java.lang.Object for a varargs call
cast to java.lang.Object[] for a non-varargs call and to suppress this warning
return (org.omg.CORBA.NVList)meth.invoke(this, argx);
似乎并非 JDK 中的所有代码都要遵循最新的 Sun 编码规范。但是,这仅仅是警告。代码仍在构建。
OpenJDK:构建JDK(7)
时间:2011-07-22
TODO:修复此问题以获得无警告的构建。
构建机器上的风扇/硬盘驱动器现在已过度疲劳了,整个房间都可以听到旋转的噪音。这只是一台笔记本。我希望它不要烧坏。如果它烧坏了,至少我还在 90 天的保修期内。好了,它安静了一点。哇。噢,等一下。它安静下来的原因是因为它出错了:
/home/jars/openjdk/hotspot/agent/src/share/classes/sun/jvm
/hotspot/debugger/remote/x86/RemoteX86Thread.java:42:
cannot find symbol
symbol : class RemoteX86ThreadContext
location: class sun.jvm.hotspot.debugger.remote.x86.RemoteX86Thread
RemoteX86ThreadContext context = new RemoteX86ThreadContext(debugger);
^
/home/jars/openjdk/hotspot/agent/src/share/classes/sun/jvm/hotspot
/debugger/remote/x86/RemoteX86Thread.java:42: cannot find symbol
symbol : class RemoteX86ThreadContext
location: class sun.jvm.hotspot.debugger.remote.x86.RemoteX86Thread
RemoteX86ThreadContext context = new RemoteX86ThreadContext(debugger);
^
注意:/home/jars/openjdk/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAJDIClassLoader.java uses or overrides a deprecated API.
注意:Recompile with -Xlint:deprecation for details.
2 errors
make[6]: *** [/home/jars/openjdk/control/build/linux-i586/hotspot/outputdir
/linux_i486_compiler2/product/../generated/sa-jdi.jar] Error 1
make[6]: Leaving directory
`/home/jars/openjdk/control/build/linux-i586/hotspot/outputdir
/linux_i486_compiler2/product''
make[5]: *** [all] Error 2
make[5]: Leaving directory
`/home/jars/openjdk/control/build/linux-i586/hotspot/outputdir
/linux_i486_compiler2/product''
make[4]: *** [sa_stuff] Error 2
make[4]: Leaving directory
`/home/jars/openjdk/control/build/linux-i586/hotspot/outputdir
/linux_i486_compiler2/product''
make[3]: *** [product] Error 2
make[3]: Leaving directory
`/home/jars/openjdk/control/build/linux-i586/hotspot/outputdir''
make[2]: *** [generic_build2] Error 2
make[2]: Leaving directory `/home/jars/openjdk/hotspot/make''
make[1]: *** [product] Error 2
make[1]: Leaving directory `/home/jars/openjdk/hotspot/make''
make: *** [hotspot-build] Error 2
但仍有进展。至少这像是一个真正的 Java 缺陷,而不是环境问题或 C 缺陷。指定的缺陷似乎是没有可访问的把 RemoteThreadContext 构造器,该构造器接受 RemoteDebuggerClient 作为参数。打开 RemoteX86Thread.java 来查看可能正在发生的事情,我没查到任何问题,但是当我打开 RemoteThrea |