User forums > General (but related to Code::Blocks)
Faild to build C::B with github action with latest wxWidgets 3.3.3
(1/1)
ollydbg:
Hi, I used to use github action to build the C::B for windows under msys2/UCRT64 platform. It works OK for a long time.
Recently, I see the build error, I found that if I try to enable the "update" of the msys2 packages, then the github action get failed.
If I don't enable the update of the packages, I can build the C::B successfully, but the wxWidgets library is 3.3.2, not the latest wx 3.3.3.
Here is my github project:
https://github.com/asmwarrior/x86-codeblocks-builds
You can see the core script is this one:
https://github.com/asmwarrior/x86-codeblocks-builds/blob/main/.github/workflows/main64.yml
I tweak the yml files for a while, see the change logs of this file, and I can't solve this issue.
Any one can help? Thanks.
ollydbg:
I solved the problem. Both inside the yml file(see the change logs of the above file) and the C::B source code(see patch below).
--- Code: ---diff --git a/src/plugins/contrib/source_exporter/Makefile.am b/src/plugins/contrib/source_exporter/Makefile.am
index 45b3580..269670d 100644
--- a/src/plugins/contrib/source_exporter/Makefile.am
+++ b/src/plugins/contrib/source_exporter/Makefile.am
@@ -20,6 +20,8 @@ libexporter_la_LIBADD = ../../../sdk/libcodeblocks.la \
if ! CODEBLOCKS_NT
libexporter_la_LIBADD += $(CB_TINYXML_LIBS)
+else
+libexporter_la_LIBADD += -lgdi32
endif
libexporter_la_SOURCES = BaseExporter.cpp \
--- End code ---
and
--- Code: ---diff --git a/src/plugins/contrib/debugger_gdbmi/Makefile.am b/src/plugins/contrib/debugger_gdbmi/Makefile.am
index 509b253..b3d2405 100644
--- a/src/plugins/contrib/debugger_gdbmi/Makefile.am
+++ b/src/plugins/contrib/debugger_gdbmi/Makefile.am
@@ -22,11 +22,10 @@ libdebugger_gdbmi_la_LDFLAGS = \
libdebugger_gdbmi_la_LIBADD = \
../../../sdk/libcodeblocks.la \
- $(CB_TINYXML_LIBS) \
$(WX_LIBS)
if ! CODEBLOCKS_NT
-libdebugger_gdbmi_la_LIBADD += -lutil
+libdebugger_gdbmi_la_LIBADD += -lutil $(CB_TINYXML_LIBS)
endif
libdebugger_gdbmi_la_SOURCES = \
--- End code ---
ollydbg:
I have committed those changes to the svn trunk.
Oh, I just forgot that the log message should be start with the "-", I will remember that later. ;)
Still, I'd like to use git instead of the "git svn".
MehdiChinoune:
Take a look at https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-codeblocks
I have fixed building codeblocks 25.03 (but with wxwidgets 3.2), something was changed in one of its runtime/build dependencies but I can't determine where/which.
003-fix-link-to-tinyxml.patch
--- Code: ------ a/src/plugins/codecompletion/Makefile.am
+++ b/src/plugins/codecompletion/Makefile.am
@@ -11,12 +11,9 @@
libcodecompletion_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libcodecompletion_la_LIBADD = ../../sdk/libcodeblocks.la\
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
-if ! CODEBLOCKS_NT
-libcodecompletion_la_LIBADD += $(CB_TINYXML_LIBS)
-endif
-
libcodecompletion_la_SOURCES = ccoptionsdlg.cpp \
ccoptionsprjdlg.cpp \
cctreectrl.cpp \
--- a/src/plugins/contrib/AutoVersioning/Makefile.am
+++ b/src/plugins/contrib/AutoVersioning/Makefile.am
@@ -9,7 +9,8 @@
libAutoVersioning_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libAutoVersioning_la_LIBADD = ../../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
libAutoVersioning_la_SOURCES = AutoVersioning.cpp \
avChangesDlg.cpp \
--- a/src/plugins/contrib/BrowseTracker/Makefile.am
+++ b/src/plugins/contrib/BrowseTracker/Makefile.am
@@ -9,7 +9,8 @@
libBrowseTracker_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libBrowseTracker_la_LIBADD = ../../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
libBrowseTracker_la_SOURCES = BrowseTracker.cpp \
Version.cpp \
--- a/src/plugins/contrib/CppCheck/Makefile.am
+++ b/src/plugins/contrib/CppCheck/Makefile.am
@@ -11,7 +11,8 @@
libCppCheck_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libCppCheck_la_LIBADD = ../../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
libCppCheck_la_SOURCES = CppCheck.cpp \
CppCheckListLog.cpp \
--- a/src/plugins/contrib/DoxyBlocks/Makefile.am
+++ b/src/plugins/contrib/DoxyBlocks/Makefile.am
@@ -9,7 +9,8 @@
libDoxyBlocks_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libDoxyBlocks_la_LIBADD = ../../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
libDoxyBlocks_la_SOURCES = AutoDoc.cpp \
Config.cpp \
--- a/src/plugins/contrib/EditorConfig/Makefile.am
+++ b/src/plugins/contrib/EditorConfig/Makefile.am
@@ -9,7 +9,8 @@
libEditorConfig_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libEditorConfig_la_LIBADD = ../../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
libEditorConfig_la_SOURCES = \
EditorConfigUI.cpp \
--- a/src/plugins/contrib/SpellChecker/Makefile.am
+++ b/src/plugins/contrib/SpellChecker/Makefile.am
@@ -15,7 +15,8 @@
libSpellChecker_la_LIBADD = ../../../sdk/libcodeblocks.la \
wxspellchecker/libwxSpellChecker.la \
$(WX_LIBS) \
- $(CB_HUNSPELL_LIBS)
+ $(CB_HUNSPELL_LIBS) \
+ $(CB_TINYXML_LIBS)
libSpellChecker_la_SOURCES = DictionariesNeededDialog.cpp \
MySpellingDialog.cpp \
--- a/src/plugins/contrib/Valgrind/Makefile.am
+++ b/src/plugins/contrib/Valgrind/Makefile.am
@@ -11,7 +11,8 @@
libValgrind_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libValgrind_la_LIBADD = ../../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
libValgrind_la_SOURCES = Valgrind.cpp \
ValgrindListLog.cpp \
--- a/src/plugins/contrib/clangd_client/Makefile.am
+++ b/src/plugins/contrib/clangd_client/Makefile.am
@@ -33,7 +33,8 @@
libclangd_client_la_LIBADD = \
../../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
if ! CODEBLOCKS_NT
libclangd_client_la_LIBADD += -lutil
endif
--- a/src/plugins/contrib/codesnippets/Makefile.am
+++ b/src/plugins/contrib/codesnippets/Makefile.am
@@ -16,7 +16,8 @@
libcodesnippets_la_LIBADD = ../../../sdk/libcodeblocks.la \
$(WX_LIBS) \
$(WX_GTK_LIBS) \
- $(WX_X11_LIBS)
+ $(WX_X11_LIBS) \
+ $(CB_TINYXML_LIBS)
libcodesnippets_la_SOURCES = codesnippets.cpp \
codesnippetstreectrl.cpp \
--- a/src/plugins/contrib/envvars/Makefile.am
+++ b/src/plugins/contrib/envvars/Makefile.am
@@ -11,7 +11,8 @@
libenvvars_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libenvvars_la_LIBADD = ../../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
libenvvars_la_SOURCES = envvars.cpp \
envvars_cfgdlg.cpp \
--- a/src/plugins/contrib/lib_finder/Makefile.am
+++ b/src/plugins/contrib/lib_finder/Makefile.am
@@ -15,7 +15,8 @@
liblib_finder_la_LIBADD = ../../../sdk/libcodeblocks.la \
../wxContribItems/wxFlatNotebook/libwxflatnotebook.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
liblib_finder_la_SOURCES = \
librariesdlg.cpp \
--- a/src/plugins/contrib/wxSmithAui/Makefile.am
+++ b/src/plugins/contrib/wxSmithAui/Makefile.am
@@ -14,7 +14,8 @@
libwxSmithAui_la_LIBADD = ../../../sdk/libcodeblocks.la \
../wxSmith/libwxsmithlib.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
EXTRA_DIST = $(srcdir)/images/*.xpm \
$(srcdir)/images/*.xcf \
--- a/src/plugins/contrib/wxSmithContribItems/Makefile.am
+++ b/src/plugins/contrib/wxSmithContribItems/Makefile.am
@@ -38,7 +38,8 @@
../wxContribItems/wxthings/libwxcustombutton.la \
../wxContribItems/wxled/libwxled.la \
../wxContribItems/wxmathplot/libwxmathplot.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
EXTRA_DIST = $(srcdir)/wxchart/*.xpm \
$(srcdir)/wxchart/*.png \
--- a/src/plugins/debuggergdb/Makefile.am
+++ b/src/plugins/debuggergdb/Makefile.am
@@ -13,12 +13,9 @@
libdebugger_la_LIBADD = ../../sdk/libcodeblocks.la \
$(WX_LIBS) \
- $(WX_GTK_LIBS)
+ $(WX_GTK_LIBS) \
+ $(CB_TINYXML_LIBS)
-if ! CODEBLOCKS_NT
-libdebugger_la_LIBADD += $(CB_TINYXML_LIBS)
-endif
-
libdebugger_la_SOURCES = cdb_driver.cpp \
databreakpointdlg.cpp \
debugger_defs.cpp \
--- a/src/plugins/openfileslist/Makefile.am
+++ b/src/plugins/openfileslist/Makefile.am
@@ -9,12 +9,9 @@
libopenfileslist_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libopenfileslist_la_LIBADD = ../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
-if ! CODEBLOCKS_NT
-libopenfileslist_la_LIBADD += $(CB_TINYXML_LIBS)
-endif
-
libopenfileslist_la_SOURCES = openfileslistplugin.cpp
noinst_HEADERS = openfileslistplugin.h
--- a/src/plugins/projectsimporter/Makefile.am
+++ b/src/plugins/projectsimporter/Makefile.am
@@ -11,12 +11,9 @@
libprojectsimporter_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
libprojectsimporter_la_LIBADD = ../../sdk/libcodeblocks.la \
- $(WX_LIBS)
+ $(WX_LIBS) \
+ $(CB_TINYXML_LIBS)
-if ! CODEBLOCKS_NT
-libprojectsimporter_la_LIBADD += $(CB_TINYXML_LIBS)
-endif
-
libprojectsimporter_la_SOURCES = projectsimporter.cpp \
devcpploader.cpp \
msvc10loader.cpp \
--- End code ---
004-fix-link-to-gdi32.patch
--- Code: ------ a/src/plugins/contrib/source_exporter/Makefile.am
+++ b/src/plugins/contrib/source_exporter/Makefile.am
@@ -17,6 +17,10 @@
libexporter_la_LIBADD = ../../../sdk/libcodeblocks.la \
wxPdfDocument/libwxPdfDocument.la \
$(WX_LIBS) $(CB_FONTCONFIG_LIBS)
+
+if CODEBLOCKS_NT
+libexporter_la_LIBADD += -lgdi32
+endif
libexporter_la_SOURCES = BaseExporter.cpp \
exporter.cpp \
--- End code ---
ollydbg:
Hi, MehdiChinoune, thanks for the help and useful links.
For this code snippet:
--- Code: ---if ! CODEBLOCKS_NT
libxxxxxxxxxxxxxxxx_la_LIBADD += $(CB_TINYXML_LIBS)
endif
--- End code ---
The code was added in many plugins' Makefile.am files. My guess is that under linux like system, we need add those symbols from C::B's own embeded tinyxml library. But under Windows, it looks like those symbols were already added to the SDK(codeblocks.dll), so they are not needed.
Thanks.
Navigation
[0] Message Index
Go to full version