Author Topic: build bot in the github, I see one nice project  (Read 57832 times)

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: build bot in the github, I see one nice project
« Reply #60 on: September 24, 2024, 04:22:25 pm »
And in my repository, the svn revision and the wxWidgets version now can be Automatically detected.

Thanks for the info. My github action code for created the release package is mainly created by chatGPT, and has some flaws. I got some warning message like below:

Quote
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/create-release@v1, actions/upload-release-asset@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

I think I will use your method, and by adding some time stamp for the release.

Question: why do you add a cron section?

Code
  schedule:
    - cron: '0 0 7,14,21,28 * *'

You want to run the github action every week? (chatGPT gives me the answer: the cron expression '0 0 7,14,21,28 * *' means that the job will run at midnight on the 7th, 14th, 21st, and 28th day of every month.)
Yes. Because then I won't need to run the Actions manually;
And your commands are accepted, thanks.
« Last Edit: September 24, 2024, 04:26:30 pm by Grit Clef »
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: build bot in the github, I see one nice project
« Reply #61 on: September 24, 2024, 04:39:28 pm »
Oh, when I tried your command:
The result is, first 13571 came out and then an error:
Error: Process completed with exit code 141.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6038
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #62 on: September 24, 2024, 04:54:24 pm »
Oh, when I tried your command:
The result is, first 13571 came out and then an error:
Error: Process completed with exit code 141.

The method already works in my fork, see here:

my fork's main branch
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6038
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #63 on: September 25, 2024, 12:43:43 am »
When I looked at the link

[MinGW] make check problem Issue #9115 protocolbuffers/protobuf

or

Make commands not working on Windows 10 at setting check up Issue #297 libcheck/check

It looks like the "DLL_EXPORT" is predefined in the auto configure tool?


EDIT:

I will try this patch below in the github action.

Code
diff --git a/src/include/cbplugin.h b/src/include/cbplugin.h
index 10258e5..a3ce67b 100644
--- a/src/include/cbplugin.h
+++ b/src/include/cbplugin.h
@@ -23,11 +23,11 @@
         #ifdef EXPORT_LIB
             #define PLUGIN_EXPORT __declspec (dllexport)
         #else // !EXPORT_LIB
-            #ifdef BUILDING_PLUGIN
+            #if defined(BUILDING_PLUGIN) || defined(DLL_EXPORT)
                 #define PLUGIN_EXPORT __declspec (dllexport)
-            #else // !BUILDING_PLUGIN
+            #else // !BUILDING_PLUGIN && !DLL_EXPORT
                 #define PLUGIN_EXPORT __declspec (dllimport)
-            #endif // BUILDING_PLUGIN
+            #endif // BUILDING_PLUGIN || DLL_EXPORT
         #endif // EXPORT_LIB
     #endif // PLUGIN_EXPORT
 #else

Some good news, the above mentioned change works.  :)


Another issue/question is that why you need such patch:

https://github.com/asmwarrior/x86-codeblocks-builds/blob/main/0001-fix-32-bit-build-and-wxSmith.patch

?


I looked at this link:

https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-codeblocks

I don't see they need such patch as yours.
« Last Edit: September 25, 2024, 12:46:30 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6038
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #64 on: September 25, 2024, 04:12:44 am »
Well, I see your patch's content is too large, and I apply it locally, and I see only two line changes:

see below:

Code
diff --git a/src/plugins/contrib/wxSmith/Makefile.am b/src/plugins/contrib/wxSmith/Makefile.am
index 38262bf..dfe9df2 100644
--- a/src/plugins/contrib/wxSmith/Makefile.am
+++ b/src/plugins/contrib/wxSmith/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
 
 lib_LTLIBRARIES = libwxsmithlib.la
 
-libwxsmithlib_la_LDFLAGS = -version-info 0:1:0 -shared
+libwxsmithlib_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
 
 libwxsmithlib_la_LIBADD = ../../../sdk/libcodeblocks.la \
  properties/libwxsmith_properties.la \


I think this is exactly the patch file in msys2 here:

https://github.com/msys2/MINGW-packages/blob/f47229e160e1f31f24fdc6142be7b4df99b1a4c3/mingw-w64-codeblocks/001-makefile-wxsmith-add-no-undefined.patch

Another change line is here:

Code
diff --git a/src/src/Makefile.am b/src/src/Makefile.am
index 49d5dd9..d59889b 100644
--- a/src/src/Makefile.am
+++ b/src/src/Makefile.am
@@ -75,7 +75,7 @@ codeblocks_LDADD += resources.$(OBJEXT) -lexchndl -lcomctl32
 codeblocks_DEPENDENCIES = resources.$(OBJEXT)
 codeblocks_SOURCES += associations.cpp
 resources.$(OBJEXT): resources/resources.rc resources/amd64_dpi_aware_on.manifest
- $(WINDRES) $(WX_CXXFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@
+ $(WINDRES) $(WX_CPPFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@
 endif
 
 noinst_HEADERS = app.h \

This is the command line option you changed for compiling the resource rc file. I don't see a similar patch in msys2's codeblocks folder:
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-codeblocks

Another patch I see is here:
https://github.com/msys2/MINGW-packages/blob/f47229e160e1f31f24fdc6142be7b4df99b1a4c3/mingw-w64-codeblocks/005-codeblocks-plugin-fix.patch

Code
--- a/src/sdk/configmanager.cpp	(revision 13538)
+++ b/src/sdk/configmanager.cpp (working copy)
@@ -1497,7 +1497,7 @@
     if (plugin_path_global.IsEmpty())
     {
         if (platform::windows)
-            ConfigManager::plugin_path_global = app_path + _T("/../lib/codeblocks/plugins");
+            ConfigManager::plugin_path_global = app_path + _T("\\..\\lib\\codeblocks\\plugins");
         else if (platform::macosx)
             ConfigManager::plugin_path_global = data_path_global + _T("/plugins");
         else

@Tim, can you say something about this code change? If we don't change this, what will happen? I don't see this code change in my github action's code.

Thanks.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7703
    • My Best Post
Re: build bot in the github, I see one nice project
« Reply #65 on: September 25, 2024, 11:03:04 am »
See https://sourceforge.net/p/codeblocks/tickets/1497/

It is a run-time false warning fix when installing cbplugin files.

See also https://sourceforge.net/p/codeblocks/tickets/1498/
This is an 32 bit build fix and it is also needed for 64 bit wxWidgets 3.3.x building of code::blocks.

Tim S.
« Last Edit: September 25, 2024, 11:21:32 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6038
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #66 on: September 25, 2024, 11:47:12 am »
See https://sourceforge.net/p/codeblocks/tickets/1497/

It is a run-time false warning fix when installing cbplugin files.

See also https://sourceforge.net/p/codeblocks/tickets/1498/
This is an 32 bit build fix and it is also needed for 64 bit wxWidgets 3.3.x building of code::blocks.

Tim S.

Thanks, I will try this patch later.

BTW: I'm going to commit the changes in src/include/cbplugin.h mentioned in my previous posts, is that what you suggested way to handle the wxSmith build issue?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7703
    • My Best Post
Re: build bot in the github, I see one nice project
« Reply #67 on: September 25, 2024, 12:02:05 pm »
See https://sourceforge.net/p/codeblocks/tickets/1497/

It is a run-time false warning fix when installing cbplugin files.

See also https://sourceforge.net/p/codeblocks/tickets/1498/
This is an 32 bit build fix and it is also needed for 64 bit wxWidgets 3.3.x building of code::blocks.

Tim S.

Thanks, I will try this patch later.

BTW: I'm going to commit the changes in src/include/cbplugin.h mentioned in my previous posts, is that what you suggested way to handle the wxSmith build issue?

I have not suggested any wxSmith build fixes; because for some reason I can not test any of them locally on my msys2 mingw enviroments.
I have no idea if it is a software or hardware bug on my PC, I get a false cannot find file message.
Edit: Found the cause of my wxSmith build error; the path to "MINGW-packages" was too long or it had too many sub-folders in it.

Tim S.
« Last Edit: September 25, 2024, 07:22:36 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7703
    • My Best Post
Re: build bot in the github, I see one nice project
« Reply #68 on: September 26, 2024, 02:26:19 am »
Found what I consider the proper fix for building wxSmith under Msys2 MinGW using configure/make.

You need to update the file "ax_cxx_compile_stdcxx.m4" using https://github.com/autoconf-archive/autoconf-archive/blob/master/m4/ax_cxx_compile_stdcxx.m4

Edit2: With the old ax_cxx_compile_stdcxx.m4 the wxsmith plugin was compiled using c++17 instead of c++11 which is what it should have used.
Edit5: Testing implies c++14 works; but, c++17 fails and GCC 14.x defaults to c++17.

Edit: I have not yet finished testing the building and yet to run the plugin.

Edit3: It built and the wxsmith plugin loaded without any message seen by me.

Edit4: I created an git package when I thought svn might have been the cause of the file not found bug. See https://github.com/stahta01/MINGW-packages/tree/codeblocks-git/mingw-w64-codeblocks-git

And, apply this patch.

Code
--- a/src/plugins/contrib/wxSmith/Makefile.am
+++ b/src/plugins/contrib/wxSmith/Makefile.am
@@ -7,7 +7,11 @@
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 lib_LTLIBRARIES = libwxsmithlib.la
 
-libwxsmithlib_la_LDFLAGS = -version-info 0:1:0 -shared
+libwxsmithlib_la_LDFLAGS = -version-info 0:1:0 -shared -no-undefined
 
 libwxsmithlib_la_LIBADD = ../../../sdk/libcodeblocks.la \
  properties/libwxsmith_properties.la \
--- a/src/plugins/contrib/wxSmith/properties/Makefile.am
+++ b/src/plugins/contrib/wxSmith/properties/Makefile.am
@@ -2,6 +2,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/sdk/wxscintilla/include
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 noinst_LTLIBRARIES = libwxsmith_properties.la
 
 libwxsmith_properties_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
--- a/src/plugins/contrib/wxSmith/wxwidgets/defitems/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/defitems/Makefile.am
@@ -2,6 +2,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/sdk/wxscintilla/include
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets_defitems.la
 
 libwxsmith_wxwidgets_defitems_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
--- a/src/plugins/contrib/wxSmith/wxwidgets/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/Makefile.am
@@ -5,6 +5,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/sdk/wxscintilla/include
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets.la
 
 libwxsmith_wxwidgets_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
--- a/src/plugins/contrib/wxSmith/wxwidgets/properties/Makefile.am
+++ b/src/plugins/contrib/wxSmith/wxwidgets/properties/Makefile.am
@@ -2,6 +2,10 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
  -I$(top_srcdir)/src/include \
  -I$(top_srcdir)/src/sdk/wxscintilla/include
 
+if CODEBLOCKS_NT
+AM_CPPFLAGS += -DEXPORT_LIB
+endif
+
 noinst_LTLIBRARIES = libwxsmith_wxwidgets_properties.la
 
 libwxsmith_wxwidgets_properties_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
--
« Last Edit: September 26, 2024, 06:00:47 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6038
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #69 on: September 26, 2024, 07:46:59 am »
Hi, Tim, thanks.

I looked at your patches here:  https://github.com/stahta01/MINGW-packages/tree/codeblocks-git/mingw-w64-codeblocks-git

Especially this one: https://github.com/stahta01/MINGW-packages/blob/codeblocks-git/mingw-w64-codeblocks-git/007-makefile-wxsmith-plugin-export-fix.patch

I see that you have added the "EXPORT_LIB" macro definition in the Makefile.am file in the compiler option.

I think defining this has the same effect as my change of the:

Code
diff --git a/src/include/cbplugin.h b/src/include/cbplugin.h
index 10258e5..a3ce67b 100644
--- a/src/include/cbplugin.h
+++ b/src/include/cbplugin.h
@@ -23,11 +23,11 @@
         #ifdef EXPORT_LIB
             #define PLUGIN_EXPORT __declspec (dllexport)
         #else // !EXPORT_LIB
-            #ifdef BUILDING_PLUGIN
+            #if defined(BUILDING_PLUGIN) || defined(DLL_EXPORT)
                 #define PLUGIN_EXPORT __declspec (dllexport)
-            #else // !BUILDING_PLUGIN
+            #else // !BUILDING_PLUGIN && !DLL_EXPORT
                 #define PLUGIN_EXPORT __declspec (dllimport)
-            #endif // BUILDING_PLUGIN
+            #endif // BUILDING_PLUGIN || DLL_EXPORT
         #endif // EXPORT_LIB
     #endif // PLUGIN_EXPORT
 #else

Because defining such macro will make the "#define PLUGIN_EXPORT __declspec (dllexport)" take effect.


But, when I search the build log(the build log I have days ago) of the configure/make result. I see that when we build plugins, we don't have such "EXPORT_LIB" defined in many plugins, for example, when build the codecompletion plugin or compiler plugin, I see the log code looks like below:

Code
2024-09-24T11:47:33.4430652Z libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../src/include -ID:/msys64/mingw64/lib/wx/include/msw-unicode-3.2 -ID:/msys64/mingw64/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -I../../../src/include/scripting/include -I../../../src/include -I../../../src/sdk/wxscintilla/include -I../../../src/plugins/compilergcc/depslib/src -DDEPSLIB_WINDOWS -DCB_AUTOCONF -DPIC -O2 -ffast-math -fPIC -fexceptions -MT compilermessages.lo -MD -MP -MF .deps/compilermessages.Tpo -c compilermessages.cpp  -DDLL_EXPORT -DPIC -o .libs/compilermessages.o

or


Code
2024-09-24T12:28:29.7971808Z libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -ID:/msys64/mingw64/lib/wx/include/msw-unicode-3.2 -ID:/msys64/mingw64/include/wx-3.2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -I../../../../src/include/tinyxml -I./src -I./src/LSPclient -I./src/codecompletion -I./src/winprocess -I./src/winprocess/asyncprocess -I./src/winprocess/misc -DCB_AUTOCONF -DPIC -O2 -ffast-math -fPIC -fexceptions -MT src/codecompletion/parser/parser.lo -MD -MP -MF src/codecompletion/parser/.deps/parser.Tpo -c src/codecompletion/parser/parser.cpp  -DDLL_EXPORT -DPIC -o src/codecompletion/parser/.libs/parser.o

You see, the "-DDLL_EXPORT -DPIC" is always defined. When I looked at the Makefile.am for those plugins, I don't see they defined the EXPORT_LIB.

So, I'm not sure why those plugins can be built with out issue.

But when I looked at the cbp files for those plugins, I see "BUILDING_PLUGIN" is always defined in the cbp, from the cbplugin.h, I see that "BUILDING_PLUGIN" means "#define PLUGIN_EXPORT __declspec (dllexport)".

So, my question is: shall we enable all "__declspec (dllexport)" if I see the "-DDLL_EXPORT"? It looks like "DLL_EXPORT" comes from the configure/auto-make world, but I can't find its source.

Thanks.







If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6038
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #70 on: September 26, 2024, 10:11:45 am »
I searched all the usage of PLUGIN_EXPORT in our source code base, and I see the only usage of the PLUGIN_EXPORT is in the wxSmith, such as:

"class PLUGIN_EXPORT wxsAdvQPP : public wxsQuickPropsPanel"

Basically, I think the other plugin just export all the symbols of the classes and functions. While, for wxsmith, only a limited symbols will be exported (because we can only exported the symbols with "__declspec (dllexport)").

So, when you define the "EXPORT_LIB", you add the "__declspec (dllexport)" to that symbol.

But export all the symbols of the whole dll is not a good idea, because not every symbol should be exported, and the total symbols resolution take extra time for the dll loader.

If I remember correctly, under wxWidgets, the dll only export a limited number of symbols, and it also reduce the dll size.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6038
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #71 on: September 26, 2024, 03:18:53 pm »
I have applied Tim's all patches in my git repo: https://github.com/asmwarrior/codeblocks_sfmirror

and when building the C::B, it looks OK.

But when I run the "mv" command, it failed in this line:

Code
./bootstrap
./configure --disable-pch --with-contrib-plugins=all,-Valgrind --prefix=/opt/codeblocks
make -j$(nproc) install
mv /opt/codeblocks/lib/codeblocks/bin/*.dll /opt/codeblocks/bin/
mv /opt/codeblocks/lib/*.dll /opt/codeblocks/bin/

Code
2024-09-26T12:43:53.9461424Z + mv /opt/codeblocks/lib/codeblocks/bin/libwxchartctrl-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxcustombutton-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxflatnotebook-0.dll /opt/codeblocks/lib/codeblocks/bin/libwximagepanel-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxkwic-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxled-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxmathplot-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxspeedbutton-0.dll /opt/codeblocks/bin/
2024-09-26T12:43:53.9636034Z + mv '/opt/codeblocks/lib/*.dll' /opt/codeblocks/bin/
2024-09-26T12:43:53.9781662Z mv: cannot stat '/opt/codeblocks/lib/*.dll': No such file or directory
2024-09-26T12:43:53.9845301Z ##[error]Process completed with exit code 1.

It looks like there is no file: /opt/codeblocks/lib/*.dll

@Grit Clef
Maybe, this mv line should be removed?

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7703
    • My Best Post
Re: build bot in the github, I see one nice project
« Reply #72 on: September 26, 2024, 04:39:46 pm »
I have applied Tim's all patches in my git repo: https://github.com/asmwarrior/codeblocks_sfmirror

and when building the C::B, it looks OK.

But when I run the "mv" command, it failed in this line:

Code
./bootstrap
./configure --disable-pch --with-contrib-plugins=all,-Valgrind --prefix=/opt/codeblocks
make -j$(nproc) install
mv /opt/codeblocks/lib/codeblocks/bin/*.dll /opt/codeblocks/bin/
mv /opt/codeblocks/lib/*.dll /opt/codeblocks/bin/

Code
2024-09-26T12:43:53.9461424Z + mv /opt/codeblocks/lib/codeblocks/bin/libwxchartctrl-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxcustombutton-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxflatnotebook-0.dll /opt/codeblocks/lib/codeblocks/bin/libwximagepanel-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxkwic-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxled-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxmathplot-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxspeedbutton-0.dll /opt/codeblocks/bin/
2024-09-26T12:43:53.9636034Z + mv '/opt/codeblocks/lib/*.dll' /opt/codeblocks/bin/
2024-09-26T12:43:53.9781662Z mv: cannot stat '/opt/codeblocks/lib/*.dll': No such file or directory
2024-09-26T12:43:53.9845301Z ##[error]Process completed with exit code 1.

It looks like there is no file: /opt/codeblocks/lib/*.dll

@Grit Clef
Maybe, this mv line should be removed?

I think you likely had an wxContribItems build error because memory says that is what plugin has dlls in that place.
Edit: Looks like your dlls went to a different place; so, removing it should be okay. Unless that is the location for the wxsmith dll.
Edit2: Find where the "libwxsmithlib.dll" is located because I think it should be in that location.

Tim S.
« Last Edit: September 26, 2024, 04:55:00 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6038
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build bot in the github, I see one nice project
« Reply #73 on: September 26, 2024, 05:03:00 pm »
I have applied Tim's all patches in my git repo: https://github.com/asmwarrior/codeblocks_sfmirror

and when building the C::B, it looks OK.

But when I run the "mv" command, it failed in this line:

Code
./bootstrap
./configure --disable-pch --with-contrib-plugins=all,-Valgrind --prefix=/opt/codeblocks
make -j$(nproc) install
mv /opt/codeblocks/lib/codeblocks/bin/*.dll /opt/codeblocks/bin/
mv /opt/codeblocks/lib/*.dll /opt/codeblocks/bin/

Code
2024-09-26T12:43:53.9461424Z + mv /opt/codeblocks/lib/codeblocks/bin/libwxchartctrl-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxcustombutton-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxflatnotebook-0.dll /opt/codeblocks/lib/codeblocks/bin/libwximagepanel-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxkwic-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxled-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxmathplot-0.dll /opt/codeblocks/lib/codeblocks/bin/libwxspeedbutton-0.dll /opt/codeblocks/bin/
2024-09-26T12:43:53.9636034Z + mv '/opt/codeblocks/lib/*.dll' /opt/codeblocks/bin/
2024-09-26T12:43:53.9781662Z mv: cannot stat '/opt/codeblocks/lib/*.dll': No such file or directory
2024-09-26T12:43:53.9845301Z ##[error]Process completed with exit code 1.

It looks like there is no file: /opt/codeblocks/lib/*.dll

@Grit Clef
Maybe, this mv line should be removed?

I think you likely had an wxContribItems build error because memory says that is what plugin has dlls in that place.
Edit: Looks like your dlls went to a different place; so, removing it should be okay. Unless that is the location for the wxsmith dll.
Edit2: Find where the "libwxsmithlib.dll" is located because I think it should be in that location.

Tim S.

Thanks.

I see the "libwxsmithlib.dll" (actually the name is libwxsmithlib-0.dll) is not in the lib folder, but in the bin folder, see the log below:

Code
Line 8135: 2024-09-26T12:40:09.5700956Z libtool: install:  /usr/bin/install -c .libs/libwxsmithlib-0.dll /opt/codeblocks/lib/../bin/libwxsmithlib-0.dll

So, I just comment out the second "mv" command, and run the github action again.

BTW:

Quote
I think you likely had an wxContribItems build error because memory says that is what plugin has dlls in that place.

I don't think there is a build error.  :)


EDIT:

It looks like removing the second "mv" command solved the github action failure.
« Last Edit: September 26, 2024, 05:29:44 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: build bot in the github, I see one nice project
« Reply #74 on: September 28, 2024, 07:00:49 am »
Well, I see your patch's content is too large, and I apply it locally, and I see only two line changes:

see below:

Code
diff --git a/src/plugins/contrib/wxSmith/Makefile.am b/src/plugins/contrib/wxSmith/Makefile.am
index 38262bf..dfe9df2 100644
--- a/src/plugins/contrib/wxSmith/Makefile.am
+++ b/src/plugins/contrib/wxSmith/Makefile.am
@@ -7,7 +7,7 @@ AM_CPPFLAGS = $(WX_CXXFLAGS) \
 
 lib_LTLIBRARIES = libwxsmithlib.la
 
-libwxsmithlib_la_LDFLAGS = -version-info 0:1:0 -shared
+libwxsmithlib_la_LDFLAGS = @MODULE_SHARED_LDFLAGS@ -version-info 0:1:0 -no-undefined -avoid-version
 
 libwxsmithlib_la_LIBADD = ../../../sdk/libcodeblocks.la \
  properties/libwxsmith_properties.la \


I think this is exactly the patch file in msys2 here:

https://github.com/msys2/MINGW-packages/blob/f47229e160e1f31f24fdc6142be7b4df99b1a4c3/mingw-w64-codeblocks/001-makefile-wxsmith-add-no-undefined.patch

Another change line is here:

Code
diff --git a/src/src/Makefile.am b/src/src/Makefile.am
index 49d5dd9..d59889b 100644
--- a/src/src/Makefile.am
+++ b/src/src/Makefile.am
@@ -75,7 +75,7 @@ codeblocks_LDADD += resources.$(OBJEXT) -lexchndl -lcomctl32
 codeblocks_DEPENDENCIES = resources.$(OBJEXT)
 codeblocks_SOURCES += associations.cpp
 resources.$(OBJEXT): resources/resources.rc resources/amd64_dpi_aware_on.manifest
- $(WINDRES) $(WX_CXXFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@
+ $(WINDRES) $(WX_CPPFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@
 endif
 
 noinst_HEADERS = app.h \

This is the command line option you changed for compiling the resource rc file. I don't see a similar patch in msys2's codeblocks folder:
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-codeblocks

Another patch I see is here:
https://github.com/msys2/MINGW-packages/blob/f47229e160e1f31f24fdc6142be7b4df99b1a4c3/mingw-w64-codeblocks/005-codeblocks-plugin-fix.patch

Code
--- a/src/sdk/configmanager.cpp	(revision 13538)
+++ b/src/sdk/configmanager.cpp (working copy)
@@ -1497,7 +1497,7 @@
     if (plugin_path_global.IsEmpty())
     {
         if (platform::windows)
-            ConfigManager::plugin_path_global = app_path + _T("/../lib/codeblocks/plugins");
+            ConfigManager::plugin_path_global = app_path + _T("\\..\\lib\\codeblocks\\plugins");
         else if (platform::macosx)
             ConfigManager::plugin_path_global = data_path_global + _T("/plugins");
         else

@Tim, can you say something about this code change? If we don't change this, what will happen? I don't see this code change in my github action's code.

Thanks.

The patch is intended to solve some problems on building, especially when building a 32bit codeblocks. I have tried those patches, like those in msys2, but git always gives me an error. So, I added the all-in-one patch to my repository.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version