简体   繁体   English

CentOS 6.02 64位操作系统中的OpenSSL构建错误

[英]OpenSSL building errors in CentOS 6.02 64 bit OS

I am facing some problems in building openssl in CentOS 6.02 64 bit OS. 我在CentOS 6.02 64位操作系统中构建openssl时遇到了一些问题。 Whenever I try to build it I face the errors followings:- 每当我尝试构建它时,我都面临以下错误: -

md5-x86_64.s:41: Error: 0xd76aa478 out range of signed 32bit displacement
md5-x86_64.s:50: Error: 0xe8c7b756 out range of signed 32bit displacement
md5-x86_64.s:68: Error: 0xc1bdceee out range of signed 32bit displacement
md5-x86_64.s:77: Error: 0xf57c0faf out range of signed 32bit displacement
md5-x86_64.s:95: Error: 0xa8304613 out range of signed 32bit displacement
Many more errors like this.

It's a problem with the addressing in the assembly code. 这是汇编代码中的寻址问题。 (32 bit vs 64 bit addressing.) There was a bug filed for this. (32位与64位寻址。)为此提交了一个错误

For a quick fix try recompiling with the no-asm option. 要快速修复,请尝试使用no-asm选项重新编译。

cd <openssl-source-directory>
./config no-asm
make && make install

EDIT: To resolve the errors caused by not having the -fPIC flag: do a make clean , change the line for ./config no-asm to ./config no-asm -fPIC , and run make && make install . 编辑:要解决由于没有-fPIC标志而导致的错误:执行make clean ,将./config no-asm的行更改为./config no-asm -fPIC ,然后运行make && make install

Open the file 'openssl-x/crypto/md5/asm/md5-x86_64.pl' 打开文件'openssl-x / crypto / md5 / asm / md5-x86_64.pl'

Then make the following changes: 然后进行以下更改:

After: 后:

sub round1_step sub round1_step

{ my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_; {my($ pos,$ dst,$ x,$ y,$ z,$ k_next,$ T_i,$ s)= @_;

Add the following line: 添加以下行:

+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal

Similarly, add the same line for sub round2_step, sub round3_step & sub round4_step 同样,为sub round2_step,sub round3_step&sub round4_step添加相同的行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM