在Solaris_x86上构建OpenSSL时,汇编程序报告非法助记符

问题描述 投票:1回答:1

我正在为Solaris_x86(5.10)构建OpenSSL 1.1.1d,但是在尝试构建aesni-mb-x86_64时,构建过程失败,并显示许多“非法助记符”消息。

示例:

cc -KPIC -xarch=generic64 -xstrconst -Xa -xO5 -xdepend -xbuiltin -DFILIO_H -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/testdir/openssl/1.1.1d/solaris_x86_10_64/ssl\"" -DENGINESDIR="\"/testdir/openssl/1.1.1d/solaris_x86_10_64/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG  -c -o crypto/aes/aesni-mb-x86_64.o crypto/aes/aesni-mb-x86_64.s
Assembler:
    "crypto/aes/aesni-mb-x86_64.s", line 9 : Illegal mnemonic
    Near line: ".cfi_startproc  "
    "crypto/aes/aesni-mb-x86_64.s", line 9 : Syntax error
    Near line: ".cfi_startproc  "
    "crypto/aes/aesni-mb-x86_64.s", line 11 : Illegal mnemonic
    Near line: ".cfi_def_cfa_register   %rax"
    "crypto/aes/aesni-mb-x86_64.s", line 11 : Syntax error
    Near line: ".cfi_def_cfa_register   %rax"
    "crypto/aes/aesni-mb-x86_64.s", line 13 : Illegal mnemonic
    Near line: ".cfi_offset %rbx,-16"
    "crypto/aes/aesni-mb-x86_64.s", line 13 : Syntax error
    Near line: ".cfi_offset %rbx,-16"
    "crypto/aes/aesni-mb-x86_64.s", line 15 : Illegal mnemonic
    Near line: ".cfi_offset %rbp,-24"
    "crypto/aes/aesni-mb-x86_64.s", line 15 : Syntax error
    Near line: ".cfi_offset %rbp,-24"
    "crypto/aes/aesni-mb-x86_64.s", line 17 : Illegal mnemonic
    Near line: ".cfi_offset %r12,-32"
    "crypto/aes/aesni-mb-x86_64.s", line 17 : Syntax error
    Near line: ".cfi_offset %r12,-32"
    "crypto/aes/aesni-mb-x86_64.s", line 19 : Illegal mnemonic
    Near line: ".cfi_offset %r13,-40"
    "crypto/aes/aesni-mb-x86_64.s", line 19 : Syntax error
    Near line: ".cfi_offset %r13,-40"
    "crypto/aes/aesni-mb-x86_64.s", line 21 : Illegal mnemonic
    Near line: ".cfi_offset %r14,-48"
    "crypto/aes/aesni-mb-x86_64.s", line 21 : Syntax error
    Near line: ".cfi_offset %r14,-48"
    "crypto/aes/aesni-mb-x86_64.s", line 23 : Illegal mnemonic
    Near line: ".cfi_offset %r15,-56"
    "crypto/aes/aesni-mb-x86_64.s", line 23 : Syntax error
    Near line: ".cfi_offset %r15,-56"
    "crypto/aes/aesni-mb-x86_64.s", line 33 : Illegal mnemonic
    Near line: ".cfi_escape 0x0f,0x05,0x77,0x10,0x06,0x23,0x08"
    "crypto/aes/aesni-mb-x86_64.s", line 33 : Syntax error
    Near line: ".cfi_escape 0x0f,0x05,0x77,0x10,0x06,0x23,0x08"
    "crypto/aes/aesni-mb-x86_64.s", line 243 : Illegal mnemonic
    Near line: ".cfi_def_cfa    %rax,8"
    "crypto/aes/aesni-mb-x86_64.s", line 243 : Syntax error
    Near line: ".cfi_def_cfa    %rax,8"
    "crypto/aes/aesni-mb-x86_64.s", line 261 : Illegal mnemonic
    Near line: ".cfi_restore    %r15"
    "crypto/aes/aesni-mb-x86_64.s", line 261 : Syntax error
    Near line: ".cfi_restore    %r15"
    "crypto/aes/aesni-mb-x86_64.s", line 263 : Illegal mnemonic
    Near line: ".cfi_restore    %r14"
    "crypto/aes/aesni-mb-x86_64.s", line 263 : Syntax error
    Near line: ".cfi_restore    %r14"
    "crypto/aes/aesni-mb-x86_64.s", line 265 : Illegal mnemonic
    Near line: ".cfi_restore    %r13"
    "crypto/aes/aesni-mb-x86_64.s", line 265 : Syntax error
    Near line: ".cfi_restore    %r13"
    "crypto/aes/aesni-mb-x86_64.s", line 267 : Illegal mnemonic
    Near line: ".cfi_restore    %r12"
    "crypto/aes/aesni-mb-x86_64.s", line 267 : Syntax error
    Near line: ".cfi_restore    %r12"
    "crypto/aes/aesni-mb-x86_64.s", line 269 : Illegal mnemonic
    Near line: ".cfi_restore    %rbp"
    "crypto/aes/aesni-mb-x86_64.s", line 269 : Syntax error
    Near line: ".cfi_restore    %rbp"
    "crypto/aes/aesni-mb-x86_64.s", line 271 : Illegal mnemonic
    Near line: ".cfi_restore    %rbx"
Too many errors - Goodbye
cc: assembler failed for crypto/aes/aesni-mb-x86_64.s

这在rs6000和hpia64等许多其他平台上都可以使用,因此我对一般的构建过程充满了信心;就是说,我既不是C / C ++开发人员,也不是Solaris专家,并且我对此进行故障排除的深度感到有点不足。

[我的最初想法是,从Solaris的编译器切换到gcc;但是,这可能会导致其他需要使用OpenSSL并由本机编译器构建的组件出现问题。

我相信OpenSSL 1.1.x使用Perl模块Text::Template格式化.s文件,因此可能该模块没有执行此处应做的工作;缺少更好的建议,这就是我接下来要探讨的内容。

compiler-errors openssl solaris
1个回答
1
投票

我建议您使用最新的Oracle Developer Studio编译器,可以从https://www.oracle.com/tools/developerstudio/downloads/developer-studio-jsp.html下载此文件>

我们在Solaris 10上的汇编也没有成功,并且我们按如下方式配置OpenSSL:

 ./configure shared no-asm solaris-x86-gcc -lrt

这里重要的一点是no-asm关键字,它使OpenSSL使用C代码而不是汇编代码。

© www.soinside.com 2019 - 2024. All rights reserved.