Developer forums (C::B DEVELOPMENT STRICTLY!) > Contributions to C::B

SpellChecker_wx31 cbp bug ?

<< < (2/3) > >>

ollydbg:
I just testing building SpellChecker wx3.1.x under C::B(rev11488), and here is the log(see attachment file):


--- Code: ----------------- Build: hunspell in SpellChecker wx3.1.x (compiler: GNU GCC Compiler)---------------

g++.exe -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -std=gnu++11 -g -pipe -mthreads -fmessage-length=0 -fexceptions -DHUNSPELL_STATIC -DTEST -Iwxspellchecker\include -IE:\wxWidgets-3.1.1-rc\include -IE:\wxWidgets-3.1.1-rc\lib\gcc_dll\msw -Ihunspell\src\hunspell -Ihunspell\ -c D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\SpellChecker\hunspell\src\hunspell\affentry.cxx -o ..\..\..\.objs31\plugins\contrib\SpellChecker\hunspell\hunspell\src\hunspell\affentry.o

--- End code ---

You see, the path is

--- Code: ----IE:\wxWidgets-3.1.1-rc\lib\gcc_dll\msw
--- End code ---
And you can see the "u" is missing compared with the build log I build SpellChecker wx3.1.x under C::B(rev11210).

Maybe, this commit cause the difference:

--- Code: ---Revision: 1ce96228a102fb0e2acc587d1984ee2a3039ac59
Author: fuscated <fuscated@2a5c6006-c6dd-42ca-98ab-0921f2732cef>
Date: 2018/9/12 6:38:32
Message:
* compiler: Clear target specific variables from the MacroManager on every recalculation (ticket #582, thanks bluehazzard)

> The problem with the old version is that if a certain variable is defined
  only in one target (A) and not in the others. If the target A is built
  first the variable will be stored in the marco manager and then the
  variable will be available for the other targets.
> This is probably incorrect and unwanted. I'm sure we'll break someones
  build, but probably this hopefully would find an error in their setup.
> To reproduce the problem try the following:
  1. Create a project with 3 targets (A, B, C).
  2. Add them to a virtual target. Beware of order.
  3. Add the same variable to targets A and B. Make sure target B doesn't
     define the variable
  4. Add a define like MYVAR=$(VAR) to the project options.
  5. Rebuild the virtual target.
  6. Inspect the build log. You should see that for target B there is
     something like -DMYVAR= so the $(VAR) should be expanded to empty
     string.
> Note: This is surely not the most efficient solution. But the marco
        manager needs a revision anyway to improve build performance.
> Note: Build regressions due to inefficiencies are most visible in clean
        builds.

git-svn-id: https://svn.code.sf.net/p/codeblocks/code/trunk@11465 2a5c6006-c6dd-42ca-98ab-0921f2732cef



--- End code ---

Miguel Gimenez:
The wxSpellChecker target needed WX_SUFFIX to be defined in order to find the wx/setup.h when compiling (not related to linking)
 
I think you are right, that commit broke the build of the target because the project's configuration was flawed beforehand.

EDIT: mortenmcfly fixed the CBP some minutes ago and closed ticket 744 again.

gd_on:
Better with svn 11494.
Nevertheless, as mentioned by ollydbg, there is still an incorrect include for the target hunspell :

--- Code: ----IC:\wxWidgets-3.1.1\lib\gcc_dll\msw
--- End code ---
which does not exist.
It should be -IC:\wxWidgets-3.1.1\lib\gcc_dll\mswu. Other targets have the right include.
If it works, it's probably because this include folder is not necessary.
gd_on

ollydbg:

--- Quote from: gd_on on October 04, 2018, 12:35:42 pm ---...
If it works, it's probably because this include folder is not necessary.

--- End quote ---

Hi, gd_on, thanks for the test.
I'm agree with you, here is patch which I remove the unnecessary compiler search paths from the first build target, can you give a try? It works fine here.

--- Code: ----------------- Build: hunspell in SpellChecker wx3.1.x (compiler: GNU GCC Compiler)---------------

g++.exe -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -std=gnu++11 -g -pipe -mthreads -fmessage-length=0 -fexceptions -DHUNSPELL_STATIC -DTEST -Ihunspell\src\hunspell -Ihunspell\ -c D:\code\cb\cb_sf_git\clean-trunk-for-commit\src\plugins\contrib\SpellChecker\hunspell\src\hunspell\affentry.cxx -o ..\..\..\.objs31\plugins\contrib\SpellChecker\hunspell\hunspell\src\hunspell\affentry.o
...

--- End code ---
BTW: some macro definition like "__WXMSW__" is defined in the project level, and in-fact, they are not needed here to build the hunspell target. But my patch doesn't remove those macro definitions.


--- Code: --- src/plugins/contrib/SpellChecker/SpellChecker_wx31.cbp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/plugins/contrib/SpellChecker/SpellChecker_wx31.cbp b/src/plugins/contrib/SpellChecker/SpellChecker_wx31.cbp
index f449ffde..8c34f248 100644
--- a/src/plugins/contrib/SpellChecker/SpellChecker_wx31.cbp
+++ b/src/plugins/contrib/SpellChecker/SpellChecker_wx31.cbp
@@ -21,9 +21,6 @@
  <Add option="-fmessage-length=0" />
  <Add option="-fexceptions" />
  <Add option="-DHUNSPELL_STATIC" />
- <Add directory="wxspellchecker/include" />
- <Add directory="$(#WX31.include)" />
- <Add directory="$(#WX31.lib)/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
  <Add directory="hunspell/src/hunspell" />
  <Add directory="hunspell/" />
  </Compiler>

--- End code ---


--- Quote from: Miguel Gimenez on October 04, 2018, 11:41:36 am ---The wxSpellChecker target needed WX_SUFFIX to be defined in order to find the wx/setup.h when compiling (not related to linking)
 
I think you are right, that commit broke the build of the target because the project's configuration was flawed beforehand.

EDIT: mortenmcfly fixed the CBP some minutes ago and closed ticket 744 again.

--- End quote ---
Yes, I agree with you. wxSpellChecker is the second build targets which does need wx header files. OBF's commit rev11465 just clear all the previous targets custom variables' value when building a new targets, so all the cached values are cleaned.
I'm going to commit the above patch to make things more clean.

ollydbg:
A patch which further clean up the Windows cbps, I remove the unnecessary wx related compiler and linker search options, any comments? I only test the 32bit wx31 build.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version