我正在尝试从github版本https://github.com/openssl/openssl/archive/OpenSSL-fips-2_0_13.tar.gz构建openssl并尝试手动编译它。我试图在Mac OSX版本10.11.5上编译它,这是我采取的一系列步骤
./Configure darwin64-x86_64-cc
make
但是我收到了这个错误
bsaes-x86_64.s:580:1: error: invalid symbol redefinition
_bsaes_enc_key_convert:
当我根据INSTALL
文件正常编译时,我在链接步骤中出错,可能是因为存档文件是为32位系统构建的。这是我在运行./config
WARNING! If you wish to build 64-bit library, then you have to
invoke './Configure darwin64-x86_64-cc' *manually*.
You have about 5 seconds to press Ctrl-C to abort.
然后从./config && make
步骤链接到存档时出现相应的错误是
ld: warning: ld: warning: ignoring file openssl/lib/libssl.a, file was
built for archive which is not the architecture being linked (x86_64):
openssl/lib/libssl.aignoring file openssl/lib/libcrypto.a, file was built
for archive which is not the architecture being linked (x86_64):
openssl/lib/libcrypto.a
注意我正在为C ++项目构建这个,使用C编译器编译C代码并使用c ++编译器(或ld
,因为两个编译器都使用相同的链接器?)链接代码(不确定是否有所作为)
有人能告诉我如何正确构建和链接openssl吗?
答案 0 :(得分:2)
在<server description="Default Server">
<featureManager>
<feature>webProfile-7.0</feature>
<feature>localConnector-1.0</feature>
</featureManager>
<library id="global">
<fileset dir="${server.config.dir}/lib/jars" includes="*.jar"/>
</library>
<application context-root="HelloWorld" location="text-1.0.0-SNAPSHOT.war">
<classloader commonLibraryRef="global" delegation="parentFirst"/>
</application>
<!-- Define the host name for use by the collective.
If the host name needs to be changed, the server should be
removed from the collective and re-joined. -->
<variable name="defaultHostName" value="localhost"/>
<keyStore id="defaultKeyStore" password="adminpwd"/>
<!-- Define an Administrator and non-Administrator -->
<basicRegistry id="basic">
<user name="admin" password="adminpwd"/>
<user name="nonadmin" password="nonadminpwd"/>
</basicRegistry>
<!-- Assign 'admin' to Administrator -->
<administrator-role>
<user>admin</user>
</administrator-role>
<webContainer deferServletLoad="false"/>
<applicationManager autoExpand="true"/>
<httpEndpoint host="*" httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>
<logging consoleLogLevel="INFO" traceSpecification="*=info:com.ibm.ws.classloading.*=ALL"/>
</server>
期间尝试使用no-asm
选项:
./configure
椭圆曲线例程似乎在这个版本中被破坏了,所以可能会提交一个关于它的bug报告,否则它应该编译/构建没有问题。