User forums > Help

SVN 12550 does not compile

<< < (3/7) > >>

ollydbg:

--- Quote from: Miguel Gimenez on December 04, 2021, 10:30:39 am ---Speed is important, but even more important is coherency. I also think CodeBlocks_wx31_64.cbp should get the same changes of r11401.

Can you do it?

--- End quote ---

Yes, I can do it. I will do a build time test before the change.

For CodeBlocks_wx31_64.cbp, I can add the PCH feature.
But we will have to add the PCH feature to other plugins.

See Tim's reply here: Re: Enable the PCH when build C::B against wx3.x

Miguel Gimenez:
If you add PCH to the first plugin I can do it to the others (I have never used precompiled headers)

ollydbg:

--- Code: --- src/CodeBlocks_wx31_64.cbp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/CodeBlocks_wx31_64.cbp b/src/CodeBlocks_wx31_64.cbp
index 67329efc..3ef2b833 100644
--- a/src/CodeBlocks_wx31_64.cbp
+++ b/src/CodeBlocks_wx31_64.cbp
@@ -85,7 +85,6 @@
  <Option output="devel31_64/codeblocks" prefix_auto="1" extension_auto="1" />
  <Option working_dir="devel31_64" />
  <Option object_output=".objs31_64" />
- <Option external_deps="" />
  <Option type="3" />
  <Option compiler="gcc" />
  <Option parameters="--debug-log --no-dde --no-check-associations --multiple-instance --verbose -p debug" />
@@ -634,18 +633,19 @@
  </VirtualTargets>
  <Compiler>
  <Add option="-Wall" />
+ <Add option="-std=gnu++11" />
+ <Add option="-m64" />
  <Add option="$(#CB_RELEASE_TYPE)" />
  <Add option="-pipe" />
  <Add option="-mthreads" />
- <Add option="-m64" />
  <Add option="-fmessage-length=0" />
  <Add option="-fexceptions" />
- <Add option="-std=gnu++11" />
+ <Add option="-Winvalid-pch" />
  <Add option="-DHAVE_W32API_H" />
  <Add option="-D__WXMSW__" />
  <Add option="-DWXUSINGDLL" />
  <Add option="-DcbDEBUG" />
- <Add option="-DNOPCH" />
+ <Add option="-DCB_PRECOMP" />
  <Add option="-DwxUSE_UNICODE" />
  <Add option="-D_WIN64" />
  <Add directory="$(#WX31_64.include)" />
@@ -658,6 +658,7 @@
  <Add directory="$(#WX31_64)/lib/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
  </ResourceCompiler>
  <Linker>
+ <Add option="-m64" />
  <Add library="wxmsw$(WX_VERSION)$(WX_SUFFIX)" />
  <Add directory="$(#WX31_64.lib)/gcc_dll$(WX_CFG)" />
  <Add directory="devel31_64" />
@@ -987,6 +988,7 @@
  <Option target="sdk" />
  </Unit>
  <Unit filename="include/sdk.h">
+ <Option compile="1" />
  <Option weight="1" />
  <Option target="src" />
  </Unit>
@@ -997,6 +999,7 @@
  <Option target="sdk" />
  </Unit>
  <Unit filename="include/sdk_precomp.h">
+ <Option compile="1" />
  <Option weight="0" />
  <Option target="sdk" />
  </Unit>
@@ -4262,8 +4265,6 @@
  <Option target="src" />
  </Unit>
  <Extensions>
- <code_completion />
- <envvars />
  <wxsmith version="1">
  <gui name="wxWidgets" src="" main="" init_handlers="necessary" language="CPP" />
  <resources>
@@ -4286,7 +4287,6 @@
  <wxDialog wxs="plugins/codecompletion/wxsmith/goto_function.wxs" src="plugins/codecompletion/gotofunctiondlg.cpp" hdr="plugins/codecompletion/gotofunctiondlg.h" fwddecl="1" i18n="1" name="GotoFunctionDlg" language="CPP" />
  </resources>
  </wxsmith>
- <debugger />
  </Extensions>
  </Project>
 </CodeBlocks_project_file>


--- End code ---

This is the patch/diff file I use to enable the PCH for the CodeBlocks_wx31_64.cbp, but I see some build warnings:


--- Code: ---Running target pre-build steps
.objs31_64\autorevision +wx +int +t .. include/autorevision.h
g++.exe -Wall -std=gnu++11 -m64 -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -IE:\code\wxWidgets-3.1.5\include -IE:\code\wxWidgets-3.1.5\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\code\cb\cb_sf_git\cccrash2019\src\include\sdk_precomp.h -o .objs31_64\include\sdk_precomp.h.gch
g++.exe -Wall -std=gnu++11 -m64 -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -IE:\code\wxWidgets-3.1.5\include -IE:\code\wxWidgets-3.1.5\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\code\cb\cb_sf_git\cccrash2019\src\sdk\configmanager-revision.cpp -o .objs31_64\sdk\configmanager-revision.o
g++.exe -Wall -std=gnu++11 -m64 -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -IE:\code\wxWidgets-3.1.5\include -IE:\code\wxWidgets-3.1.5\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\code\cb\cb_sf_git\cccrash2019\src\sdk\annoyingdialog.cpp -o .objs31_64\sdk\annoyingdialog.o
D:\code\cb\cb_sf_git\cccrash2019\src\sdk\configmanager-revision.cpp:15:25: warning: .objs31_64\include/sdk_precomp.h.gch: had text segment at different address [-Winvalid-pch]
   15 | #include "sdk_precomp.h"
      |                         ^


--- End code ---

I'm not sure what does this error message come from. I still need some time to find a solution.

ollydbg:
Maybe those links are related:

91440 Precompiled headers regression in 9.2

ASLR is now enabled for GCC binaries and it breaks PCH  Issue #5719 msys2/MINGW-packages

I'm currently using a special GCC (https://github.com/Guyutongxue/mingw-release)

Any one using the msys2's native mingw-w64 gcc could try my patch file of CodeBlocks_wx31_64.cbp and see whether they fix this isisue or not, thanks.

AndrewCot:
I am using Windows 10 (21H2  19044.1387 , latest and patched as of 3-Dec-2021) and MSYS2 x64 using the latest (GCC 11.2.0) and WxWidget 3.1.5 (built with same MSYS2 GCC 11.2.0). I do not get the error/warning.

The command I use to build C::B (via a batch file that configures the parameters) is:
RUNNING: ""C:\Program Files\CodeBlocks\codeblocks.exe" --no-dde --multiple-instance --verbose --log-to-file --no-batch-window-close --target=All --build "D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\CodeBlocks_wx31_64 - no Fortran.workspace""

The workspace has the "plugins/contrib/FortranProject/FortranProject_cbsvn_wx31_64.cbp" project removed as I used to get the src from GIT and as such did not include the fortran src.

Attached is the full build log.

The relevant lines from the log are (I have added extra lines to make it easier to read):


--- Code: ----------------- Build: sdk in Code::Blocks wx3.1.x (64 bit) (compiler: GNU GCC Compiler)---------------

Running target pre-build steps
.objs31_64\autorevision +wx +int +t .. include/autorevision.h

g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\include\sdk_precomp.h -o .objs31_64\include\sdk_precomp.h.gch

g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\sdk\configmanager-revision.cpp -o .objs31_64\sdk\configmanager-revision.o

g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\sdk\annoyingdialog.cpp -o .objs31_64\sdk\annoyingdialog.o

g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\sdk\autodetectcompilers.cpp -o .objs31_64\sdk\autodetectcompilers.o

g++.exe -Wall -std=gnu++11 -m64 -g -O0 -ggdb -pipe -mthreads -fmessage-length=0 -fexceptions -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -Winvalid-pch -DCB_PRECOMP -DwxUSE_UNICODE -D_WIN64 -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI -iquote.objs31_64\include -I.objs31_64\include -I. -ID:\Andrew_Development\wxWidgets-3.1.5\include -ID:\Andrew_Development\wxWidgets-3.1.5\lib\gcc_dll""\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\include -Isdk\mozilla_chardet\include -Isdk\mozilla_chardet\include\mfbt -Isdk\mozilla_chardet\include\nsprpub\pr\include -Isdk\mozilla_chardet\include\xpcom -Isdk\mozilla_chardet\include\xpcom\base -Isdk\mozilla_chardet\include\xpcom\glue -Isdk\scripting\bindings -c D:\Andrew_Development\WorkingOnThese\AC-WindowsInstaller\src\sdk\base64.cpp -o .objs31_64\sdk\base64.o


--- End code ---

GCC version info:
C:\msys64\mingw64\bin\gcc.exe --version
gcc (Rev2, Built by MSYS2 project) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version