Brew Install of OpenSSL3 on macOS High Sierra

1.8k Views Asked by At

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
2

There are 2 best solutions below

0
ipatch On

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

0
mcaldwell On

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