Building wx with nmake on GitHub Actions/Azure Pipelines

144 views
Skip to first unread message

Scott Talbert

unread,
Jul 27, 2022, 9:44:07 AM7/27/22
to wx-dev
Hi,

Mostly a question for VZ I think, but has anyone ever tried building
wxWidgets on a Windows GitHub Action image using nmake? We're doing that
over in wxPython CI and it had worked fine until very recently (with no
changes in wxPython). I think this has to be something broken in the
GitHub Actions image, but let me know if anyone else has any ideas.

nmake.exe -f makefile.vc UNICODE=1 OFFICIAL_BUILD=1 COMPILER_VERSION=140 SHARED=1 MONOLITHIC=0 USE_OPENGL=1 USE_GDIPLUS=1 BUILD=release

Microsoft (R) Program Maintenance Utility Version 14.32.31332.0
Copyright (C) Microsoft Corporation. All rights reserved.

if not exist vc140_mswudll mkdir vc140_mswudll
if not exist ..\..\lib\vc140_dll mkdir ..\..\lib\vc140_dll
if not exist ..\..\lib\vc140_dll\mswu mkdir ..\..\lib\vc140_dll\mswu
if not exist ..\..\lib\vc140_dll\mswu\wx mkdir ..\..\lib\vc140_dll\mswu\wx
if not exist ..\..\lib\vc140_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\vc140_dll\mswu\wx\setup.h
1 file(s) copied.
if not exist ..\..\lib\vc140_dll\mswu\wx\msw mkdir ..\..\lib\vc140_dll\mswu\wx\msw
cl /EP /nologo "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\vc140_dll\mswu\wx\msw\rcdefs.h"
genrcdefs.h
cl /c /nologo /TC /Fovc140_mswudll\wxregex_pcre2_auto_possess.obj /MD /DWIN32 /Zi /Fd..\..\lib\vc140_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__ /DTARGET_CPU_COMPFLAG=0 /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I..\..\include /I..\..\lib\vc140_dll\mswu /I..\..\3rdparty\pcre\src\wx /D__WX__ /DHAVE_CONFIG_H /D_UNICODE ..\..\3rdparty\pcre\src\pcre2_auto_possess.c
pcre2_auto_possess.c
D:\a\1\s\ext\wxWidgets\include\wx/chartype.h(105): fatal error C1083: Cannot open include file: 'tchar.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.32.31326\bin\HostX86\x86\cl.EXE"' : return code '0x2'
Stop.

Vadim Zeitlin

unread,
Jul 27, 2022, 11:11:22 AM7/27/22
to wx-...@googlegroups.com
On Wed, 27 Jul 2022 09:44:04 -0400 (EDT) Scott Talbert wrote:

ST> Mostly a question for VZ I think, but has anyone ever tried building
ST> wxWidgets on a Windows GitHub Action image using nmake?

I don't build wxWidgets itself using nmake because I either build it using
MSBuild (for the projects using a customized version of it) or just use the
release DLLs (that can be downloaded once and then cached, speeding up the
build a lot), but I do build some other stuff using nmake and I use an
action setting up things correctly for it to work, like this:

- name: Set up nmake
uses: ilammy/msvc-d...@v1.10.0
with:
arch: ${{ matrix.arch }}

For completeness, I also use the following to set up MSBuild:

- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1

This is from a relatively old workflow file, so you might want to use
newer versions of these actions for now, but the above works for me.

Good luck,
VZ

Scott Talbert

unread,
Jul 27, 2022, 11:43:25 AM7/27/22
to wx-...@googlegroups.com
On Wed, 27 Jul 2022, Vadim Zeitlin wrote:

> ST> Mostly a question for VZ I think, but has anyone ever tried building
> ST> wxWidgets on a Windows GitHub Action image using nmake?
>
> I don't build wxWidgets itself using nmake because I either build it using
> MSBuild (for the projects using a customized version of it) or just use the
> release DLLs (that can be downloaded once and then cached, speeding up the
> build a lot), but I do build some other stuff using nmake and I use an
> action setting up things correctly for it to work, like this:
>
> - name: Set up nmake
> uses: ilammy/msvc-d...@v1.10.0
> with:
> arch: ${{ matrix.arch }}

Thanks. I've used that ilammy action on other projects on GitHub and it
works well. (It's kind of sad that Microsoft doesn't provide such an
action itself...) Unfortunately, wxPython uses Azure Pipelines so I don't
think I can use that action there.

Thanks for confirming that we're not trying to do anything too crazy. I'm
99% sure that they broke something in this most recent image that used to
work before.

Scott

Vadim Zeitlin

unread,
Jul 27, 2022, 11:51:52 AM7/27/22
to wx-...@googlegroups.com
On Wed, 27 Jul 2022 11:43:23 -0400 (EDT) Scott Talbert wrote:

ST> On Wed, 27 Jul 2022, Vadim Zeitlin wrote:
ST>
ST> > ST> Mostly a question for VZ I think, but has anyone ever tried building
ST> > ST> wxWidgets on a Windows GitHub Action image using nmake?
ST> >
ST> > I don't build wxWidgets itself using nmake because I either build it using
ST> > MSBuild (for the projects using a customized version of it) or just use the
ST> > release DLLs (that can be downloaded once and then cached, speeding up the
ST> > build a lot), but I do build some other stuff using nmake and I use an
ST> > action setting up things correctly for it to work, like this:
ST> >
ST> > - name: Set up nmake
ST> > uses: ilammy/msvc-d...@v1.10.0
ST> > with:
ST> > arch: ${{ matrix.arch }}
ST>
ST> Thanks. I've used that ilammy action on other projects on GitHub and it
ST> works well. (It's kind of sad that Microsoft doesn't provide such an
ST> action itself...) Unfortunately, wxPython uses Azure Pipelines so I don't
ST> think I can use that action there.

You probably should be able to redo what it does there manually, but I've
never used Azure Pipelines, so I can't help with this, sorry...

ST> Thanks for confirming that we're not trying to do anything too crazy. I'm
ST> 99% sure that they broke something in this most recent image that used to
ST> work before.

FWIW I'd really recommend _not_ using nmake for building wx, it doesn't
use parallel builds, so it's at least twice slower than msbuild (with /m
option), as I think that even the lowest grade CI runners provide more than
one core now.

Regards,
VZ
Reply all
Reply to author
Forward
0 new messages