gpt4 book ai didi

compiler-errors - 在 Solaris_x86 上构建 OpenSSL 时,Assembler 报告非法助记符

转载 作者:行者123 更新时间:2023-12-02 10:45:01 24 4
gpt4 key购买 nike

我正在为 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 并且使用 native 编译器构建的其他组件出现问题。

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

最佳答案

我建议你使用最新的 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 代码而不是汇编的关键字。

关于compiler-errors - 在 Solaris_x86 上构建 OpenSSL 时,Assembler 报告非法助记符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59364035/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com