Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mem_zero_detect_avx512.s:70: error: unknown preprocessor directive `%use' #305

Closed
brechtsanders opened this issue Jan 7, 2025 · 12 comments

Comments

@brechtsanders
Copy link

When building isa-l 2.31.1 on Windows (64-bit) using MinGW-w64 the build fails with the following output:

  MKTMP    mem/mem_zero_detect_avx512.s
  CCAS     mem/mem_zero_detect_avx512.lo
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:3777: mem/mem_zero_detect_avx512.lo] Error 1
rm mem/mem_zero_detect_avx512.s
make: *** [Makefile:2363: all] Error 2
@pablodelara
Copy link
Contributor

Hi @brechtsanders. Is NASM installed in your system?

@brechtsanders
Copy link
Author

Yes (version 2.16.01)

@pablodelara
Copy link
Contributor

Can you remove YASM from the system?

@brechtsanders
Copy link
Author

Then I would get: configure: error: Mingw build requires Yasm 1.2.0 or later.

@pablodelara
Copy link
Contributor

Could you share the commands you used?

@brechtsanders
Copy link
Author

brechtsanders commented Jan 7, 2025 via email

@brechtsanders
Copy link
Author

I tried a dirty patch forcing nasm and that does seem to build:

patch -ulbf configure.ac << EOF
@@ -249,7 +249,3 @@
   if test x"\$arch" = x"mingw"; then
-    AS=yasm
-    as_feature_level=\$yasm_feature_level
-    if test \$as_feature_level -lt 2 ; then
-      AC_MSG_ERROR([Mingw build requires Yasm 1.2.0 or later.])
-    fi
+    AS=nasm
   fi
EOF

@pablodelara
Copy link
Contributor

Could you test #309?

@pablodelara
Copy link
Contributor

YASM support should be fixed now in mainline.

@brechtsanders
Copy link
Author

Tested #309 and it builds.

Why did I get the Mingw build requires Yasm 1.2.0 or later while it actually does work? Is that something that should be fixed?

If both nasm and yasm are available on Windows build, wouldn't it be wiser to select the one supporting the broadest feature set?

@pablodelara
Copy link
Contributor

Thanks for your confirmation. From past comments, Windows needed YASM:

Fix for nasm missing windows features

if test x"$arch" = x"mingw"; then
AS=yasm
as_feature_level=$yasm_feature_level
if test $as_feature_level -lt 2 ; then
AC_MSG_ERROR([Mingw build requires Yasm 1.2.0 or later.])
fi
fi

This looks like it is not the case anymore, so it should work for both YASM and NASM.

@pablodelara
Copy link
Contributor

We are removing YASM support in the next major release, so I'll close this issue now and switch to NASM only after the minor 2.31.1 release, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants