Author Topic: Bugs found in MSys2 MINGW packages  (Read 4331 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7666
    • My Best Post
Bugs found in MSys2 MINGW packages
« on: August 12, 2024, 04:53:24 pm »
Bugs I have found in MSys2 MINGW packages mainly under UCRT64 or MINGW64 MSys2 environments.
These are bugs that are not MSys2 MINGW packaging caused.

1. Warning on installing cbplugin file
MSys2 MINGW packaging uses configure/make to build the package and this bug likely only exists under Windows with configure/make builds.
Edit link to SF ticket https://sourceforge.net/p/codeblocks/tickets/1497/
Fix below
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

2. MSys2 MINGW32 has build error. I have no idea why MINGW64 and UCRT64 does not have this error.
MSys2 MINGW packaging uses configure/make to build the package and this bug likely only exists under Windows with configure/make builds.
Link to ticket https://sourceforge.net/p/codeblocks/tickets/1498/
See also https://github.com/msys2/MINGW-packages/issues/20922 there might already be a ticket for this issue
Patch
Code
--- a/src/src/Makefile.am	(revision 13539)
+++ b/src/src/Makefile.am (working copy)
@@ -75,7 +75,7 @@
 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 \

Tim S.
« Last Edit: August 13, 2024, 06:40:06 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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2802
Re: Bugs found in MSys2 MINGW packages
« Reply #1 on: August 13, 2024, 05:33:07 am »
It looks to me that the second patch is replacing the exact text that it's taking out.
Code
-	$(WINDRES) $(WX_CXXFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@
+ $(WINDRES) $(WX_CPPFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7666
    • My Best Post
Re: Bugs found in MSys2 MINGW packages
« Reply #2 on: August 13, 2024, 01:38:33 pm »
It looks to me that the second patch is replacing the exact text that it's taking out.
Code
-	$(WINDRES) $(WX_CXXFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@
+ $(WINDRES) $(WX_CPPFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@

WX_CPPFLAGS is not WX_CXXFLAGS
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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2802
Re: Bugs found in MSys2 MINGW packages
« Reply #3 on: August 13, 2024, 08:42:44 pm »
It looks to me that the second patch is replacing the exact text that it's taking out.
Code
-	$(WINDRES) $(WX_CXXFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@
+ $(WINDRES) $(WX_CPPFLAGS) -DcbDPI_AWARE_ON --include-dir $(top_srcdir)/src $< $@

WX_CPPFLAGS is not WX_CXXFLAGS

Thanks, I need better eyes (or brain).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7666
    • My Best Post
Re: Bugs found in MSys2 MINGW packages
« Reply #4 on: August 24, 2024, 08:56:35 pm »
Thanks, I need better eyes (or brain).

Since I just found out I made the same type of mistake on the CB sf.net ticket, I understand completely in my case it was likely a brain mistake.
It is bad getting old; but, the alternative is not better.

Tim S.
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