首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在具有MacOS Big Sur 11.2.3的MacMini M1上构建OpenSSL 1.0.2t失败

在具有MacOS Big Sur 11.2.3的MacMini M1上构建OpenSSL 1.0.2t失败
EN

Stack Overflow用户
提问于 2021-04-24 07:56:49
回答 1查看 160关注 0票数 0

我正在尝试从头开始构建OpenSSL 1.0.2t (这个版本是我的项目所必需的,但苹果M1处理器上的MacOS Big Sur 11.2.3不支持它)我的构建失败并显示unknonw directive消息。谁能解释一下我怎么才能修复它?

附注:目前我无法升级到支持的OpenSSL 1.1.1

以下是构建日志:

代码语言:javascript
复制
make all
making all in crypto...
cc -I. -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch arm64 -O3 -DL_ENDIAN -Wall -v -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -c -I/opt/homebrew/opt/libpq/include  -c -o arm64cpuid.o arm64cpuid.S
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: aarch64-apple-darwin20.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
 "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple arm64-apple-macosx11.0.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name arm64cpuid.S -mrelocation-model pic -pic-level 2 -mthread-model posix -mframe-pointer=non-leaf -fno-strict-return -masm-verbose -munwind-tables -target-sdk-version=11.1 -target-cpu vortex -target-feature +v8.3a -target-feature +fp-armv8 -target-feature +neon -target-feature +crc -target-feature +crypto -target-feature +fullfp16 -target-feature +ras -target-feature +lse -target-feature +rdm -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -fallow-half-arguments-and-returns -dwarf-column-info -debugger-tuning=lldb -target-linker-version 609.8 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I . -I .. -I ../include -D OPENSSL_THREADS -D _REENTRANT -D DSO_DLFCN -D HAVE_DLFCN_H -D L_ENDIAN -D SHA1_ASM -D SHA256_ASM -D SHA512_ASM -I /opt/homebrew/opt/libpq/include -I/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -O3 -Wall -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -fdebug-compilation-dir /Users/mobiled2/Projects/OpenSSL/source/crypto -ferror-limit 19 -fmessage-length 318 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fobjc-runtime=macosx-11.0.0 -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /var/folders/yh/d68xsh4x28z1t545mknzlsy00000gn/T/arm64cpuid-f4b3a2.s -x assembler-with-cpp arm64cpuid.S
clang -cc1 version 12.0.0 (clang-1200.0.32.29) default target arm64-apple-darwin20.3.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 .
 ..
 ../include
 /opt/homebrew/opt/libpq/include
 /usr/local/include
 /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
 /Library/Developer/CommandLineTools/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
End of search list.
"/Library/Developer/CommandLineTools/usr/bin/clang" -cc1as -triple arm64-apple-macosx11.0.0 -filetype obj -main-file-name arm64cpuid.S -target-cpu vortex -target-feature +v8.3a -target-feature +fp-armv8 -target-feature +neon -target-feature +crc -target-feature +crypto -target-feature +fullfp16 -target-feature +ras -target-feature +lse -target-feature +rdm -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +sha2 -target-feature +aes -I . -I .. -I ../include -I /opt/homebrew/opt/libpq/include -fdebug-compilation-dir /Users/mobiled2/Projects/OpenSSL/source/crypto -dwarf-debug-producer "Apple clang version 12.0.0 (clang-1200.0.32.29)" -I . -I .. -I ../include -I /opt/homebrew/opt/libpq/include -dwarf-version=4 -mrelocation-model pic -o arm64cpuid.o /var/folders/yh/d68xsh4x28z1t545mknzlsy00000gn/T/arm64cpuid-f4b3a2.s
arm64cpuid.S:8:1: error: unknown directive
.type _armv7_neon_probe,%function
^
arm64cpuid.S:12:1: error: unknown directive
.size _armv7_neon_probe,.-_armv7_neon_probe
^
arm64cpuid.S:15:1: error: unknown directive
.type _armv7_tick,%function
^
arm64cpuid.S:19:1: error: unknown directive
.size _armv7_tick,.-_armv7_tick
^
arm64cpuid.S:22:1: error: unknown directive
.type _armv8_aes_probe,%function
^
arm64cpuid.S:26:1: error: unknown directive
.size _armv8_aes_probe,.-_armv8_aes_probe
^
arm64cpuid.S:29:1: error: unknown directive
.type _armv8_sha1_probe,%function
^
arm64cpuid.S:33:1: error: unknown directive
.size _armv8_sha1_probe,.-_armv8_sha1_probe
^
arm64cpuid.S:36:1: error: unknown directive
.type _armv8_sha256_probe,%function
^
arm64cpuid.S:40:1: error: unknown directive
.size _armv8_sha256_probe,.-_armv8_sha256_probe
^
arm64cpuid.S:42:1: error: unknown directive
.type _armv8_pmull_probe,%function
^
arm64cpuid.S:46:1: error: unknown directive
.size _armv8_pmull_probe,.-_armv8_pmull_probe
^
make[1]: *** [arm64cpuid.o] Error 1
make: *** [build_crypto] Error 1
mobiled2@mac-mini source %
EN

回答 1

Stack Overflow用户

发布于 2021-09-09 07:36:32

尝试禁用汇编程序。通过对构建脚本使用指令"no-asm“,我就能够为M1进行编译。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67238073

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档