Can not built latest vectorIntrinsic on Windows (Was: Testing Vector API; which branch to build?)
Viswanathan, Sandhya
sandhya.viswanathan at intel.com
Thu Jan 28 02:25:48 UTC 2021
Hi Lev,
Thanks for looking into it.
Adding /nologo to ml64 command and filtering the output helps remove the verbosity:
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -438,7 +438,8 @@ define SetupCompileNativeFileBody
# For assembler calls, no need to build dependency list.
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
$$($1_COMPILER) $$($1_FLAGS) \
- $(CC_OUT_OPTION)$$($1_OBJ) /Ta $$($1_SRC_FILE)))
+ $(CC_OUT_OPTION)$$($1_OBJ) /nologo /c /Ta $$($1_SRC_FILE) 2>&1 \
+ | $(TR) -d '\r' | $(GREP) -v -e "Assembling:" || test "$$$$?" = "1" ;))
endif
endif
endif
Also, the ml64 vs ml selection could be done based on 32 bit or 64 bit platform, e.g. something like below:
--- a/make/autoconf/toolchain.m4
+++ b/make/autoconf/toolchain.m4
@@ -696,8 +696,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
AS="$CC -c"
else
- # On windows, the assember is "ml.exe"
- UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml)
+ if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
+ # On 64 bit windows, the assember is "ml64.exe"
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml64)
+ else
+ # otherwise, the assember is "ml.exe"
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml)
+ fi
fi
AC_SUBST(AS)
@@ -853,7 +858,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
# On windows, the assember is "ml.exe". We currently don't need this so
# do not require.
- UTIL_LOOKUP_PROGS(BUILD_AS, ml, [$VS_PATH])
+ if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
+ # On 64 bit windows, the assember is "ml64.exe"
+ UTIL_LOOKUP_PROGS(BUILD_AS, ml64, [$VS_PATH])
+ else
+ # otherwise the assember is "ml.exe"
+ UTIL_LOOKUP_PROGS(BUILD_AS, ml, [$VS_PATH])
+ fi
# On windows, the ar tool is lib.exe (used to create static libraries).
# We currently don't need this so do not require.
Do you plan to submit the fix to panama-dev?
Best Regards,
Sandhya
-----Original Message-----
From: Lev Serebryakov <lev at serebryakov.spb.ru>
Sent: Wednesday, January 27, 2021 2:25 PM
To: Paul Sandoz <paul.sandoz at oracle.com>; Viswanathan, Sandhya <sandhya.viswanathan at intel.com>
Cc: panama-dev at openjdk.java.net' <panama-dev at openjdk.java.net>
Subject: Re: Can not built latest vectorIntrinsic on Windows (Was: Testing Vector API; which branch to build?)
On 27.01.2021 19:34, Paul Sandoz wrote:
Looks like command line for ml.exe (MS' assembler) is wrong:
/cygdrive/c/home/ref/panama-vector/build/windows-x86_64-server-release/fixpath exec \
/cygdrive/c/progra~2/micros~2/2019/commun~1/vc/tools/msvc/1428~1.293/bin/hostx86/x86/ml.exe \
-Fo/cygdrive/c/home/ref/panama-vector/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/svml_d_acos_windows_x86.obj \
/Ta /cygdrive/c/home/ref/panama-vector/src/hotspot/os_cpu/windows_x86/svml_d_acos_windows_x86.s
/Ta is "trust this source, even if extension is not asm"
-Fo is "output object file", but it should be "/Fo", really and there should be /c after it ("assemble only, don't link")...
Also, "ml.exe" is 32-bit assembelr with 32-bit output. ml64.exe is needed here (as Win32 32 bit is not supported by JDK anymore).
Ok, I found solution (by searching for "/Ta"). Patch attached.
This is not full solution, it doesn't hide ML's output (banner & all this), but it allows to compile panama/vectorIntrinsic on Windows.
> Hi,
>
> Unfortunately there are some build issues on windows for the vectorIntrinsics related to SVML files (e.g. for the vectorized transcendental functions). Sandhya may have more details as to what is going on.
>
> Paul.
>
>> On Jan 27, 2021, at 2:56 AM, Lev Serebryakov <lev at serebryakov.spb.ru> wrote:
>>
>> On 27.01.2021 4:38, jiefu(傅杰) wrote:
>>
>> I can not build
>> https://github.com/openjdk/panama-vector/tree/vectorIntrinsics
>> fcc36ceb040 on Windows 10 with MSVS 2019 Community
>>
>> There is problems with assembler source files:
>>
>> Microsoft (R) Macro Assembler Version 14.28.29336.0 Copyright (C)
>> Microsoft Corporation. All rights reserved.
>>
>> Microsoft (R) Incremental Linker Version 14.28.29336.0 Copyright (C)
>> Microsoft Corporation. All rights reserved.
>>
>> /OUT:svml_d_acos_windows_x86.exe
>> c:\home\ref\panama-vector\build\windows-x86_64-server-release\hotspot
>> \variant-server\libjvm\objs\svml_d_acos_windows_x86.obj
>> LINK : fatal error LNK1561: entry point must be defined
>> Assembling:
>> c:\home\ref\panama-vector\src\hotspot\os_cpu\windows_x86\svml_d_acos_
>> windows_x86.s
>> make[3]: *** [lib/CompileJvm.gmk:143:
>> /cygdrive/c/home/ref/panama-vector/build/windows-x86_64-server-releas
>> e/hotspot/variant-server/libjvm/objs/svml_d_acos_windows_x86.obj]
>> Error 25
>> make[3]: *** Deleting file '/cygdrive/c/home/ref/panama-vector/build/windows-x86_64-server-release/hotspot/variant-server/libjvm/objs/svml_d_acos_windows_x86.obj'
>>
>>
>>> https://github.com/openjdk/panama-vector/tree/vectorIntrinsics , or
>>> https://github.com/openjdk/jdk Both of them will be updated from
>>> time to time.
>>> Since https://github.com/openjdk/panama-vector/tree/vectorIntrinsics had merged the master several days ago, I think it is fine to you.
>>
>>
>> --
>> // Black Lion AKA Lev Serebryakov
>
--
// Black Lion AKA Lev Serebryakov
More information about the panama-dev
mailing list