Describe the problem
If you grab the wxWidget source code from github then the very first build fails using the following configuration:
Second and subsequent build work, but I am working on automating the build using github actions and as such it needs to build on the first attempt.
Build log
+-------------------------------------------------------------------------------------------------+
| BUILD STAGE: release setup.h |
| mingw32-make -j -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 VENDOR=cb CXXFLAGS=-std=gnu++17 SHELL=cmd.exe setup_h |
+-------------------------------------------------------------------------------------------------+
if not exist ....\lib\gcc_dll mkdir ....\lib\gcc_dll
if not exist ....\lib\gcc_dll\mswu\wx\setup.h copy ....\include\wx\msw\setup.h ....\lib\gcc_dll\mswu\wx\setup.h
if not exist ....\lib\gcc_dll\mswu mkdir ....\lib\gcc_dll\mswu
The system cannot find the path specified.
0 file(s) copied.
mingw32-make: *** [makefile.gcc:5976: ....\lib\gcc_dll\mswu\wx\setup.h] Error 1
mingw32-make: *** Waiting for unfinished jobs....
Platform and version information
Root Cause
The github_wxWidget_3.1.6/build/msw/makefile.gcc has the following code between lines 5971 and 5981
5971 $(SETUPHDIR)\wx: $(SETUPHDIR)
5972 if not exist $(SETUPHDIR)\wx mkdir $(SETUPHDIR)\wx
5973
5974 $(SETUPHDIR)\wx\setup..h:
5975 if not exist $(SETUPHDIR)\wx\setup.h copy ..\..\include\wx\$(__SETUP_H_SUBDIR_FILENAMES)\setup.h $(SETUPHDIR)\wx\setup.h
5976
5977 $(SETUPHDIR)\wx\msw: $(SETUPHDIR)\wx
5978 if not exist $(SETUPHDIR)\wx\msw mkdir $(SETUPHDIR)\wx\msw
5979
5980 $(SETUPHDIR)\wx\msw\rcdefs.h: $(SETUPHDIR)\wx\msw ..\..\include\wx\msw\genrcdefs.h
5981 $(CPP) $(CPPFLAGS) "..\..\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
The problem is that the build needs execute the copy on like 5975, but the $(SETUPHDIR)\wx does not exist so it fails. The solution is to change line 5974 to the following so that the directory is created before the copy is done:
$(SETUPHDIR)\wx\setup.h: $(SETUPHDIR)\wx
I have no idea how the makefile.gcc is created and as such cannot supply a PR.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This is a known issue, which is unfortunately not that easy to fix, please use the documented workaround for now:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Oh, and it's the same as #14470, so closing this one.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #22435.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()