SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
237 stars 89 forks source link

Missing support for clang builds under Windows MSVC #629

Closed Peter-J-Jansen closed 6 months ago

Peter-J-Jansen commented 6 months ago

Currently support for CLANG builds under Windows MSVC is missing, but would be easy to add. If environment variable CL is set then the "cc" command can be replaced with "clang-cl" to perform clang builds under Windows MSVC. Two files would need to be changed to allow such CLANG builds.

--- SDL-hyperion/makefile-dllmod.msvc   2024-02-19 11:03:37.587664151 +0100
+++ makefile-dllmod.msvc        2024-02-20 12:06:13.844655269 +0100
@@ -36,6 +36,16 @@
 dlllflags   =  /INCREMENTAL:NO /NOLOGO -dll
 rcvars      =  -DWIN32 -D_WIN32 -DWINVER=$(NMAKE_WINVER)

+# We use CLANG if the CL envrionment variable is set, e.g. with a  SET "CL=-mcx16 /w"
+# The -DHAVE_SOCKLEN_T avoids a type redefinition from "ws2tcpip.h"
+
+!IFDEF CL
+
+cc      =  clang-cl
+cflags  =  $(cflags) -DHAVE_SOCKLEN_T
+
+!ENDIF
+
 # Now set values unique to architecture and/or build...

 !IF "$(CFG)" == "DEBUG"

Without adding the SET "CL=-mcx16 /w" nothing changes. The reason for the additional -DHAVE_SOCKLEN_T option is to avoid this error :

        clang-cl /O2 /GL /D NDEBUG /Zi  -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0600 -DNTDDI_VERSION=0x06000000 -D_WIN32_IE=0x0700 -DWINVER=0x0600 -D_AMD64_=1 -DWIN64 -D_WIN64 /D HAVE_ZLIB /D HAVE_ZLIB_H /I"\Qsync\Packages\zlib-1.2.5\x64/include" /D HAVE_BZLIB_H /I"\Qsync\Packages\bzip2-1.0.6\x64" /D HAVE_PCRE /I"\Qsync\Packages\pcre-8.20\inc" /D PCRE_INCNAME=\"pcreposix.h\"  /D HAVE_OBJECT_REXX /I"C:\Program Files\ooRexx\api" /D HAVE_REXX_H /D HAVE_OOREXXAPI_H  /D ENABLE_IPV6 /we4702 /WX  /D _MSVC_ /D MAX_CPU_ENGS=16 /D HOST_ARCH=AMD64 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE /wd4172 /wd4312 /wd4996 /w14296 /we4101 /we4102 /MP /favor:INTEL64  /D FD_SETSIZE=1024  -D VERSION=\""4.7.0.11088-SDL-DEV-gfffc1f57-modified"\" -D VERS_MAJ=4 -D VERS_INT=7 -D VERS_MIN=0 -D VERS_BLD=11088 /Fp"msvc.AMD64.obj\\build_pch.pch" /Yc"hstdinc.h" -D_MT -D_DLL -MD /Fo"msvc.AMD64.obj\\" /Fd"msvc.AMD64.obj\\" build_pch.c
In file included from build_pch.c:8:
In file included from ./hstdinc.h:312:
./htypes.h(140,29): error: typedef redefinition with different types ('unsigned int' vs 'int')
  typedef  unsigned int     socklen_t;
                            ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\ws2tcpip.h(496,13): note: previous definition is here
typedef int socklen_t;
            ^
1 error generated.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin\clang-cl.EXE"' : return code '0x1'
Stop

A second file needs to be changed (actually corrected) as well :

--- SDL-hyperion/w32util.c      2024-02-19 11:03:38.003664596 +0100
+++ w32util.c   2024-02-20 12:36:37.700267762 +0100
@@ -4696,12 +4696,12 @@

 //////////////////////////////////////////////////////////////////////////////////////////

-DLL_EXPORT int w32_mlock( void* addr, size_t len )
+DLL_EXPORT int w32_mlock( const void* addr, size_t len )
 {
     return VirtualLock( addr, len ) ? 0 : -1;
 }

-DLL_EXPORT int w32_munlock( void* addr, size_t len )
+DLL_EXPORT int w32_munlock( const void* addr, size_t len )
 {
     return VirtualUnlock( addr, len ) ? 0 : -1;
 }

This last correction is because MSVC Windows' CLANG v.12 will otherwise complain about this error :

        clang-cl /O2 /GL /D NDEBUG /Zi  -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0600 -DNTDDI_VERSION=0x06000000 -D_WIN32_IE=0x0700 -DWINVER=0x0600 -DHAVE_SOCKLEN_T -D_AMD64_=1 -DWIN64 -D_WIN64 /D HAVE_ZLIB /D HAVE_ZLIB_H /I"\Qsync\Packages\zlib-1.2.5\x64/include" /D HAVE_BZLIB_H /I"\Qsync\Packages\bzip2-1.0.6\x64" /D HAVE_PCRE /I"\Qsync\Packages\pcre-8.20\inc" /D PCRE_INCNAME=\"pcreposix.h\"  /D HAVE_OBJECT_REXX /I"C:\Program Files\ooRexx\api" /D HAVE_REXX_H /D HAVE_OOREXXAPI_H  /D ENABLE_IPV6 /we4702 /WX  /D _MSVC_ /D MAX_CPU_ENGS=16 /D HOST_ARCH=AMD64 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE /wd4172 /wd4312 /wd4996 /w14296 /we4101 /we4102 /MP /favor:INTEL64  /D FD_SETSIZE=1024  -D VERSION=\""4.7.0.11078-SDL-DEV-g79a14889"\" -D VERS_MAJ=4 -D VERS_INT=7 -D VERS_MIN=0 -D VERS_BLD=11078 /I. /Fp"msvc.AMD64.obj\\build_pch.pch" /Yu"hstdinc.h" -D_MT -D_DLL -MD /Fo"msvc.AMD64.obj\\" /Fd"msvc.AMD64.obj\\" codepage.c fthreads.c getopt.c hdl.c hostinfo.c hscutl.c hexdumpe.c logger.c logmsg.c memrchr.c parser.c hthreads.c pttrace.c version.c hsocket.c w32util.c
w32util.c(4699,16): error: conflicting types for 'w32_mlock'
DLL_EXPORT int w32_mlock( void* addr, size_t len )
               ^
./w32util.h(246,22): note: previous declaration is here
W32_DLL_IMPORT int   w32_mlock   (const void *addr, size_t len);
                     ^
w32util.c(4704,16): error: conflicting types for 'w32_munlock'
DLL_EXPORT int w32_munlock( void* addr, size_t len )
               ^
./w32util.h(247,22): note: previous declaration is here
W32_DLL_IMPORT int   w32_munlock (const void *addr, size_t len);
                     ^
2 errors generated.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin\clang-cl.EXE"' : return code '0x1'
Stop.

This is what would be required for CLANG builds under MSVC Windows to be supported. I have been testing quite extensively this MSVC Windows CLANG builds and they work perfectly well for me. Shall I go ahead and commit these improvements please ?

Thanks,

Peter

wrljet commented 6 months ago

Peter,

Does Hercules run faster when compiled with Clang?

I don't think CL is a good choice for that environment variable. CL is sometimes used to specify a different compiler, rather than the option flags for it.

I applied your above changes to try out, and get this error pretty quickly:

   Creating library msvc.AMD64.obj\hsys.lib and object msvc.AMD64.obj\hsys.exp
LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance
fthreads.c(948,9): error: incompatible function pointer types passing 'DWORD (void *) __attribute__((stdcall))'
      (aka 'unsigned long (void *)') to parameter of type '_beginthreadex_proc_type' (aka 'unsigned int (*)(void *)')
      [-Wincompatible-function-pointer-types]
  948 |         MyCreateThread ( NULL, nStackSize, FTWin32ThreadFunc, pCallTheirThreadParms, 0, &dwThreadID );
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fthreads.c(28,106): note: expanded from macro 'MyCreateThread'
   28 | #define MyCreateThread(sec,stack,start,parm,flags,tid)  ((HANDLE) _beginthreadex((sec),(unsigned)(stack),(start),(parm),(...
      |                                                                                                          ^~~~~~~
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt\process.h(99,40): note: passing argument to parameter
      '_StartAddress' here
   99 |     _In_      _beginthreadex_proc_type _StartAddress,
      |                                        ^
1 error generated.
NMAKE : fatal error U1077: 'clang-cl /O2 /GL /D NDEBUG /Zi  -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0600 -DNTDDI_VERSION=0x06000000 -D_WIN32_IE=0x0700 -DWINVER=0x0600 -DHAVE_SOCKLEN_T -D_AMD64_=1 -DWIN64 -D_WIN64 /D HAVE_ZLIB /D HAVE_ZLIB_H /I"winbuild\zlib\x64/include" /D HAVE_BZLIB_H /I"winbuild\bzip2\x64" /D HAVE_PCRE /I"winbuild\pcre\x64\include" /D PCRE_INCNAME=\"pcreposix.h\"  /D HAVE_OBJECT_REXX /I"C:\Program Files\ooRexx\api" /D HAVE_REXX_H /D HAVE_OOREXXAPI_H  /D ENABLE_IPV6 /we4702 /WX  /D _MSVC_ /D MAX_CPU_ENGS=8  /D CUSTOM_BUILD_STRING=\""*** Hercules-Helper Test Build ***"\" /D HOST_ARCH=AMD64 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE /wd4172 /wd4312 /wd4996 /w14296 /we4101 /we4102 /MP /favor:INTEL64  /D FD_SETSIZE=1024  -D VERSION=\""4.7.0.11088-SDL-DEV-gfffc1f57-modified"\" -D VERS_MAJ=4 -D VERS_INT=7 -D VERS_MIN=0 -D VERS_BLD=11088 /I. /Fp"msvc.AMD64.obj\\build_pch.pch" /Yu"hstdinc.h" -D_MT -D_DLL -MD /Fo"msvc.AMD64.obj\\" /Fd"msvc.AMD64.obj\\" codepage.c fthreads.c getopt.c hdl.c hostinfo.c hscutl.c hexdumpe.c logger.c logmsg.c memrchr.c parser.c hthreads.c pttrace.c version.c hsocket.c w32util.c ' : return code '0x1'

Bill

Peter-J-Jansen commented 6 months ago

Hi Bill,

Thanks for your feedback !

The choice of CL as the environment variable triggering the CLANG build is not mine, but rather what was decided by Microsoft as the variable where the clang-cl command picks up its additional parameters. The setting of it, SET "CL=-mcx16 /w" as I commented in makefile-dllmod.msvc, is actually needed for a successful SDL-hyperion build.

You were right in that the Windows 11 VS 2022, which is already at CLANG version 16.0.5 or so (whereas my Windows 10 VS 2019 is at CLANG version 12.0.x) indeed needs one more correction to two files, changing ReadStdInThread from DWORD to unsigned, as follows :

--- SDL-hyperion/w32util.c      2024-02-19 11:03:38.003664596 +0100
+++ w32util.c   2024-02-20 17:32:33.061944693 +0100
@@ -2216,7 +2216,7 @@
 // at a time. This may perhaps be slightly inefficient but it makes for a simpler
 // implementation and besides, we don't really expect huge gobs of data coming in.

-static DWORD WINAPI ReadStdInThread( LPVOID lpParameter )
+static unsigned WINAPI ReadStdInThread( LPVOID lpParameter )
 {
     DWORD   dwBytesRead  = 0;

@@ -4696,12 +4696,12 @@

 //////////////////////////////////////////////////////////////////////////////////////////

-DLL_EXPORT int w32_mlock( void* addr, size_t len )
+DLL_EXPORT int w32_mlock( const void* addr, size_t len )
 {
     return VirtualLock( addr, len ) ? 0 : -1;
 }

-DLL_EXPORT int w32_munlock( void* addr, size_t len )
+DLL_EXPORT int w32_munlock( const void* addr, size_t len )
 {
     return VirtualUnlock( addr, len ) ? 0 : -1;
 }

--- SDL-hyperion/fthreads.c     2024-02-19 11:03:37.563664125 +0100
+++ fthreads.c  2024-02-20 17:36:18.867419892 +0100
@@ -787,7 +787,7 @@

 //----------------------------------------------------------------------------------

-static DWORD  __stdcall  FTWin32ThreadFunc
+static unsigned __stdcall  FTWin32ThreadFunc
 (
     void*  pMyArgs
 )

Please let me know how this would work for you. As to your question as to whether the CLANG built SDL-hyperion is faster, I got the feeling that it was a wee bit faster, but must admit I did not make measurements, so that feeling is not very scientific. My main motivation was being able to use code / vscode as my LLDB testing platform on both Ubuntu and Windows.

Cheers,

Peter

wrljet commented 6 months ago

Peter,

This was done on Windows 10, VS2022 17.9.0, with this version of Clang:

C:\Program Files\Microsoft Visual Studio\2022\Community>clang-cl.exe --version
clang version 17.0.3
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin

I applied your other edits, and it builds OK!

Clang sure is a lot slower building than with MSVC! A lot of the time it wasted in Windows Defender, scanning god knows what. So I added an exclusion rule for the build directory. That helps, but Windows Antimalware still pops up a lot in Task Man. TortoiseGit status cache burns up a lot of time, too. You can always count on Windows to be very annoying.

Running the resulting Hercules, with my canned MVS SYSGEN JCL, it's approximately the same elapsed time as with MSVC.

Bill

Peter-J-Jansen commented 6 months ago

Thanks for the positive feedback Bill. Commit 5c33c1f closes this issue.

Cheers,

Peter

wrljet commented 6 months ago

When not using Clang, it doesn't build.

w32util.c
w32util.c(4701): error C2220: the following warning is treated as an error
w32util.c(4701): warning C4090: 'function': different 'const' qualifiers
w32util.c(4706): warning C4090: 'function': different 'const' qualifiers
NMAKE : fatal error U1077: 'cl /O2 /GL /D NDEBUG /Zi  -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0600 -DNTDDI_VERSION=0x06000000 -D_WIN32_IE=0x0700 -DWINVER=0x0600 -D_AMD64_=1 -DWIN64 -D_WIN64 /D HAVE_ZLIB /D HAVE_ZLIB_H /I"winbuild\zlib\x64/include" /D HAVE_BZLIB_H /I"winbuild\bzip2\x64" /D HAVE_PCRE /I"winbuild\pcre\x64\include" /D PCRE_INCNAME=\"pcreposix.h\"  /D HAVE_OBJECT_REXX /I"C:\Program Files\ooRexx\api" /D HAVE_REXX_H /D HAVE_OOREXXAPI_H  /D ENABLE_IPV6 /we4702 /WX  /D _MSVC_ /D MAX_CPU_ENGS=8  /D CUSTOM_BUILD_STRING=\""*** Hercules-Helper Test Build ***"\" /D HOST_ARCH=AMD64 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE /wd4172 /wd4312 /wd4996 /w14296 /we4101 /we4102 /MP /favor:INTEL64  /D FD_SETSIZE=1024  -D VERSION=\""4.7.0.11091-SDL-DEV-g5c33c1ff"\" -D VERS_MAJ=4 -D VERS_INT=7 -D VERS_MIN=0 -D VERS_BLD=11091 /I. /Fp"msvc.AMD64.obj\\build_pch.pch" /Yu"hstdinc.h" -D_MT -D_DLL -MD /Fo"msvc.AMD64.obj\\" /Fd"msvc.AMD64.obj\\" codepage.c fthreads.c getopt.c hdl.c hostinfo.c hscutl.c hexdumpe.c logger.c logmsg.c memrchr.c parser.c hthreads.c pttrace.c version.c hsocket.c w32util.c ' : return code '0x2'
Stop.
makefile.bat ended on Wed 02/21/2024 at 10:58:20.17, rc=2

Bill

wrljet commented 6 months ago

With Clang I'm seeing some tests fail:

Also I'm seeing these tests fail:

>>>>> line  1989: Received unexpected wait state:  0002000000000000 0000000000000BAD
Test "bfp-004-cvttolog: Test IEEE Convert To Logical (uint-32)":  0 OK compares.  One failure.
>>>>> line  2092: Received unexpected wait state:  0002000000000000 0000000000000BAD
Test "bfp-005-cvttolog64: Test IEEE Cvt To Logical (uint-64)":  0 OK compares.  One failure.
>>>>> line  2258: Received unexpected wait state:  0002000000000000 0000000000000BAD
Test "bfp-006-cvttofix: Test IEEE Convert To Fixed (int-32)":  0 OK compares.  One failure.
>>>>> line  2421: Received unexpected wait state:  0002000000000000 0000000000000BAD
Test "bfp-007-cvttofix64: Test IEEE Convert To Fixed (int-64)":  0 OK compares.  One failure.

Bill

Fish-Git commented 6 months ago

When not using Clang, it doesn't build.

I'm seeing the same thing with VS2008 too.

I presume you're using VS2022, Bill? I'm about to try it myself in my VMware virtual machine.

What I don't understand is why w32_mlock and w32_munlock were changed to const void* in the first place.

Yes, the Linux mlock and munlock functions are typed that way (with const void* for the first argument), but on Windows, VirtualLock and VirtualUnlock are typed as LPVOID, which is a simple void*.

I don't think w32_mlock and w32_munlock should have been changed, unless they cause a problem for clang, in which case I think we just need to #define a new build constant for MSVC clang builds, and use it for w32_mlock and w32_munlock so they get declared correctly (with const void* for MSVC clang builds or plain void* for normal MSVC builds.

I am re-opening this issue until this problem can be resolved.

Peter-J-Jansen commented 6 months ago

Apologies for this problem I created, which should now be fixed, at least concerning the non-Clang build on MSVC. That I could make this fix was because in the more distant past, I had successfully tested with "const" removed from the first parameter on both the w32_mlock and w32_munlock in "w32util.h", bringing it in line with "w32util.c". Then later on I thought it more appropriate to do the opposite, that is to add the "const" in the "w32util.c", which I admittedly did not test on non-Clang MSVC builds. My bad. I've now removed "const" in all these, so that it matches again, which is what Clang (MSVC) was complaining about.

As to the failing tests, those I did not experience, at least not on Ubuntu. I'll investigate.

Cheers,

Peter

wrljet commented 6 months ago

When not using Clang, it doesn't build.

I'm seeing the same thing with VS2008 too.

I presume you're using VS2022, Bill? I'm about to try it myself in my VMware virtual machine.

Fish, yes, this was with VS2022 (17.9.0). Most people seem to have gone past VS2017/VS2019 now, so I didn't other testing those for this one.

Bill

Fish-Git commented 6 months ago

Fish, yes, this was with VS2022 (17.9.0).

Unfortunately, I can't go beyond VS2022 (17.6.2), as VS2022 (17.9.0) refuses to install due to my still running Windows 7.  :(

In any case, it looks like Peter has fixed the problem.

Thank you, Peter!

ONE QUESTION THOUGH:  In your comments in makefile-dllmod.msvc you mention setting CL to e.g. -mcx16 /w, but yet the value of CL doesn't appear to be used anywhere. The way you have it currently designed, the options -mcx16 /w are getting dropped (lost). The way you have it designed, I could set CL to foobar! (i.e. to any non-empty value) and it would work the same.

My question is, if a person sets CL to the clang options that one presumably wants to use, why aren't those options propagated somewhere? Shouldn't your cflags statement maybe be:

cflags  =  $(cflags) $(CL) -DHAVE_SOCKLEN_T

Just wondering. :)

wrljet commented 6 months ago

Fish, yes, this was with VS2022 (17.9.0).

Unfortunately, I can't go beyond VS2022 (17.6.2), as VS2022 (17.9.0) refuses to install due to my still running Windows 7. :(

OK, well, now I can't seem to build ANYTHING!

That stupid problem with MSVC manifest tool (or linker) that complains the files are being used by another process has popped up. MSFT's had this problem on and off for like 15 years! I disabled Windows Defender as much as I could and it still doesn't want to work. They used to happen to me in the past, too, when the system was too fast.

Try it over and over and finally it'll work.

So sick and tired of Windows!
Peter-J-Jansen commented 6 months ago

Hi Bill and Fish,

I've successfully completed my tests on Ubuntu (20.04 and 22.04), Windows 10 VS2019, and Windows 11 VS2022, including all tests as shown at the bottom.

Fish had a question:

ONE QUESTION THOUGH:  In your comments in makefile-dllmod.msvc you mention setting CL to e.g. -mcx16 /w, but yet the value of CL doesn't appear to be used anywhere. The way you have it currently designed, the options -mcx16 /w are getting dropped (lost). The way you have it designed, I could set CL to foobar! (i.e. to any non-empty value) and it would work the same.

My question is, if a person sets CL to the clang options that one presumably wants to use, why aren't those options propagated somewhere? Shouldn't your cflags statement maybe be:

cflags  =  $(cflags) $(CL) -DHAVE_SOCKLEN_T

Just wondering. :)

The CL environment variable is used by the clang-cl command as that is where it picks up extra options for CLANG, which is how Microsoft designed the CLANG support in their VS versions. That the option -mcx16 /w is used one can verify easily as a test e.g. by setting SET "CL=/w" and observe the error messages clang-cl then produces when running nmake.

Cheers,

Peter

P.S.: The tests:

F:\Qsync\Source\Repos\SDL-hyperion\tests>runtest -d .

Begin: "runtest -d ." ...

On:     22/02/2024  at  0:49:05 49

Variable $platform           set to "Windows"
Variable $ptrsize            set to "8"
Variable $can_s370_mode      set to "1"
Variable $can_esa390_mode    set to "1"
Variable $can_zarch_mode     set to "1"
Variable $max_cpu_engines    set to "16"
Variable $libraries          set to "Shared"
Variable $threading_model    set to "Fish"
Variable $locking_model      set to "Error"
Variable $shared_devices     set to "1"
Variable $HDL                set to "1"
Variable $externalgui        set to "1"
Variable $keepalive          set to "Partial"
Variable $IPV6               set to "1"
Variable $HTTP               set to "1"
Variable $sqrtl              set to "1"
Variable $sighandling        set to "1"
Variable $CCKD_BZIP2         set to "1"
Variable $HET_BZIP2          set to "1"
Variable $ZLIB               set to "1"
Variable $regex              set to "1"
Variable $rexx_supported     set to "1"
Variable $HAO                set to "1"
Variable $NLS                set to "0"
Variable $cmpxchg1           set to "1"
Variable $cmpxchg4           set to "1"
Variable $cmpxchg8           set to "1"
Variable $cmpxchg16          set to "1"
Variable $hatomics           set to "msvcIntrinsics"
Variable $rexx_package       set to "OORexx"
Variable $rexx_VERSION       set to "REXX-ooRexx_4.2.0(MT)_64-bit 6.04 22 Feb 2014"
Variable $rexx_SOURCE        set to "WindowsNT"
Variable $rexx_Mode          set to "Command"
Variable $rexx_MsgLevel      set to "0"
Variable $rexx_MsgPrefix     set to "0"
Variable $rexx_ErrPrefix     set to "0"
Variable $rexx_Resolver      set to "1"
Variable $rexx_SysPath       set to "1"
Variable $rexx_RexxPath      set to ""
Variable $rexx_Extensions    set to ".REXX;.rexx;.REX;.rex;.CMD;.cmd;.RX;.rx"
Test "1403 printer Load UCS Buffer":  2 OK compares.  All pass.
Test "3211 printer (OORexx)":  2 OK compares.  All pass.
Test "agf 20161211 12.44":  10 OK compares.  All pass.
Test "S/370 AWS tape BSF into Load Point":  5 OK compares.  All pass.
Test "BC-mode ILC Handling":  4 OK compares.  All pass.
Test "bfp-001-divtoint: Test IEEE Divide To Integer":  1 OK compares.  All pass.
Test "bfp-002-loadr: Test IEEE Load Rounded":  1 OK compares.  All pass.
Test "bfp-003-loadfpi: Test IEEE Load FP Integer":  1 OK compares.  All pass.
Test "bfp-004-cvttolog: Test IEEE Convert To Logical (uint-32)":  1 OK compares.  All pass.
Test "bfp-005-cvttolog64: Test IEEE Cvt To Logical (uint-64)":  1 OK compares.  All pass.
Test "bfp-006-cvttofix: Test IEEE Convert To Fixed (int-32)":  1 OK compares.  All pass.
Test "bfp-007-cvttofix64: Test IEEE Convert To Fixed (int-64)":  1 OK compares.  All pass.
Test "bfp-008-cvtfrlog: Test IEEE Convert From Fixed (uint-32)":  1 OK compares.  All pass.
Test "bfp-009-cvtfrlog64: Test IEEE Cvt From Fixed (uint-64)":  1 OK compares.  All pass.
Test "bfp-010-cvtfrfix: Test IEEE Convert From Fixed (int-32)":  1 OK compares.  All pass.
Test "bfp-011-cvtfrfix64: Test IEEE Cvt From Fixed (int-64)":  1 OK compares.  All pass.
Test "bfp-012-loadtest: Test IEEE Test Data Class, Load And Test":  1 OK compares.  All pass.
Test "bfp-013-comps: Test IEEE Compare, Compare And Signal":  1 OK compares.  All pass.
Test "bfp-014-divide: Test IEEE Divide":  1 OK compares.  All pass.
Test "bfp-015-sqrt: Test IEEE Square Root":  1 OK compares.  All pass.
Test "bfp-016-add: Test IEEE Add":  1 OK compares.  All pass.
Test "bfp-017-loadl: Test IEEE Load Lengthened":  1 OK compares.  All pass.
Test "bfp-018-subtract: Test IEEE Subtract":  1 OK compares.  All pass.
Test "bfp-019-multiply: Test IEEE Multiply":  1 OK compares.  All pass.
Test "bfp-020-multlonger: Test IEEE Multiply":  1 OK compares.  All pass.
Test "bfp-021-multadd: Test IEEE Multiply And Add":  1 OK compares.  All pass.
Test "bfp-022-multsub: Test IEEE Multiply And Subtract":  1 OK compares.  All pass.
Test "bim-001-add-sub: Test Basic Integer Math Add & Subtract":  1 OK compares.  All pass.
Test "CBUC (Concurrent Block Update Consistency)":  2 OK compares.  All pass.
Test "CCW-ILS (CCW Incorrect Length Suppression)":  2 OK compares.  All pass.
Test "cmpxchg16 as used by CDSG, STPQ and LPQ instructions":  2 OK compares.  All pass.
Test "cipher 20161202 12.03":  305 OK compares.  All pass.
Test "CLCL-et-al (Test CLCL, MVCIN and TRT instructions)":  1 OK compares.  All pass.
Test "CLCL Unaligned Buffers Test":  1 OK compares.  All pass.
Test "CLCLE-01-unaligned-buffers Test":  1 OK compares.  All pass.
Test "CLCLE-02-unaligned-buffers Test":  1 OK compares.  All pass.
Test "CLCLE-03-basic (Test CLCLE instructions)":  1 OK compares.  All pass.
Test "CLCLE-04-performance (Test CLCLE instructions)":  1 OK compares.  All pass.
Test "CMPSC (Compression Call)":  1 OK compares.  All pass.
Test "Initial control register values":  9 OK compares.  All pass.
Test "csxtr csdtr cxstr cxutr 20160605 09.38":  8 OK compares.  All pass.
Test "CU12-01-xpage (Test CU12 instruction)":  1 OK compares.  All pass.
Test "CU12-02-performance (Test CU12 instruction)":  1 OK compares.  All pass.
Test "CU14-01-xpage (Test CU14 instruction)":  1 OK compares.  All pass.
Test "CU14-02-performance (Test CU14 instruction)":  1 OK compares.  All pass.
Test "CUSE-01-basic (Test CUSE instruction)":  1 OK compares.  All pass.
Test "CUSE-02-performance (Test CUSE instruction)":  1 OK compares.  All pass.
Test "dfp-080-from-packed.tst:   CDPT, CXPT":  162 OK compares.  All pass.
Test "dfp-080-to-packed.tst:   CPDT, CPXT":  393 OK compares.  All pass.
Test "digest 20161202 12.03":  57 OK compares.  All pass.
Test "Various CKD dasd I/O tests":  1 OK compares.  All pass.
Test "Facility 53 Instructions":  1 OK compares.  All pass.
Test "FAC5861: Quick Test of Misc. Instr. Ext. 2 & 3":  1 OK compares.  All pass.
Test "fix-page: Test the Fix Page E502 Assist":  1 OK compares.  All pass.
Test "HFP Floating Point (370, no AFP, no EXTENSION)":  6 OK compares.  All pass.
Test "HFP Floating Point (370, with AFP, no EXTENSION)":  6 OK compares.  All pass.
Test "HFP Floating Point (370, no AFP, with EXTENSION)":  6 OK compares.  All pass.
Test "HFP Floating Point (370, with AFP, with EXTENSION)":  6 OK compares.  All pass.
Test "HFP Floating Point (z/Arch, no AFP)":  6 OK compares.  All pass.
Test "HFP Floating Point (z/Arch, with AFP enabled)":  6 OK compares.  All pass.
Test "GH615 ICKDSF related changes":  1 OK compares.  All pass.
Test "S/370 HET (ZLIB) tape BSF into Load Point":  5 OK compares.  All pass.
Test "S/370 HET (BZIP2) tape BSF into Load Point":  5 OK compares.  All pass.
Test "IF-ELSE-01":  2 OK compares.  All pass.
Test "IF-ELSE-02":  2 OK compares.  All pass.
Test "IF-ELSE-03":  2 OK compares.  All pass.
Test "IF-ELSE-04":  2 OK compares.  All pass.
Test "IF-ELSE-05":  2 OK compares.  All pass.
Test "IF-ELSE-06":  2 OK compares.  All pass.
Test "IF-ELSE-07":  2 OK compares.  All pass.
Test "ilc":  3 OK compares.  All pass.
Test "invpsw processed 16 Jan 2016 12:11:11 by bldhtc.rexx":  1 OK compares.  All pass.
Test "KIMD fc0":  2 OK compares.  All pass.
Test "KIMD fc1":  3 OK compares.  All pass.
Test "KIMD fc2":  3 OK compares.  All pass.
Test "KIMD fc3":  5 OK compares.  All pass.
Test "KIMD fc65":  2 OK compares.  All pass.
Test "KLMD fc0":  2 OK compares.  All pass.
Test "KLMD fc1":  3 OK compares.  All pass.
Test "KLMD fc2":  3 OK compares.  All pass.
Test "KLMD fc3":  5 OK compares.  All pass.
Test "KM fc0":  2 OK compares.  All pass.
Test "KM fc1":  3 OK compares.  All pass.
Test "KM fc2":  3 OK compares.  All pass.
Test "KM fc3":  3 OK compares.  All pass.
Test "KM fc9":  3 OK compares.  All pass.
Test "KM fc10":  3 OK compares.  All pass.
Test "KM fc11":  3 OK compares.  All pass.
Test "KM fc18":  3 OK compares.  All pass.
Test "KM fc19":  3 OK compares.  All pass.
Test "KM fc20":  3 OK compares.  All pass.
Test "KM fc26":  3 OK compares.  All pass.
Test "KM fc27":  3 OK compares.  All pass.
Test "KM fc28":  3 OK compares.  All pass.
Test "KM fc50":  3 OK compares.  All pass.
Test "KM fc52":  3 OK compares.  All pass.
Test "KM fc58":  3 OK compares.  All pass.
Test "KM fc60":  3 OK compares.  All pass.
Test "KMAC fc0":  2 OK compares.  All pass.
Test "KMAC fcbad":  2 OK compares.  All pass.
Test "KMAC fc1":  2 OK compares.  All pass.
Test "KMAC fc2":  2 OK compares.  All pass.
Test "KMAC fc3":  2 OK compares.  All pass.
Test "KMAC fc9":  2 OK compares.  All pass.
Test "KMAC fc10":  2 OK compares.  All pass.
Test "KMAC fc11":  2 OK compares.  All pass.
Test "KMAC fc18":  2 OK compares.  All pass.
Test "KMAC fc19":  2 OK compares.  All pass.
Test "KMAC fc20":  2 OK compares.  All pass.
Test "KMAC fc26":  2 OK compares.  All pass.
Test "KMAC fc27":  2 OK compares.  All pass.
Test "KMAC fc28":  2 OK compares.  All pass.
Test "KMC fc0":  2 OK compares.  All pass.
Test "KMC bad":  2 OK compares.  All pass.
Test "KMC badreg0":  2 OK compares.  All pass.
Test "KMC badreg3":  2 OK compares.  All pass.
Test "KMC fc1":  3 OK compares.  All pass.
Test "KMC fc2":  3 OK compares.  All pass.
Test "KMC fc3":  3 OK compares.  All pass.
Test "KMC fc9":  3 OK compares.  All pass.
Test "KMC fc10":  3 OK compares.  All pass.
Test "KMC fc11":  3 OK compares.  All pass.
Test "KMC fc18":  3 OK compares.  All pass.
Test "KMC fc19":  3 OK compares.  All pass.
Test "KMC fc20":  3 OK compares.  All pass.
Test "KMC fc26":  3 OK compares.  All pass.
Test "KMC fc27":  3 OK compares.  All pass.
Test "KMC fc28":  3 OK compares.  All pass.
Test "KMC fc67":  3 OK compares.  All pass.
Test "KMCTR fc0":  2 OK compares.  All pass.
Test "KMCTR bad":  2 OK compares.  All pass.
Test "KMCTR fc1":  3 OK compares.  All pass.
Test "KMCTR fc2":  3 OK compares.  All pass.
Test "KMCTR fc3":  3 OK compares.  All pass.
Test "KMCTR fc9":  3 OK compares.  All pass.
Test "KMCTR fc10":  3 OK compares.  All pass.
Test "KMCTR fc11":  3 OK compares.  All pass.
Test "KMCTR fc18":  2 OK compares.  All pass.
Test "KMCTR fc19":  2 OK compares.  All pass.
Test "KMCTR fc20":  2 OK compares.  All pass.
Test "KMCTR fc26":  3 OK compares.  All pass.
Test "KMCTR fc27":  3 OK compares.  All pass.
Test "KMCTR fc28":  3 OK compares.  All pass.
Test "KMF fc0":  2 OK compares.  All pass.
Test "KMF bad":  2 OK compares.  All pass.
Test "KMF fc1":  3 OK compares.  All pass.
Test "KMF fc2":  3 OK compares.  All pass.
Test "KMF fc3":  3 OK compares.  All pass.
Test "KMF fc9":  3 OK compares.  All pass.
Test "KMF fc10":  3 OK compares.  All pass.
Test "KMF fc11":  3 OK compares.  All pass.
Test "KMF fc18":  3 OK compares.  All pass.
Test "KMF fc19":  3 OK compares.  All pass.
Test "KMF fc20":  3 OK compares.  All pass.
Test "KMF fc26":  3 OK compares.  All pass.
Test "KMF fc27":  3 OK compares.  All pass.
Test "KMF fc28":  3 OK compares.  All pass.
Test "KMO fc0":  2 OK compares.  All pass.
Test "KMO bad":  2 OK compares.  All pass.
Test "KMO fc1":  3 OK compares.  All pass.
Test "KMO fc2":  3 OK compares.  All pass.
Test "KMO fc3":  3 OK compares.  All pass.
Test "KMO fc9":  3 OK compares.  All pass.
Test "KMO fc10":  3 OK compares.  All pass.
Test "KMO fc11":  3 OK compares.  All pass.
Test "KMO fc18":  3 OK compares.  All pass.
Test "KMO fc19":  3 OK compares.  All pass.
Test "KMO fc20":  3 OK compares.  All pass.
Test "KMO fc26":  3 OK compares.  All pass.
Test "KMO fc27":  3 OK compares.  All pass.
Test "KMO fc28":  3 OK compares.  All pass.
Test "leapfrog processed 16 Jan 2016 12:11:11 by bldhtc.rexx":  3 OK compares.  All pass.
Test "logicImmediate processed 12 Nov 2015 12:36:58 by bldhtc.rexx":  17 OK compares.  All pass.
Test "mainsize check storage size":  26 OK compares.  All pass.
Test "mhi":  4 OK compares.  All pass.
Test "mvcle-370":  3 OK compares.  All pass.
Test "mvcos-001.tst:":  1 OK compares.  All pass.
Test "PERZAD: Quick PER Zero-Address Detection test":  1 OK compares.  All pass.
Test "PFPO    ORIGINAL":  2 OK compares.  All pass.
Test "PFPO    TRUNCATED":  2 OK compares.  All pass.
Test "z/Arch prefix register and real/absolute storage set/display":  10 OK compares.  All pass.
Test "ESA/390 prefix register and real/absolute storage set/display":  10 OK compares.  All pass.
Test "S/370 prefix register and real/absolute storage set/display":  10 OK compares.  All pass.
Test "privopisk":  2 OK compares.  All pass.
Test "privopiske":  2 OK compares.  All pass.
Test "privopgo":  3 OK compares.  All pass.
Test "problem":  2 OK compares.  All pass.
Test "runtest0: all cpus 0 seconds":  5 OK compares.  All pass.
Test "runtest4: all cpus 1-4 seconds":  5 OK compares.  All pass.
Test "semipriv":  5 OK compares.  All pass.
Test "sigp":  1 OK compares.  All pass.
Test "Storage Keys: pure System/370 only":  1 OK compares.  All pass.
Test "Storage Keys: S/390 then z/Arch":  1 OK compares.  All pass.
Test "Storage Keys: Pure z/Arch only":  1 OK compares.  All pass.
Test "SRSTU: Simple Search String Unicode test":  1 OK compares.  All pass.
Test "sske#1":  2 OK compares.  All pass.
Test "sske#2":  53 OK compares.  All pass.
Test "STFL and STFLE":  6 OK compares.  All pass.
Test "cpuverid FORCE (z/Arch LPAR FMT-0)":  2 OK compares.  All pass.
Test "S/370  BASIC  FMT-0  CPUs = 1":  2 OK compares.  All pass.
Test "S/370  BASIC  FMT-1  CPUs = 1":  2 OK compares.  All pass.
Test "S/370  LPAR  FMT-0  CPUs = 1":  2 OK compares.  All pass.
Test "S/370  LPAR  FMT-1  CPUs = 1":  2 OK compares.  All pass.
Test "S/370  BASIC  FMT-0  CPUs = 2":  2 OK compares.  All pass.
Test "S/370  BASIC  FMT-1  CPUs = 2":  2 OK compares.  All pass.
Test "S/370  LPAR  FMT-0  CPUs = 2":  2 OK compares.  All pass.
Test "S/370  LPAR  FMT-1  CPUs = 2":  2 OK compares.  All pass.
Test "ESA/390  BASIC  FMT-0  CPUs = 1":  2 OK compares.  All pass.
Test "ESA/390  BASIC  FMT-1  CPUs = 1":  2 OK compares.  All pass.
Test "ESA/390  LPAR  FMT-0  CPUs = 1":  2 OK compares.  All pass.
Test "ESA/390  LPAR  FMT-1  CPUs = 1":  2 OK compares.  All pass.
Test "ESA/390  BASIC  FMT-0  CPUs = 2":  2 OK compares.  All pass.
Test "ESA/390  BASIC  FMT-1  CPUs = 2":  2 OK compares.  All pass.
Test "ESA/390  LPAR  FMT-0  CPUs = 2":  2 OK compares.  All pass.
Test "ESA/390  LPAR  FMT-1  CPUs = 2":  2 OK compares.  All pass.
Test "z/Arch  BASIC  FMT-0  CPUs = 1":  2 OK compares.  All pass.
Test "z/Arch  BASIC  FMT-1  CPUs = 1":  2 OK compares.  All pass.
Test "z/Arch  LPAR  FMT-0  CPUs = 1":  2 OK compares.  All pass.
Test "z/Arch  LPAR  FMT-1  CPUs = 1":  2 OK compares.  All pass.
Test "z/Arch  BASIC  FMT-0  CPUs = 2":  2 OK compares.  All pass.
Test "z/Arch  BASIC  FMT-1  CPUs = 2":  2 OK compares.  All pass.
Test "z/Arch  LPAR  FMT-0  CPUs = 2":  2 OK compares.  All pass.
Test "z/Arch  LPAR  FMT-1  CPUs = 2":  2 OK compares.  All pass.
Test "str-001-cksm: Test CKSM Instruction":  1 OK compares.  All pass.
Test "str-001-clst: Test CLST Instruction":  1 OK compares.  All pass.
Test "str-001-mvst: Test MVST Instruction":  1 OK compares.  All pass.
Test "str-001-srst: Test SRST Instruction":  1 OK compares.  All pass.
Test "Tape Data Chaining":  2 OK compares.  All pass.
Test "timeout":  1 OK compares.  All pass.
Test "TRE-01-basic (Test TRE instructions)":  1 OK compares.  All pass.
Test "TRE-02-performance (Test TRE instructions)":  1 OK compares.  All pass.
Test "TRTE-01-basic (Test TRTE instruction)":  1 OK compares.  All pass.
Test "TRTE-02-performance (Test TRTE instruction)":  1 OK compares.  All pass.
Test "TRTR-01-basic (Test TRTR instruction)":  1 OK compares.  All pass.
Test "TRTR-02-performance (Test TRTR instruction)":  1 OK compares.  All pass.
Test "TRTRE-01-basic (Test TRTRE instruction)":  1 OK compares.  All pass.
Test "TRTRE-02-performance (Test TRTRE instruction)":  1 OK compares.  All pass.
Test "TXFPER: Test PER Tracing of TXF Transactions":  1 OK compares.  All pass.
Test "multix":  2 OK compares.  All pass.
Test "multix1":  2 OK compares.  All pass.
Test "zeos":  6 OK compares.  All pass.
Did 241 tests.  All OK.

Duration: 51 seconds

End: ** Success! **

F:\Qsync\Source\Repos\SDL-hyperion\tests>
Fish-Git commented 6 months ago

I disabled Windows Defender as much as I could and it still doesn't want to work.

I have a similar problem with my antivirus too, but thankfully it doesn't cause the build to fail. It just delays it with a zillion popup dialogs asking me to respond whether to allow the action or not, causing the build to take forever as a result of the build waiting for me to respond to each one. Also thankfully, I can simply "pause" my antivirus during Hercules builds too, so that they finish in their normal amount of time without any of annoying popups occurring. I then "unpause" it afterwards of course.

I've had customers in the distant pass have similar problems with ZoneAlarm that intercepted I/Os and ended up changing the I/O's actual parameters, thereby leading to unexpected failures. I find it amazing (but not all that surprising, sadly) that even Microsoft can't seem to get things right with their own damn operating system. Sad, that.

And of course, you were involved with me with that customer issue where he couldn't get Hercules to run on his Windows 11 system.

So sick and tired of Windows!

Me too! But only with the versions they released after Windows 7 (e.g. 10 & 11). Windows 7 has been rock solid for me for many years and I have no intention of ever upgrading to 10 or 11. Annoyingly (but understandably) however, more and more vendors are dropping support for Windows 7 (most notably but understandably Microsoft products such as VS2022, but there are others now besides them), going so far as to refuse to even allow installing their product on Windows 7. For no real apparent reason. Not because it won't (or can't) run on Windows 7, but only because they purposely don't want it to be run on Windows 7.

It's pissing me off.  >:-(

Fish-Git commented 6 months ago

The CL environment variable is used by the clang-cl command as that is where it picks up extra options for CLANG, which is how Microsoft designed the CLANG support in their VS versions.

Ah! I think I understand now. It's the clang-cl executable itself that interrogates (examines) the CL environment variable and uses it during the compile. Makes perfect sense now. Thanks.

Did 241 tests. All OK.

Duration: 51 seconds

End: Success!

Yep. That's what I'm seeing too. Works perfectly.

I don't know what's going on with Bill.

Fish-Git commented 6 months ago

I'm closing this issue again. Bill? We can still work on your issue(s) here in this GH issue if you want, OR we can work on it offline. Either way is fine with me.

wrljet commented 6 months ago

Hi Bill and Fish,

I've successfully completed my tests on Ubuntu (20.04 and 22.04), Windows 10 VS2019, and Windows 11 VS2022, including all tests as shown at the bottom.

What version of clang-cl are you using? Mine says version 17.0.3: ``` C:\Program Files\Microsoft Visual Studio\2022\Community>clang-cl --version clang version 17.0.3 Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin ``` The test failures continue: ``` >>>>> line 1990: Received unexpected wait state: 0002000000000000 0000000000000BAD Test "bfp-004-cvttolog: Test IEEE Convert To Logical (uint-32)": 0 OK compares. One failure. >>>>> line 2093: Received unexpected wait state: 0002000000000000 0000000000000BAD Test "bfp-005-cvttolog64: Test IEEE Cvt To Logical (uint-64)": 0 OK compares. One failure. >>>>> line 2259: Received unexpected wait state: 0002000000000000 0000000000000BAD Test "bfp-006-cvttofix: Test IEEE Convert To Fixed (int-32)": 0 OK compares. One failure. >>>>> line 2422: Received unexpected wait state: 0002000000000000 0000000000000BAD Test "bfp-007-cvttofix64: Test IEEE Convert To Fixed (int-64)": 0 OK compares. One failure. ``` I guess I could try it on Windows 11, but I doubt that would affect it. Bill
Peter-J-Jansen commented 6 months ago

Mine too says 17.0.3 on my Windows 11 23H2 VS2022 v. 17.9.1. I'll also (re-)check it on my Windows 10 22H2 VS2019 system later on. This time I tested on a laptop which had ooRexx 5.0.0 installed which caused a message ("Error 26") following the "runtest" command, but didn't hurt otherwise:

        clang-cl /O2 /GL /D NDEBUG /Zi  -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -DWIN32 -D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0600 -DNTDDI_VERSION=0x06000000 -D_WIN32_IE=0x0700 -DWINVER=0x0600 -DHAVE_SOCKLEN_T -D_AMD64_=1 -DWIN64 -D_WIN64 /D HAVE_ZLIB /D HAVE_ZLIB_H /I"..\Qsync\Packages\zlib-1.2.5\x64/include" /D HAVE_BZLIB_H /I"..\Qsync\Packages\bzip2-1.0.6\x64" /D HAVE_PCRE /I"..\Qsync\Packages\pcre-8.20\inc" /D PCRE_INCNAME=\"pcreposix.h\"  /D HAVE_OBJECT_REXX /I"C:\Program Files\ooRexx\api" /D HAVE_REXX_H /D HAVE_OOREXXAPI_H  /D ENABLE_IPV6 /we4702 /WX  /D _MSVC_ /D MAX_CPU_ENGS=16 /D HOST_ARCH=AMD64 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE /wd4172 /wd4312 /wd4996 /w14296 /we4101 /we4102 /MP /favor:INTEL64  /D FD_SETSIZE=1024  -D VERSION=\""4.7.0.11094-SDL-DEV-g751f4bb4"\" -D VERS_MAJ=4 -D VERS_INT=7 -D VERS_MIN=0 -D VERS_BLD=11094 /I. /Fp"msvc.AMD64.obj\\build_pch.pch" /Yu"hstdinc.h" -D_MT -D_DLL -MD /Fo"msvc.AMD64.obj\\" /Fd"msvc.AMD64.obj\\" vmfplc2.c
        link -nologo /RELEASE /LTCG /DEBUG /PDB:msvc.AMD64.pdb\vmfplc2.pdb /map:msvc.AMD64.map\vmfplc2.map /MANIFEST /base:0x100400000 /INCREMENTAL:NO /NOLOGO -subsystem:console,6.0 msvc.AMD64.obj\build_pch.obj msvc.AMD64.obj\vmfplc2.obj msvc.AMD64.obj\htape.lib msvc.AMD64.obj\hsys.lib msvc.AMD64.obj\hutil.lib msvc.AMD64.obj\hdt3420.lib msvc.AMD64.obj\herctape.res  "..\Qsync\Packages\zlib-1.2.5\x64/lib/zdll.lib" "..\Qsync\Packages\bzip2-1.0.6\x64/libbz2.lib" "..\Qsync\Packages\pcre-8.20\lib\x64\pcre3.lib" "..\Qsync\Packages\pcre-8.20\lib\x64\pcreposix3.lib" user32.lib crypto64.lib decNumber64.lib SoftFloat64.lib telnet64.lib -out:msvc.AMD64.bin\vmfplc2.exe -implib:msvc.AMD64.obj\vmfplc2.lib kernel32.lib  ws2_32.lib mswsock.lib advapi32.lib /map:msvc.AMD64.map\vmfplc2.map
LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance
        if exist msvc.AMD64.bin\vmfplc2.exe.manifest mt.exe -nologo -outputresource:msvc.AMD64.bin\vmfplc2.exe;1 -manifest msvc.AMD64.bin\vmfplc2.exe.manifest
        XCOPY "..\Qsync\Packages\zlib-1.2.5\x64\zlib1.dll" msvc.AMD64.bin\ /V /C /F /H /R /K /Y
C:\Users\Peter\Qsync\Packages\zlib-1.2.5\x64\zlib1.dll -> C:\Users\Peter\SDL-hyperion\msvc.AMD64.bin\zlib1.dll
1 File(s) copied
        XCOPY "..\Qsync\Packages\bzip2-1.0.6\x64\libbz2.dll" msvc.AMD64.bin\ /V /C /F /H /R /K /Y
C:\Users\Peter\Qsync\Packages\bzip2-1.0.6\x64\libbz2.dll -> C:\Users\Peter\SDL-hyperion\msvc.AMD64.bin\libbz2.dll
1 File(s) copied
        XCOPY "..\Qsync\Packages\pcre-8.20\bin\x64\pcre3.dll" msvc.AMD64.bin\ /V /C /F /H /R /K /Y
C:\Users\Peter\Qsync\Packages\pcre-8.20\bin\x64\pcre3.dll -> C:\Users\Peter\SDL-hyperion\msvc.AMD64.bin\pcre3.dll
1 File(s) copied
        XCOPY "..\Qsync\Packages\pcre-8.20\bin\x64\pcreposix3.dll" msvc.AMD64.bin\ /V /C /F /H /R /K /Y
C:\Users\Peter\Qsync\Packages\pcre-8.20\bin\x64\pcreposix3.dll -> C:\Users\Peter\SDL-hyperion\msvc.AMD64.bin\pcreposix3.dll
1 File(s) copied
        if exist msvc.AMD64.bin\*.manifest del /f /q msvc.AMD64.bin\*.manifest
        echo.

        echo -- Hercules build complete --
-- Hercules build complete --

C:\Users\Peter\SDL-hyperion>cd tests

C:\Users\Peter\SDL-hyperion\tests>runtest -d .
     **1 *-* PARSE ARG '"' formula '"'      Feb 2024140202955738.rexx
Error 26 running C:\Users\Peter\SDL-hyperion\tests\TMP23 line 1:  Invalid whole number.
Error 26.4:  Positional pattern of PARSE template must be a whole number; found "2024140202955738.REXX".**

Begin: "runtest -d ." ...

On:     Fri 23 Feb 2024  at 14:02:03 02

Variable $platform           set to "Windows"
Variable $ptrsize            set to "8"
Variable $can_s370_mode      set to "1"
Variable $can_esa390_mode    set to "1"
Variable $can_zarch_mode     set to "1"
Variable $max_cpu_engines    set to "16"
Variable $libraries          set to "Shared"
Variable $threading_model    set to "Fish"
Variable $locking_model      set to "Error"
Variable $shared_devices     set to "1"
Variable $HDL                set to "1"
Variable $externalgui        set to "1"
Variable $keepalive          set to "Partial"
Variable $IPV6               set to "1"
Variable $HTTP               set to "1"
Variable $sqrtl              set to "1"
Variable $sighandling        set to "1"
Variable $CCKD_BZIP2         set to "1"
Variable $HET_BZIP2          set to "1"
Variable $ZLIB               set to "1"
Variable $regex              set to "1"
Variable $rexx_supported     set to "1"
Variable $HAO                set to "1"
Variable $NLS                set to "0"
Variable $cmpxchg1           set to "1"
Variable $cmpxchg4           set to "1"
Variable $cmpxchg8           set to "1"
Variable $cmpxchg16          set to "1"
Variable $hatomics           set to "msvcIntrinsics"
Variable $rexx_package       set to "OORexx"
Variable $rexx_VERSION       set to "REXX-ooRexx_5.0.0(MT)_64-bit 6.05 23 Dec 2022"
Variable $rexx_SOURCE        set to "WindowsNT"
Variable $rexx_Mode          set to "Command"
Variable $rexx_MsgLevel      set to "0"
Variable $rexx_MsgPrefix     set to "0"
Variable $rexx_ErrPrefix     set to "0"
Variable $rexx_Resolver      set to "1"
Variable $rexx_SysPath       set to "1"
Variable $rexx_RexxPath      set to ""
Variable $rexx_Extensions    set to ".REXX;.rexx;.REX;.rex;.CMD;.cmd;.RX;.rx"
Test "1403 printer Load UCS Buffer":  2 OK compares.  All pass.
Test "3211 printer (OORexx)":  2 OK compares.  All pass.
Test "agf 20161211 12.44":  10 OK compares.  All pass.
Test "S/370 AWS tape BSF into Load Point":  5 OK compares.  All pass.
Test "BC-mode ILC Handling":  4 OK compares.  All pass.
Test "bfp-001-divtoint: Test IEEE Divide To Integer":  1 OK compares.  All pass.
Test "bfp-002-loadr: Test IEEE Load Rounded":  1 OK compares.  All pass.
Test "bfp-003-loadfpi: Test IEEE Load FP Integer":  1 OK compares.  All pass.
Test "bfp-004-cvttolog: Test IEEE Convert To Logical (uint-32)":  1 OK compares.  All pass.
Test "bfp-005-cvttolog64: Test IEEE Cvt To Logical (uint-64)":  1 OK compares.  All pass.
Test "bfp-006-cvttofix: Test IEEE Convert To Fixed (int-32)":  1 OK compares.  All pass.
Test "bfp-007-cvttofix64: Test IEEE Convert To Fixed (int-64)":  1 OK compares.  All pass.
Test "bfp-008-cvtfrlog: Test IEEE Convert From Fixed (uint-32)":  1 OK compares.  All pass.
Test "bfp-009-cvtfrlog64: Test IEEE Cvt From Fixed (uint-64)":  1 OK compares.  All pass.
Test "bfp-010-cvtfrfix: Test IEEE Convert From Fixed (int-32)":  1 OK compares.  All pass.
Test "bfp-011-cvtfrfix64: Test IEEE Cvt From Fixed (int-64)":  1 OK compares.  All pass.
Test "bfp-012-loadtest: Test IEEE Test Data Class, Load And Test":  1 OK compares.  All pass.
Test "bfp-013-comps: Test IEEE Compare, Compare And Signal":  1 OK compares.  All pass.
Test "bfp-014-divide: Test IEEE Divide":  1 OK compares.  All pass.
Test "bfp-015-sqrt: Test IEEE Square Root":  1 OK compares.  All pass.
Test "bfp-016-add: Test IEEE Add":  1 OK compares.  All pass.
Test "bfp-017-loadl: Test IEEE Load Lengthened":  1 OK compares.  All pass.
Test "bfp-018-subtract: Test IEEE Subtract":  1 OK compares.  All pass.
Test "bfp-019-multiply: Test IEEE Multiply":  1 OK compares.  All pass.
Test "bfp-020-multlonger: Test IEEE Multiply":  1 OK compares.  All pass.
Test "bfp-021-multadd: Test IEEE Multiply And Add":  1 OK compares.  All pass.
Test "bfp-022-multsub: Test IEEE Multiply And Subtract":  1 OK compares.  All pass.
Test "bim-001-add-sub: Test Basic Integer Math Add & Subtract":  1 OK compares.  All pass.
Test "CBUC (Concurrent Block Update Consistency)":  2 OK compares.  All pass.
Test "CCW-ILS (CCW Incorrect Length Suppression)":  2 OK compares.  All pass.
[...]
Test "str-001-srst: Test SRST Instruction":  1 OK compares.  All pass.
Test "Tape Data Chaining":  2 OK compares.  All pass.
Test "timeout":  1 OK compares.  All pass.
Test "TRE-01-basic (Test TRE instructions)":  1 OK compares.  All pass.
Test "TRE-02-performance (Test TRE instructions)":  1 OK compares.  All pass.
Test "TRTE-01-basic (Test TRTE instruction)":  1 OK compares.  All pass.
Test "TRTE-02-performance (Test TRTE instruction)":  1 OK compares.  All pass.
Test "TRTR-01-basic (Test TRTR instruction)":  1 OK compares.  All pass.
Test "TRTR-02-performance (Test TRTR instruction)":  1 OK compares.  All pass.
Test "TRTRE-01-basic (Test TRTRE instruction)":  1 OK compares.  All pass.
Test "TRTRE-02-performance (Test TRTRE instruction)":  1 OK compares.  All pass.
Test "TXFPER: Test PER Tracing of TXF Transactions":  1 OK compares.  All pass.
Test "multix":  2 OK compares.  All pass.
Test "multix1":  2 OK compares.  All pass.
Test "zeos":  6 OK compares.  All pass.
Did 241 tests.  All OK.

Duration: 1 minute, 36 seconds

End: ** Success! **

C:\Users\Peter\SDL-hyperion\tests>
C:\Users\Peter\SDL-hyperion\tests>clang-cl -v
clang version 17.0.3
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin

Cheers,

Peter

Fish-Git commented 6 months ago

This time I tested on a laptop which had ooRexx 5.0.0 installed which caused a message ("Error 26") following the "runtest" command, but didn't hurt otherwise:

C:\Users\Peter\SDL-hyperion\tests>runtest -d .
**1 *-* PARSE ARG '"' formula '"'      Feb 2024140202955738.rexx
Error 26 running C:\Users\Peter\SDL-hyperion\tests\TMP23 line 1:  Invalid whole number.
Error 26.4:  Positional pattern of PARSE template must be a whole number; found "2024140202955738.REXX".**

The above is being caused by a known shortcoming in the runtest.cmd batch file that generates a temporary filename based on the current date/time. See the :tempfn function at lines 188-213 of runtest.cmd. It needs adjusting for whatever date/time format your Windows system uses (which is obviously different from U.S. and Germany).

Did 241 tests.  All OK.

Duration: 1 minute, 36 seconds

End: ** Success! **

Wow.  1:36 ?   Isn't that a little on the slow side?

wrljet commented 6 months ago

Duration: 1 minute, 36 seconds

End: Success!

Wow. 1:36 ? Isn't that a little on the slow side?

That takes about 30 seconds here.

Fish-Git commented 6 months ago

That takes about 30 seconds here.

34 for me.

Peter-J-Jansen commented 6 months ago

Yes, 1:36, and it is reproducible, very disappointing. I suspect either a Windows processor P vs. E cores scheduling bug, or a Lenovo BIOS bug on my brand-new X1 Yoga gen 8. Or both. / Expletives censored. /

I have a simple solution though for the date / time format problem in "runtest.cmd". First I create a Rexx one-liner called "datetime.rexx":

/* REXX */
SAY DATE('S')TIME('S')

Which I then subsequently use to replace the "for /f" loops with a single one :

--- /mnt/c/Users/Peter/runtest.cmd      2024-02-23 13:55:50.335275600 +0100
+++ /mnt/c/Users/Peter/SDL-hyperion/tests/runtest.cmd   2024-02-24 12:02:24.046402000 +0100
@@ -203,11 +203,13 @@
   :: wheras German for example uses "DD.MM.YY" and "HH:MM:SS,nn".
   ::-------------------------------------------------------------------

-  for /f "delims=/. tokens=1-3" %%a in ("%date:~4%") do (
-    for /f "delims=:., tokens=1-4" %%d in ("%time: =0%") do (
-      set "@=TMP%%c%%a%%b%%d%%e%%f%%g%random%%file_ext%"
-    )
-  )
+  :: for /f "delims=/. tokens=1-3" %%a in ("%date:~4%") do (
+  ::   for /f "delims=:., tokens=1-4" %%d in ("%time: =0%") do (
+  ::     set "@=TMP%%c%%a%%b%%d%%e%%f%%g%random%%file_ext%"
+  ::   )
+  :: )
+
+  for /f "tokens=1" %%d in ('rexx datetime.rexx') do set @=TMP%%d%random%%file_ext%

   endlocal && set "%var_name%=%@%"
   %return%

This works, but of course no speedups:

C:\Users\Peter\SDL-hyperion\tests>runtest -d .

Begin: "runtest -d ." ...

On:     Sat 24 Feb 2024  at 12:23:00 23

Perhaps "runtest.cmd" and "runtest" could be replaced by a single common "runtest.rexx", but that would be for another day -- if at all.

Cheers,

Peter

Fish-Git commented 6 months ago

Yes, 1:36, and it is reproducible, very disappointing. I suspect either a Windows processor P vs. E cores scheduling bug, or a Lenovo BIOS bug on my brand-new X1 Yoga gen 8. Or both. / Expletives censored. /

Since you say it's brand new, could this be the cause?

Notice the posting made on 2021-03-11 08:26:07:

        "Strangely, when I shut off all Lenovo service,         all become fluid and fast, no lag at all!"

It might just have a bunch of unwanted crap on it that you don't need?

wrljet commented 6 months ago

I can't imagine how much bloatware a pre-loaded Windows 10 or 11 probably comes with.

Also, try running TaskMan while you're doing a build or tests, and see what's the top CPU consumer. I was seriously shocked how much CPU is wasted doing nonsense stuff in Windows 10 while building Hercules.

Also, the -t param to runtest... -t 2 which I normally use in Hercules Helper for Windows, so our users don't have tests fail due to Windows Defender slowing things down... that -t 2 adds another full minute to the time the tests take.

Bill

wrljet commented 6 months ago

That takes about 30 seconds here.

34 for me.

We're hotrodders.  :-)

Fish-Git commented 6 months ago

I have a simple solution though for the date / time format problem in "runtest.cmd". First I create a Rexx one-liner called "datetime.rexx":

/* REXX */
SAY DATE('S')TIME('S')

That's a TWO liner, not a one liner.  >;-)

Where did you create this "datetime.rexx"? In Hercules's tests subdirectory? The same place where runtest.cmd exists? Because when I place it there and run your modified code, I get:

Error 3:  Failure during initialization
Error 3.901:  Failure during initialization: Program "datetime.rexx" was not found
The syntax of the command is incorrect.

BUT..., if I make a slight change:

  pushd "%~dp0"
  for /f "tokens=1" %%d in ('rexx datetime.rexx') do set @=TMP%%d%random%%file_ext%
  popd

Then it works fine!

Fish-Git commented 6 months ago

That takes about 30 seconds here.

34 for me.

We're hotrodders.  :-)

Compared to Peter, yeah!  :)

Fish-Git commented 6 months ago

Another thought: could it MAYBE be that clang builds are not optimized?? I don't know how Microsoft designed (hacked) their clang-cl thingy, but could it be that it doesn't recognize/honor some/any of the normal MSVC cl compiler options, defaulting to only recognizing/honoring clang's compiler options? Maybe you just need to add some optimization build options to your CL=... environment variable??

I'm just guessing/speculating here! I haven't actually tried this new clang-cl thingy for myself yet. What level of VS2022 is required? The latest? Because I can't run the latest.

wrljet commented 6 months ago

My times are the same, give or take, with MSVC and Clang.

Fish-Git commented 6 months ago

FYI: I'm thinking we should probably make Peter's (@Peter-J-Jansen) suggested date/time fix for our runtest.cmd script. I'm starting to really like it.

And yes, I also think we should probably eventually replace our existing runtest.cmd (Windows) and runtest (Linux) scripts with a single common Rexx script instead too. But that's LOW priority.

Let's get this date/time problem fixed first.

Should I commit Peter's suggested change? Yea? Nay?

wrljet commented 6 months ago

FYI: I'm thinking we should probably make Peter's (@Peter-J-Jansen) suggested date/time fix for our runtest.cmd script. I'm starting to really like it.

And yes, I also think we should probably eventually replace our existing runtest.cmd (Windows) and runtest (Linux) scripts with a single common Rexx script instead too. But that's LOW priority.

Let's get this date/time problem fixed first.

Should I commit Peter's suggested change? Yea? Nay?

Sure

Fish-Git commented 6 months ago

Let's get this date/time problem fixed first. Should I commit Peter's suggested change? Yea? Nay?

Sure

Done.

Peter-J-Jansen commented 5 months ago

Thanks Fish, following up to some older questions :

Where did you create this "datetime.rexx"? In Hercules's tests subdirectory?

Yes, as where it is now. I'm not sure why I didn't need the pushd / popd around it, but that's immaterial by now, as the repo works fine as it is.

Could you do me a favor and re-test your original situation again please?

Sorry it took so long, but I finally was able to re-test it, and all is still fine.

Cheers,

Peter