openssl: Compile fails for Linux x64 due to assembler errors in aesni-xts-avx512.s
I’ve just tried the new 3.5.0-alpha1 release and found an error.
My steps are:
- Download the alpha package
- Run ./Configure (no args)
- Run make
Output:
gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib64/engines-3\"" -DMODULESDIR="\"/usr/local/lib64/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -c -o crypto/aes/libcrypto-lib-aesni-xts-avx512.o crypto/aes/aesni-xts-avx512.s
crypto/aes/aesni-xts-avx512.s: Assembler messages:
crypto/aes/aesni-xts-avx512.s:87: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:88: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:92: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:93: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:97: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:98: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:101: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:102: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:106: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:107: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:111: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:112: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:116: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:117: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:121: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:122: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:126: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:127: Error: operand type mismatch for `vaesenc'
crypto/aes/aesni-xts-avx512.s:130: Error: operand type mismatch for `vaesenclast'
crypto/aes/aesni-xts-avx512.s:131: Error: operand type mismatch for `vaesenclast'
...
GCC version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44.0.3) (GCC)
The base OS is:
NAME="Oracle Linux Server"
VERSION="7.9"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Oracle Linux Server 7.9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:9:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.9
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.9
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (11 by maintainers)
Commits related to this issue
- require GNU assembler 2.30 or higher to build aesni-xtx-avx512.pl The peralsm in aesni-xts-avx512 currently checks for GNU assembler 2.26 or higher. According to reporters it looks like we need 2.30.... — committed to Sashan/openssl by Sashan 2 years ago
- require GNU assembler 2.30 or higher to build aesni-xtx-avx512.pl The peralsm in aesni-xts-avx512 currently checks for GNU assembler 2.26 or higher. According to reporters it looks like we need 2.30.... — committed to openssl/openssl by Sashan 2 years ago
- require GNU assembler 2.30 or higher to build aesni-xtx-avx512.pl The peralsm in aesni-xts-avx512 currently checks for GNU assembler 2.26 or higher. According to reporters it looks like we need 2.30.... — committed to retdec-build/openssl by Sashan 2 years ago
- require GNU assembler 2.30 or higher to build aesni-xtx-avx512.pl The peralsm in aesni-xts-avx512 currently checks for GNU assembler 2.26 or higher. According to reporters it looks like we need 2.30.... — committed to siemens/openssl by Sashan 2 years ago
- require GNU assembler 2.30 or higher to build aesni-xtx-avx512.pl The peralsm in aesni-xts-avx512 currently checks for GNU assembler 2.26 or higher. According to reporters it looks like we need 2.30.... — committed to MichaelA-Fireblocks/openssl by Sashan 2 years ago
- require GNU assembler 2.30 or higher to build aesni-xtx-avx512.pl The peralsm in aesni-xts-avx512 currently checks for GNU assembler 2.26 or higher. According to reporters it looks like we need 2.30.... — committed to MichaelA-Fireblocks/openssl by Sashan 2 years ago
Your fix builds and tests fine here, thanks!
[EDITED]
I also saw https://sourceware.org/binutils/docs/as.html#index-insn-directive but I’ve never used.insnso I don’t know if it would be a better workaround.https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00009.html and the documentation shows it was added in 2.41, which already supports VAES and VPCLMUL.
it looks like we will need to check gnu-assembler version when building those files. can you share output of
gas --versioncommand on your RedHat box.thanks @Andarwinux