在 macOS High Sierra 上 Brew 安装 OpenSSL3

发布于 2025-01-11 06:41:08 字数 1257 浏览 0 评论 0原文

我使用的是 macOS HighSierra 10.13.6,无法 brew install openssl。我修改了 [email protected] 以下 这篇文章但我仍然收到以下错误:

==> make
Last 15 lines from /Users/hahnemann/Library/Logs/Homebrew/openssl@3/02.make:
crypto/bn/rsaz-avx512.s:857:2: error: instruction requires: AVX-512 ISA AVX-512 VL ISA
 vmovdqu64 %ymm1,32(%rdi)
 ^
crypto/bn/rsaz-avx512.s:858:2: error: instruction requires: AVX-512 ISA AVX-512 VL ISA
 vmovdqu64 %ymm2,64(%rdi)
 ^
crypto/bn/rsaz-avx512.s:859:2: error: instruction requires: AVX-512 ISA AVX-512 VL ISA
 vmovdqu64 %ymm3,96(%rdi)
 ^
crypto/bn/rsaz-avx512.s:860:2: error: instruction requires: AVX-512 ISA AVX-512 VL ISA
 vmovdqu64 %ymm4,128(%rdi)
 ^
make[1]: *** [crypto/bn/liblegacy-lib-rsaz-avx512.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [build_sw] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
curl + recursive dependen{cies,ts}: switch to `openssl@3` https://github.com/Homebrew/homebrew-core/pull/85775

I am on macOS HighSierra 10.13.6 and been unable to brew install openssl. I modified [email protected] following this post but I still get the following error:

==> make
Last 15 lines from /Users/hahnemann/Library/Logs/Homebrew/openssl@3/02.make:
crypto/bn/rsaz-avx512.s:857:2: error: instruction requires: AVX-512 ISA AVX-512 VL ISA
 vmovdqu64 %ymm1,32(%rdi)
 ^
crypto/bn/rsaz-avx512.s:858:2: error: instruction requires: AVX-512 ISA AVX-512 VL ISA
 vmovdqu64 %ymm2,64(%rdi)
 ^
crypto/bn/rsaz-avx512.s:859:2: error: instruction requires: AVX-512 ISA AVX-512 VL ISA
 vmovdqu64 %ymm3,96(%rdi)
 ^
crypto/bn/rsaz-avx512.s:860:2: error: instruction requires: AVX-512 ISA AVX-512 VL ISA
 vmovdqu64 %ymm4,128(%rdi)
 ^
make[1]: *** [crypto/bn/liblegacy-lib-rsaz-avx512.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [build_sw] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
curl + recursive dependen{cies,ts}: switch to `openssl@3` https://github.com/Homebrew/homebrew-core/pull/85775

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情绪 2025-01-18 06:41:08

我也遇到了与高山脉非常相似的情况。准确地说是10.13.6。

ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G14042

`sysctl machdep.cpu.features 的输出

sysctl machdep.cpu.features
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH MMX FXSR SSE SSE2 SS HTT SSE3 PCLMULQDQ VMX SSSE3 FMA CX16 PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES VMM PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C

我在 qemu kvm 设置中运行这个操作系统。有趣的是,我也有一个莫哈韦虚拟机设置,但在完全更新/修补的莫哈韦中没有遇到 AVX512 问题。

我昨天看到这篇文章,

https://superuser.com/questions/1669059 /error-with-brew-install-openblas-in-macos


所以让我们看看 openssl 是否有与 NO_AVX512=1 类似的配置标志,

所以看看为 openssl 源提取的 tarball 中的 INSTALL.md 文档 我能看到的最接近的东西是

汇编器模块编译注意事项

汇编器模块中某些代码路径的编译可能取决于
当前汇编程序版本是否支持某些 ISA 扩展
或不。使用 AES-NI、PCLMULQDQ、SSSE3 和 SHA 的代码路径
扩展总是被组装的。除此之外,最低
汇编器版本的要求如下表所示:

| ISA 扩展 | GNU 作为 |纳斯姆| LLVM |
|----------------|--------|--------|---------| | AVX | 2.19
| 2.09 | 2.09 3.0 | | AVX2 | 2.22 | 2.22 2.10 | 2.10 3.1| |
ADCX/ADOX | 2.23 | 2.23 2.10 | 2.10 3.3 | | AVX512 | 2.25 | 2.25
2.11.8 | 3.6()| | AVX512IFMA | 2.26 | 2.26 2.11.8 | 6.0()| | VAES | 2.30 | 2.30 2.13.3 | 6.0 (*) |

<小时>

(*) 尽管在 llvm 3.6 之前实现了 AVX512 支持
版本 7.0 显然需要显式的 -march 标志才能编译
组装模块。但随后编译器会生成特定于处理器的
代码,这又与执行调度的想法相矛盾
运行时,这是由特殊变量促进的
OPENSSL_ia32cap。对于7.0之前的版本,可以工作
通过强制构建过程使用以下内容来解决问题
脚本:

<前><代码>#!/bin/sh
exec clang -no-integrated-as "$@"

而不是真正的叮当声。在这种情况下,什么叮当声并不重要
使用 version ,因为它是 GNU 汇编器的版本
进行检查。

因此,也许可以使用 -no-ingtegerated-as 调整编译命令,或者查看下面的 github 问题,您可以在其中修补 perl 脚本

https://github.com/openssl/openssl/issues/16670#issuecomment-935184461

i'm running into something very similar with high sierra as well. 10.13.6 to be exact.

ProductName:    Mac OS X
ProductVersion: 10.13.6
BuildVersion:   17G14042

the output of `sysctl machdep.cpu.features

sysctl machdep.cpu.features
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH MMX FXSR SSE SSE2 SS HTT SSE3 PCLMULQDQ VMX SSSE3 FMA CX16 PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES VMM PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C

i'm running this OS in a qemu kvm setup. interestingly enough i have a mojave vm setup as well, but did not run into AVX512 issue with a fully updated/patched mojave.

i came across this post yesterday,

https://superuser.com/questions/1669059/error-with-brew-install-openblas-in-macos


so let's see if openssl has similar configure flag as NO_AVX512=1

so looking at the INSTALL.md doc within the extracted tarball for the openssl source the closest thing i could see is

Notes on assembler modules compilation

Compilation of some code paths in assembler modules might depend on
whether the current assembler version supports certain ISA extensions
or not. Code paths that use the AES-NI, PCLMULQDQ, SSSE3, and SHA
extensions are always assembled. Apart from that, the minimum
requirements for the assembler versions are shown in the table below:

| ISA extension | GNU as | nasm | llvm |
|---------------|--------|--------|---------| | AVX | 2.19
| 2.09 | 3.0 | | AVX2 | 2.22 | 2.10 | 3.1 | |
ADCX/ADOX | 2.23 | 2.10 | 3.3 | | AVX512 | 2.25 |
2.11.8 | 3.6 () | | AVX512IFMA | 2.26 | 2.11.8 | 6.0 () | | VAES | 2.30 | 2.13.3 | 6.0 (*) |


(*) Even though AVX512 support was implemented in llvm 3.6, prior to
version 7.0 an explicit -march flag was apparently required to compile
assembly modules. But then the compiler generates processor-specific
code, which in turn contradicts the idea of performing dispatch at
run-time, which is facilitated by the special variable
OPENSSL_ia32cap. For versions older than 7.0, it is possible to work
around the problem by forcing the build procedure to use the following
script:

#!/bin/sh
exec clang -no-integrated-as "$@"

instead of the real clang. In which case it doesn't matter what clang
version is used, as it is the version of the GNU assembler that will
be checked.

so maybe adjusting the compile command with -no-ingtegrated-as or see the below github issue where you can patch the perl script

https://github.com/openssl/openssl/issues/16670#issuecomment-935184461

梦在深巷 2025-01-18 06:41:08

我昨天遇到了这个错误,并且能够通过执行以下操作来安装 openssl3 (请参阅 github 上的帖子)。我必须更新 openssl 的构建脚本,以不使用不可用的 cpu 指令。希望这有帮助!

https://github.com/openssl/openssl/issues/16670#issuecomment- 1268671564

I ran into this error yesterday, and was able to get openssl3 to install by doing the following (see post on github). I had to update the build script for openssl to not use the unavailable cpu instructions. Hope this helps!

https://github.com/openssl/openssl/issues/16670#issuecomment-1268671564

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文