【问题标题】:OpenSSL building errors in CentOS 6.02 64 bit OSCentOS 6.02 64 位操作系统中的 OpenSSL 构建错误
【发布时间】:2013-01-12 12:49:40
【问题描述】:

我在 CentOS 6.02 64 位操作系统中构建 openssl 时遇到了一些问题。每当我尝试构建它时,我都会遇到以下错误:-

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.

【问题讨论】:

  • 什么版本的 OpenSSL?什么版本的 bintuils?

标签: c++ linux openssl centos


【解决方案1】:

这是汇编代码中的寻址问题。 (32 位与 64 位寻址。)为此提交了 bug。

如需快速修复,请尝试使用 no-asm 选项重新编译。

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

编辑:要解决因没有 -fPIC 标志而导致的错误:执行make clean,将./config no-asm 的行更改为./config no-asm -fPIC,然后运行make &amp;&amp; make install。

【讨论】:

  • 如何使用 no-asm 选项进行编译?请写下整个命令。
  • @NaseefUrRahman 在执行./config no-asm 命令之前,您可能需要执行make clean。当您不使用 no-asm 选项时,这将清除您之前编译的对象。
【解决方案2】:

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

然后进行以下更改:

之后:

sub round1_step

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

添加以下行:

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

同样,为 sub round2_step、sub round3_step 和 sub round4_step 添加相同的行

【讨论】:

    猜你喜欢
    • 2013-01-09
    • 2011-03-02
    • 1970-01-01
    • 1970-01-01
    • 2011-12-18
    • 1970-01-01
    • 2011-02-20
    • 2013-08-29
    • 1970-01-01
    相关资源
    最近更新 更多