在Suse Enterprise Linux Server上为Itanium64构建openjdk7

时间:2012-06-27 16:15:00

标签: java compilation openjdk itanium

我在运行Suse Linux Enterprise Server 11 SP2的Itanium服务器上构建openjdk7时遇到了一些棘手的问题。

我已成功安装Sun JDK 1.6更新33作为安装的引导程序。并且,我已经下载了源drop并将openJDK7安装源解压缩到一个目录中。我的构建通过了所有make sanity检查并准备好了。

我取消了JAVA_HOME,声明了LANG = C,并将构建指向了引导程序JDK。

然后我调用make ALLOW_DOWNLOADS=false ALT_BOOTDIR=/usr/java/jdk1.6.0_33 ALT_DROPS_DIR=~/openjdk_src/sourcedrop

构建运行正常大约5-10分钟,然后我收到一些关于未找到SSL库的错误。

这发生在jaxws源代码树的构建的以下部分中,并且似乎与SSL有关:

[javac] Compiling 2735 source files to /root/openjdk_src/openjdk/build/linux-ia64/jaxws/build/classes
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java:54: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HttpsURLConnection;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java:55: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HostnameVerifier;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java:56: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSession;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:54: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HostnameVerifier;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:55: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HttpsURLConnection;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:56: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSession;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:218: error: cannot find symbol
[javac]     private static class HttpClientVerifier implements HostnameVerifier {
[javac]                                                        ^
[javac]   symbol:   class HostnameVerifier
[javac]   location: class MetadataFinder
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:219: error: cannot find symbol
[javac]         public boolean verify(String s, SSLSession sslSession) {
[javac]                                         ^
[javac]   symbol:   class SSLSession
[javac]   location: class HttpClientVerifier
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/developer/JAXWSProperties.java:32: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HostnameVerifier;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/developer/JAXWSProperties.java:33: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HttpsURLConnection;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/developer/JAXWSProperties.java:34: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSocketFactory;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:39: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSocketFactory;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:40: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HttpsURLConnection;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:41: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.HostnameVerifier;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:42: error: package javax.net.ssl does not exist
[javac] import javax.net.ssl.SSLSession;
[javac]                     ^
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:302: error: cannot find symbol
[javac]     private static class HttpClientVerifier implements HostnameVerifier {
[javac]                                                        ^
[javac]   symbol:   class HostnameVerifier
[javac]   location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:303: error: cannot find symbol
[javac]         public boolean verify(String s, SSLSession sslSession) {
[javac]                                         ^
[javac]   symbol:   class SSLSession
[javac]   location: class HttpClientVerifier
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:154: error: cannot find symbol
[javac]                     if (conn instanceof HttpsURLConnection) {
[javac]                                         ^
[javac]   symbol:   class HttpsURLConnection
[javac]   location: class WSEntityResolver
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java:156: error: cannot find symbol
[javac]                             ((HttpsURLConnection) conn).setHostnameVerifier(new HttpClientVerifier());
[javac]                               ^
[javac]   symbol:   class HttpsURLConnection
[javac]   location: class WSEntityResolver
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:207: error: cannot find symbol
[javac]         if (httpConnection instanceof HttpsURLConnection) {
[javac]                                       ^
[javac]   symbol:   class HttpsURLConnection
[javac]   location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:223: error: cannot find symbol
[javac]                 ((HttpsURLConnection) httpConnection).setHostnameVerifier(new HttpClientVerifier());
[javac]                   ^
[javac]   symbol:   class HttpsURLConnection
[javac]   location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:227: error: cannot find symbol
[javac]             HostnameVerifier verifier =
[javac]             ^
[javac]   symbol:   class HostnameVerifier
[javac]   location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:228: error: cannot find symbol
[javac]                 (HostnameVerifier) context.invocationProperties.get(JAXWSProperties.HOSTNAME_VERIFIER);
[javac]                  ^
[javac]   symbol:   class HostnameVerifier
[javac]   location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:230: error: cannot find symbol
[javac]                 ((HttpsURLConnection) httpConnection).setHostnameVerifier(verifier);
[javac]                   ^
[javac]   symbol:   class HttpsURLConnection
[javac]   location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:234: error: cannot find symbol
[javac]             SSLSocketFactory sslSocketFactory =
[javac]             ^
[javac]   symbol:   class SSLSocketFactory
[javac]   location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:235: error: cannot find symbol
[javac]                 (SSLSocketFactory) context.invocationProperties.get(JAXWSProperties.SSL_SOCKET_FACTORY);
[javac]                  ^
[javac]   symbol:   class SSLSocketFactory
[javac]   location: class HttpClientTransport
[javac] /root/openjdk_src/openjdk/build/linux-ia64/jaxws/drop/jaxws_src/src/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java:237: error: cannot find symbol
[javac]                 ((HttpsURLConnection) httpConnection).setSSLSocketFactory(sslSocketFactory);
[javac]                   ^
[javac]   symbol:   class HttpsURLConnection
[javac]   location: class HttpClientTransport
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 27 errors

要解决此问题,我将jsse.pack解压缩到jsse.jar中的jdk/jre/bin

然后,如果我记得与make ALLOW_DOWNLOADS=false ALT_BOOTDIR=/usr/java/jdk1.6.0_33 ALT_DROPS_DIR=~/openjdk_src/sourcedrop DISABLE_HOTSPOT_OS_VERSION_CHECK=ok合作,以便很好地忽略该架构。

然后,当它在VM中进行adlc时,构建失败:

Making adlc
g++  -Wl,-relax -Xlinker -O1   -Xlinker -export-dynamic -o ../generated/adfiles/adlc            
../generated/adfiles/adlparse.o ../generated/adfiles/arch       Desc.o    
../generated/adfiles/arena.o ../generated/adfiles/dfa.o ../generated/adfiles/dict2.o   
../generated/adfiles/filebuff.o ../generated/adfil       es/forms.o 
../generated/adfiles/formsopt.o ../generated/adfiles/formssel.o 
../generated/adfiles/main.o 
../generated/adfiles/adlc-opcodes.o ../       generated/adfiles/output_c.o 
../generated/adfiles/output_h.o
make[6]: *** No rule to make target 
`/root/openjdk_src/openjdk/hotspot/src/cpu/ia64/vm/.ad', needed by    
`../generated/adfiles/linux_.ad'.  Stop       .

现在怎样?什么是adlc以及为什么不能构建它?

1 个答案:

答案 0 :(得分:1)

我最近才偶然发现了这个(仍然是开放的)问题,最近几个月尝试了类似的事情;并且遇到(并解决了)同样的问题。

' ADLC'是HotSpot的架构描述语言编译器, ADLC。 它用于生成HotSpot构建的Java执行引擎(解释器和JIT编译器)的源;基于处理' .ad'文件。如果您需要构建ADLC工具,这就是它的用法'看起来像:

$> ./adlc
Architecture Description Language Compiler

Usage: adlc [-doqwTs] [-#]* [-D<FLAG>[=<DEF>]] [-U<FLAG>] [-c<CPP_FILE_NAME>] [-h<HPP_FILE_NAME>] [-a<DFA_FILE_NAME>] [-v<GLOBALS_FILE_NAME>] <ADL_FILE_NAME>
 d  produce DFA debugging info
 o  no output produced, syntax and semantic checking only
 q  quiet mode, supresses all non-essential messages
 w  suppress warning messages
 T  make DFA as many subroutine calls
 s  output which instructions are cisc-spillable
 D  define preprocessor symbol
 U  undefine preprocessor symbol
 c  specify CPP file name (default: (null))
 h  specify HPP file name (default: (null))
 a  specify DFA output file name
 v  specify adGlobals output file name
 #  increment ADL debug level

您的构建问题是您无法避免“架构”问题。检测! (实际上,你使用&#34; DISABLE_HOTSPOT_OS_VERSION_CHECK = ok&#34;,甚至可能是怀疑。)然而,它比(仅)那更糟糕:IA64(除了Windows,直到Windows Server 2008 R2结束(扩展) )支持... out-to 2020?)正在从Java 7 OpenJDK源代码树中删除,并且已经删除/正在被主动删除(和/或没有被维护?)。具体来说,这就是Makefile - 支持系统的某些HotSpot / OpenJDK构建配置组件的问题,这些组件是指定查找/处理&{39; .ad&的所有架构资格所必需的。 #39; Linux Itanium / IA64架构所需的文件。具体来说,您缺少正确文件名扩展所需的某些关键定义:[...]/cpu/ia64/vm/.ad../generated/adfiles/linux_.ad明显不正确,完全在架构上限定文件/目标名称(因此未找到)。

上面涉及的文件/目标的正确名称实际上是../generated/adfiles/linux_ia64.ad,它通过目标名称中的环境变量替换而来,但缺少${arch_model}的定义(类似的情况呈现)与另一个envvar,${os_arch_model})。这些是{&lt; platform_ia64&#39; linux&#39;根据&#39; [JDK_distribution]/hotspot/make&#39; arch_model的目录。简要回顾一下linux下的其他平台文件,您应该看到&#39; arch&#39;应该采用&#39; ia64&#39;, os_arch_model的价值,同样地,&#39; os_arch&#39;采用与&#39; linux_ia64&#39;,,即 [Java7 JDK distribution]/hotspot/make $ cat platform_ia64 os_family = linux arch = ia64 arch_model = ia64 # Added os_arch = linux_ia64 os_arch_model = linux_ia64 # Added lib_arch = ia64 compiler = gcc gnu_dis_arch = ia64 sysdefs = -DLINUX -D_GNU_SOURCE -DIA64 -DCC_INTERP mark_style = alignment 相同的值。

{{1}}

只需修改/更正,您就应该能够在OpenJDK构建的这些初始步骤中取得成功。 (我可以通过ADLC大楼,但是后来在构建过程中失败,因为已经从以后的IA64来源中删除了另一个源区......)祝你好运!