Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

build bot in the github, I see one nice project

<< < (14/26) > >>

stahta01:
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.

ollydbg:

--- Quote from: stahta01 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.

--- End quote ---

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?

stahta01:

--- Quote from: ollydbg on September 25, 2024, 11:47:12 am ---
--- Quote from: stahta01 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.

--- End quote ---

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?

--- End quote ---

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.

stahta01:
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
--

--- End code ---

ollydbg:
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

--- End code ---

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

--- End code ---

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

--- End code ---

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.







Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version