Building wxwidgets for Code::Blocks fails on very first attempt from Github source (Issue #22435)

51 views
Skip to first unread message

AndrewC

unread,
May 18, 2022, 7:32:33 AM5/18/22
to wx-...@googlegroups.com, Subscribed

Describe the problem
If you grab the wxWidget source code from github then the very first build fails using the following configuration:

  • Msys2 Mingw64 compiler
  • wxWidget build command line: 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
  • Directory command run from: github_wxWidget_3.1.6/build/msw
  • OS: Windows 10
  • Shell: mingw64.exe (bash configured for Mingw64)

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

  • wxWidgets version you use: 3.1.6
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 10.0.19044.1706 aka 21H2 patched up to last week
  • Compiler being used: MSYS2 Mingw64

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.Message ID: <wxWidgets/wxWidgets/issues/22435@github.com>

VZ

unread,
May 18, 2022, 7:48:40 AM5/18/22
to wx-...@googlegroups.com, Subscribed

This is a known issue, which is unfortunately not that easy to fix, please use the documented workaround for now:

https://github.com/wxWidgets/wxWidgets/blob/ed264087ec524fcc56f146810f6c95ab1bb08344/docs/msw/install.md?plain=1#L237-L240


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22435/1129909579@github.com>

VZ

unread,
May 18, 2022, 7:50:59 AM5/18/22
to wx-...@googlegroups.com, Subscribed

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.Message ID: <wxWidgets/wxWidgets/issues/22435/1129911547@github.com>

VZ

unread,
May 18, 2022, 7:50:59 AM5/18/22
to wx-...@googlegroups.com, Subscribed

Closed #22435.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/22435/issue_event/6631672467@github.com>

Reply all
Reply to author
Forward
0 new messages