master build failure

69 views
Skip to first unread message

Danny Scott

unread,
May 19, 2025, 2:49:41 PM5/19/25
to wx-...@googlegroups.com
In trying to test the build tool updates I am getting the following error:

if not exist vc14x_x64_mswudll mkdir vc14x_x64_mswudll
if not exist ..\..\lib\vc14x_x64_dll mkdir ..\..\lib\vc14x_x64_dll
if not exist ..\..\lib\vc14x_x64_dll\mswu mkdir ..\..\lib\vc14x_x64_dll\mswu
if not exist ..\..\lib\vc14x_x64_dll\mswu\wx mkdir ..\..\lib\vc14x_x64_dll\mswu\wx
if not exist ..\..\lib\vc14x_x64_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\vc14x_x64_dll\mswu\wx\setup.h
        1 file(s) copied.
if not exist ..\..\lib\vc14x_x64_dll\mswu\wx\msw mkdir ..\..\lib\vc14x_x64_dll\mswu\wx\msw
cl /EP /nologo  "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\vc14x_x64_dll\mswu\wx\msw\rcdefs.h"
cl /c /nologo /TC /Fovc14x_x64_mswudll\wxregex_pcre2_auto_possess.obj /MD /DWIN32  /Zi /Fd..\..\lib\vc14x_x64_dll\wxregexu.pdb   /O2 /D_CRT_SECURE_NO_DEPRECATE=1  /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1  /D__NO_VC_CRTDBG__  /DNDEBUG  /D_CRT_SECURE_NO_WARNINGS /I..\..\include /I..\..\lib\vc14x_x64_dll\mswu  /I..\..\3rdparty\pcre\src\wx /D__WX__ /DHAVE_CONFIG_H   ..\..\3rdparty\pcre\src\pcre2_auto_possess.c
pcre2_auto_possess.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(313): error C2440: 'initializing': cannot convert from 'int' to '__m128i'




--
Danny Scott

Vadim Zeitlin

unread,
May 19, 2025, 3:04:09 PM5/19/25
to wx-...@googlegroups.com
On Mon, 19 May 2025 18:49:28 +0000 Danny Scott wrote:

DS> In trying to test the build tool updates I am getting the following error:

Which version of the compiler are you using when you get this error?

DS> cl /c /nologo /TC /Fovc14x_x64_mswudll\wxregex_pcre2_auto_possess.obj /MD
DS> /DWIN32 /Zi /Fd..\..\lib\vc14x_x64_dll\wxregexu.pdb /O2
DS> /D_CRT_SECURE_NO_DEPRECATE=1 /D_CRT_NON_CONFORMING_SWPRINTFS=1
DS> /D_SCL_SECURE_NO_WARNINGS=1 /D__NO_VC_CRTDBG__ /DNDEBUG
DS> /D_CRT_SECURE_NO_WARNINGS /I..\..\include /I..\..\lib\vc14x_x64_dll\mswu
DS> /I..\..\3rdparty\pcre\src\wx /D__WX__ /DHAVE_CONFIG_H
DS> ..\..\3rdparty\pcre\src\pcre2_auto_possess.c
DS> pcre2_auto_possess.c
DS> C:\Program Files (x86)\Windows
DS> Kits\10\include\10.0.26100.0\ucrt\wchar.h(313): error C2440:
DS> 'initializing': cannot convert from 'int' to '__m128i'

It looks like this SDK version (which seems to be the latest one) is
incompatible with the (presumably older) compiler being used. I don't have
this SDK, so I don't know what is/around this line in this header, but
perhaps you can see some way to opt out from using 128 bit integers there?

If not, the only solution would seem to be to use one of the older SDKs
from https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
We/you could even use 10.0.19041.0 (Windows 10) as we don't rely on any
Windows 11-only features AFAIK.

Regards,
VZ

Danny Scott

unread,
May 19, 2025, 3:29:44 PM5/19/25
to wx-...@googlegroups.com
The same one I have used for all of the vc14x builds.

Microsoft Visual Studio Community 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.8.09032

Installed Version: Community

Visual C++ 2015   00322-20000-00000-AA383
Microsoft Visual C++ 2015
--
Danny Scott

Vadim Zeitlin

unread,
May 19, 2025, 3:56:31 PM5/19/25
to wx-...@googlegroups.com
On Mon, 19 May 2025 19:29:28 +0000 Danny Scott wrote:

DS> The same one I have used for all of the vc14x builds.

The SDK must have been updated because this is definitely not the one this
compiler had originally come with.

As I said, I don't have the new version of wchar.h from this SDK, so I
don't know what's around its line 313 and if there is some way to disable
it from being compiled. Please look at it and check if you can see
anything. If not, the only solution is to downgrade the SDK to an earlier
version. Will you be able to do it?

Thanks,
VZ

Danny Scott

unread,
May 19, 2025, 4:43:57 PM5/19/25
to wx-...@googlegroups.com
Apparently this is a common problem with a recent update. I don't know why any updates affect VS2015. Even the developer command prompts fail. I can't find any info on changing the SDK from a command line, only for project files. I have attached a couple of links. The first one is the exact problem I have but no linked solution. The other is a discussion of clang, but I didn't try to find the solution.

I am downloading a backup image of the Windows 11 image I use. It was made last August and hopefully still works. If it does then I will leave it unupdated for as long as need be. Perhaps we should investigate later a move from VS2015 to a newer VS.


--
Danny Scott

Danny Scott

unread,
May 19, 2025, 4:45:09 PM5/19/25
to wx-...@googlegroups.com

PB

unread,
May 19, 2025, 5:23:48 PM5/19/25
to wx-dev
On Monday, May 19, 2025 at 10:43:57 PM UTC+2 Danny Scott wrote:
 I can't find any info on changing the SDK from a command line, only for project files. I have attached a couple of links. The first one is the exact problem I have but no linked solution. The other is a discussion of clang, but I didn't try to find the solution.

Hi Danny,

I am no expert on MSVC, but it seems that changing the SDK version could be possible with Developer Prompt. It should be the third (optional) argument to  "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" you call from your officialbuld.bat, see the usage part at the end of vcvarsall.bat file.

For example, you could try calling it like
"%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64 8.1
to use the old Windows 8.1 SDK and similarly for any of 10.0.x SDK you may have installed.

Unfortunately, I have MSVS 2015 installed only on a basically unused Windows 7 VM and I am getting random ICEs there both with nmake and cmake (but I managed to build PCRE once)...

Good luck!
PB

Danny Scott

unread,
May 19, 2025, 5:32:54 PM5/19/25
to wx-...@googlegroups.com
Compiling from my old image works.

The code snippet with problems

            if (Count + 4 <= _N)
            {
==>          __m128i V1 = _mm_loadu_si64(S);
                V1 = _mm_cmpeq_epi16(V1, V2);
                unsigned char Mask = (unsigned char)_mm_movemask_epi8(V1);
                if (Mask != 0)
                {
                    _BitScanForward(&Index, Mask);
                    Index >>= 1;
                    return (wchar_t _CONST_RETURN*)&_S[Count + Index];
                }

                Count += 4;
            }

Is
--
Danny Scott

Vadim Zeitlin

unread,
May 19, 2025, 5:37:47 PM5/19/25
to wx-...@googlegroups.com
On Mon, 19 May 2025 21:32:37 +0000 Danny Scott wrote:

DS> Compiling from my old image works.

Good to know!

DS> The code snippet with problems
DS>
DS> if (Count + 4 <= _N)
DS> {
DS> ==> __m128i V1 = _mm_loadu_si64(S);
DS> V1 = _mm_cmpeq_epi16(V1, V2);
DS> unsigned char Mask = (unsigned char)_mm_movemask_epi8(V1);
DS> if (Mask != 0)
DS> {
DS> _BitScanForward(&Index, Mask);
DS> Index >>= 1;
DS> return (wchar_t _CONST_RETURN*)&_S[Count + Index];
DS> }
DS>
DS> Count += 4;
DS> }

If there is no preprocessor check around this code, it just means that the
SDK is incompatible with MSVS 2015 (as it doesn't seem to have these
intrinsics). So the only solution is to avoid upgrading the SDK again for
as long as we need to use/support this compiler.

Regards,
VZ

Danny Scott

unread,
May 19, 2025, 5:54:45 PM5/19/25
to wx-...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "wx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wx-dev/190358e8-c40b-482a-b393-1f984f4926bcn%40googlegroups.com.

Thank you! This is what I've spent the last 1/2 hour working on and it works.

The three "10" sdk's I am showing are:
10.0.17763.0 from 11/26/2018
10.0.19041.0 from 5/19/2025
10.0.26.100.0 from 5/19/2025

Passing 10.0.17763.0 at the end of vcvarsall.bat has allowed the compiling to proceed. The release version just finished without errors.

Vadim, I can update the pull request tomorrow. I would like to start with a fresh checkout and do a full test.

--
Danny Scott

Danny Scott

unread,
May 20, 2025, 8:55:19 AM5/20/25
to wx-...@googlegroups.com
Google AI gave me this comparison:

The versions 10.0.19041.0 and 10.0.26100.0 refer to different versions of the Windows operating system. 10.0.19041.0 is associated with Windows 10, while 10.0.26100.0 is associated with Windows 11, specifically the Windows 11, version 24H2 and above, according to Microsoft. 

Theoretically I might be able to build with 10.0.19041.0 but I don't have time to test today. Building with 10.0.17763.0 worked so I used that in the pull request.

--
Danny Scott
Reply all
Reply to author
Forward
0 new messages