intel / isa-l

Intelligent Storage Acceleration Library
Other
953 stars 299 forks source link

Windows build fails - yasm doesn't understand %use #285

Open thiagomacieira opened 7 months ago

thiagomacieira commented 7 months ago

NASM is present, but ISA-L wants to use YASM

checking for yasm... yes
checking for modern yasm... yes
checking for optional yasm AVX512 support... no
checking for nasm... yes
checking for modern nasm... yes
checking for optional nasm AVX512 support... yes
checking for additional nasm AVX512 support... yes
Assembler does not understand AVX512 opcodes.  Consider upgrading for best performance.
Using yasm args target "mingw" "-f win64"

The build then fails with:

  MKTMP    mem/mem_zero_detect_avx512.s
/bin/sh ./libtool    --mode=compile ../tools/yasm-filter.sh -f win64 -I ../include/ -I ../erasure_code -I ../crc -I ../igzip -I ../tests/fuzz -I ../examples/ec -DPACKAGE_NAME=\"libisal\" -DPACKAGE_TARNAME=\"isa-l\" -DPACKAGE_VERSION=\"2.31.0\" -DPACKAGE_STRING=\"libisal\ 2.31.0\" -DPACKAGE_BUGREPORT=\"https://github.com/intel/isa-l/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"isa-l\" -DVERSION=\"2.31.0\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DSTDC_HEADERS=1 -D_ALL_SOURCE=1 -D_DARWIN_C_SOURCE=1 -D_GNU_SOURCE=1 -D_HPUX_ALT_XOPEN_SOCKET_API=1 -D_NETBSD_SOURCE=1 -D_OPENBSD_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D__STDC_WANT_IEC_60559_ATTRIBS_EXT__=1 -D__STDC_WANT_IEC_60559_BFP_EXT__=1 -D__STDC_WANT_IEC_60559_DFP_EXT__=1 -D__STDC_WANT_IEC_60559_FUNCS_EXT__=1 -D__STDC_WANT_IEC_60559_TYPES_EXT__=1 -D__STDC_WANT_LIB_EXT2__=1 -D__STDC_WANT_MATH_SPEC_FUNCS__=1 -D_TANDEM_SOURCE=1 -D__EXTENSIONS__=1 -DLT_OBJDIR=\".libs/\" -DAS_FEATURE_LEVEL=4 -DHAVE_LIMITS_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MALLOC=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_GETOPT=1  -O3 -mcrtdll=ucrt -D_UCRT -c -o mem/mem_zero_detect_avx512.lo mem/mem_zero_detect_avx512.s
libtool: compile:  ../tools/yasm-filter.sh -f win64 -I ../include/ -I ../erasure_code -I ../crc -I ../igzip -I ../tests/fuzz -I ../examples/ec -DPACKAGE_NAME=\"libisal\" -DPACKAGE_TARNAME=\"isa-l\" -DPACKAGE_VERSION=\"2.31.0\" "-DPACKAGE_STRING=\"libisal 2.31.0\"" -DPACKAGE_BUGREPORT=\"https://github.com/intel/isa-l/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"isa-l\" -DVERSION=\"2.31.0\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DSTDC_HEADERS=1 -D_ALL_SOURCE=1 -D_DARWIN_C_SOURCE=1 -D_GNU_SOURCE=1 -D_HPUX_ALT_XOPEN_SOCKET_API=1 -D_NETBSD_SOURCE=1 -D_OPENBSD_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D__STDC_WANT_IEC_60559_ATTRIBS_EXT__=1 -D__STDC_WANT_IEC_60559_BFP_EXT__=1 -D__STDC_WANT_IEC_60559_DFP_EXT__=1 -D__STDC_WANT_IEC_60559_FUNCS_EXT__=1 -D__STDC_WANT_IEC_60559_TYPES_EXT__=1 -D__STDC_WANT_LIB_EXT2__=1 -D__STDC_WANT_MATH_SPEC_FUNCS__=1 -D_TANDEM_SOURCE=1 -D__EXTENSIONS__=1 -DLT_OBJDIR=\".libs/\" -DAS_FEATURE_LEVEL=4 -DHAVE_LIMITS_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MALLOC=1 -DHAVE_MEMMOVE=1 -DHAVE_MEMSET=1 -DHAVE_GETOPT=1 -O3 -mcrtdll=ucrt -D_UCRT -c mem/mem_zero_detect_avx512.s -o mem/mem_zero_detect_avx512.o
mem/mem_zero_detect_avx512.s:70: error: unknown preprocessor directive `%use'
mem/mem_zero_detect_avx512.s:70: error: label or instruction expected at start of line
mem/mem_zero_detect_avx512.s:70: error: instruction expected after label
mem/mem_zero_detect_avx512.s:88: error: instruction expected after label
mem/mem_zero_detect_avx512.s:89: error: instruction expected after label
mem/mem_zero_detect_avx512.s:89: warning: ignoring unrecognized character `{'
mem/mem_zero_detect_avx512.s:89: warning: ignoring unrecognized character `}'
mem/mem_zero_detect_avx512.s:89: warning: ignoring unrecognized character `{'
mem/mem_zero_detect_avx512.s:89: warning: ignoring unrecognized character `}'
mem/mem_zero_detect_avx512.s:92: error: instruction expected after label
mem/mem_zero_detect_avx512.s:94: error: instruction expected after label
mem/mem_zero_detect_avx512.s:101: error: undefined symbol `ktestq.mem_z_small_block' (first use)
mem/mem_zero_detect_avx512.s:101: error:  (Each undefined symbol is reported only once.)
mem/mem_zero_detect_avx512.s:106: error: instruction expected after label
mem/mem_zero_detect_avx512.s:107: error: instruction expected after label
mem/mem_zero_detect_avx512.s:112: error: instruction expected after label
mem/mem_zero_detect_avx512.s:113: error: instruction expected after label
mem/mem_zero_detect_avx512.s:115: error: undefined symbol `kmovq.mem_z_loop' (first use)
mem/mem_zero_detect_avx512.s:129: error: instruction expected after label
mem/mem_zero_detect_avx512.s:130: error: instruction expected after label
mem/mem_zero_detect_avx512.s:131: error: instruction expected after label
mem/mem_zero_detect_avx512.s:131: warning: ignoring unrecognized character `{'
mem/mem_zero_detect_avx512.s:131: warning: ignoring unrecognized character `}'
mem/mem_zero_detect_avx512.s:131: warning: ignoring unrecognized character `{'
mem/mem_zero_detect_avx512.s:131: warning: ignoring unrecognized character `}'
mem/mem_zero_detect_avx512.s:132: error: instruction expected after label
mem/mem_zero_detect_avx512.s:132: warning: ignoring unrecognized character `{'
mem/mem_zero_detect_avx512.s:132: warning: ignoring unrecognized character `}'
mem/mem_zero_detect_avx512.s:132: warning: ignoring unrecognized character `{'
mem/mem_zero_detect_avx512.s:132: warning: ignoring unrecognized character `}'
mem/mem_zero_detect_avx512.s:133: error: instruction expected after label
mem/mem_zero_detect_avx512.s:134: error: instruction expected after label
mem/mem_zero_detect_avx512.s:135: error: instruction expected after label
make[1]: *** [Makefile:3780: mem/mem_zero_detect_avx512.lo] Error 1
swhzzh commented 5 months ago

I have met the same problem in debian 9.13 with gcc 6.3 when building v2.31.0, and I can build v2.26.0 successfully.

pablodelara commented 5 months ago

Thanks for flagging this. Given that yasm is falling behind nasm (no official release in 5 years), we will remove YASM support. Does Debian 9.13 have NASM?

rhpvorderman commented 5 months ago

Yes:

Depends: aircrack-ng, bfbtester, binutils, binwalk, bruteforce-luks, bzip2, cabextract, chntpw, cmospwd, crunch, cryptmount, cupp, dcfldd, disktype, dnsutils, ethstatus, ethtool, exfat-fuse, exfat-utils, exif, exiftags, exiv2, fatcat, fdupes, flasm, foremost, gdisk, geoip-bin, gifshuffle, hashcat, hashid, hexcompare, hexedit, hwinfo, hydra, jdupes, john, lcrack, less, libimage-exiftool-perl, lshw, maskprocessor, mc, mdadm, medusa, memstat, mpack, nasm, ncrack, neopi, netcat, nmap, ntfs-3g, ophcrack-cli, outguess, p7zip-full, parted, patator, pcapfix, pdfcrack, pecomato, pev, polenum, poppler-utils, rarcrack, samdump2, sipcrack, smb-nat, snowdrop, statsprocessor, stegosuite, stegsnow, sucrack, sxiv, tcpdump, tcpflow, tcpick, tcpreplay, tcpxtract, telnet, testdisk, tshark, uni2ascii, unrar-free, unzip, wamerican, wamerican-huge, wamerican-insane, wamerican-large, wamerican-small, wbrazilian, wbritish, wbritish-huge, wbritish-insane, wbritish-large, wbritish-small, wbulgarian, wcanadian, wcanadian-huge, wcanadian-insane, wcanadian-large, wcanadian-small, wcatalan, weplab, wfrench, wgaelic, wgerman-medical, whois, wirish, witalian, wmanx, wpolish, wportuguese, wspanish, wswedish, wukrainian, xxd
Depends: libc6 (>= 2.14), libgcc1 (>= 1:3.0), libgportugol0, libpcrecpp0v5 (>= 7.7), libstdc++6 (>= 5.2), nasm
Package: nasm
Source: nasm (2.12.01-1)
Homepage: http://www.nasm.us/
Filename: pool/main/n/nasm/nasm_2.12.01-1+b1_amd64.deb
Package: nasm-mozilla
Homepage: http://www.nasm.us/
Filename: pool/main/n/nasm-mozilla/nasm-mozilla_2.14-1~deb9u1_amd64.deb
swhzzh commented 5 months ago

Thanks for flagging this. Given that yasm is falling behind nasm (no official release in 5 years), we will remove YASM support. Does Debian 9.13 have NASM?

Thanks, i install nasm and remove yasm and then build isa-l successfully.