Author Topic: build codeblocks with wxGTK-devel-2.9.1 --- error!  (Read 11471 times)

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
build codeblocks with wxGTK-devel-2.9.1 --- error!
« on: January 11, 2011, 07:32:47 am »
Hi, I'm using Fedora 14 x86_64, and I want to built codeblocks based on wxWidgets-2.9.1.

So, at first I remove Fedora official "wxGTK-devel-2.8.11-3", "wxBase-2.8.11.3", and other 2.8.11 wx packages.

I download official wxWidgets-2.9.1, and just rename it to "wxGTK-2.9.1" and repackaged to tar.bz2 file.
the attached "wxGTK.spec.7z" is the file for building wxGTK-2.9.1.

After it finished, I installed "wxGTK-devel-2.9.1" and "wxBase-devel-2.9.1", then I start to build the codeblocks.
The attached "codeblocks(svn6912).7z" is the necessary file for building.

BTW, the "codeblocks-InputMethodFix.patch" is for fixing the keyboard backspace problem when open Chinese input program to type Chinese characters in the codeblocks, for example when make comments on the code.
This patch fixed this backspace issue. But no use on switching status, I mean switch English <-> Chinese.
Normally, when you open Chinese input program to input Chinese characters and want to input English words, you just need to press 'SHIFT' key, then you can freely input English. If you press 'SHIFT' key again, you will can input Chinese again.
This patch still can not work for switching.  :(
So, if someone can kindly to help to strengthen it, will be great!

After I installed wxGTK-2.9.1, I start to build codeblocks, but I got these failed errors:
--------------------------------
....
....
make[3]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/sdk/wxscintilla'
Making all in wxpropgrid
make[3]: Entering directory `/home/David/rpmbuild/BUILD/codeblocks/src/sdk/wxpropgrid'
/bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-static-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -I../../../src/sdk/wxpropgrid/include -DWXMAKINGLIB_PROPGRID -DwxPG_USE_WXMODULE=0 -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c -o advprops.lo `test -f './src/advprops.cpp' || echo './'`./src/advprops.cpp
/bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-static-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -I../../../src/sdk/wxpropgrid/include -DWXMAKINGLIB_PROPGRID -DwxPG_USE_WXMODULE=0 -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c -o editors.lo `test -f './src/editors.cpp' || echo './'`./src/editors.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-static-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -I../../../src/sdk/wxpropgrid/include -DWXMAKINGLIB_PROPGRID -DwxPG_USE_WXMODULE=0 -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c ./src/editors.cpp  -fPIC -DPIC -o .libs/editors.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-static-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -pthread -I../../../src/sdk/wxpropgrid/include -DWXMAKINGLIB_PROPGRID -DwxPG_USE_WXMODULE=0 -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c ./src/advprops.cpp  -fPIC -DPIC -o .libs/advprops.o
In file included from ./src/editors.cpp:61:0:
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:134:0: warning: "wxPGVariant_EmptyString" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:113:0: note: this is the location of the previous definition
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:135:0: warning: "wxPGVariant_Zero" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:114:0: note: this is the location of the previous definition
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:136:0: warning: "wxPGVariant_MinusOne" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:115:0: note: this is the location of the previous definition
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:137:0: warning: "wxPGVariant_True" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:116:0: note: this is the location of the previous definition
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:138:0: warning: "wxPGVariant_False" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:117:0: note: this is the location of the previous definition
In file included from ./src/editors.cpp:61:0:
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:18:22: error: aggregate 'WXDLLIMPEXP_PG wxArrayEditorDialog' has incomplete type and cannot be defined
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:32:22: error: variable 'WXDLLIMPEXP_PG wxPGGlobalVarsClass' has initializer but incomplete type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:32:22: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:34:1: error: expected primary-expression before 'public'
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:34:1: error: expected '}' before 'public'
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:34:1: error: expected ',' or ';' before 'public'
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:37:27: error: expected constructor, destructor, or type conversion before ';' token
In file included from ./src/editors.cpp:61:0:
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:61:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:62:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:63:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:64:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:65:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:66:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:67:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:69:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:72:5: error: 'wxPGVariantDataClassInfo' does not name a type
In file included from ./src/editors.cpp:61:0:
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:102:36: error: non-member function 'int HasExtraStyle(int)' cannot have cv-qualifier
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:107:1: error: expected declaration before '}' token
make[3]: *** [editors.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from ./src/advprops.cpp:56:0:
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:134:0: warning: "wxPGVariant_EmptyString" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:113:0: note: this is the location of the previous definition
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:135:0: warning: "wxPGVariant_Zero" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:114:0: note: this is the location of the previous definition
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:136:0: warning: "wxPGVariant_MinusOne" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:115:0: note: this is the location of the previous definition
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:137:0: warning: "wxPGVariant_True" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:116:0: note: this is the location of the previous definition
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:138:0: warning: "wxPGVariant_False" redefined
/usr/include/wx-2.9/wx/propgrid/propgrid.h:117:0: note: this is the location of the previous definition
In file included from ./src/advprops.cpp:56:0:
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:18:22: error: aggregate 'WXDLLIMPEXP_PG wxArrayEditorDialog' has incomplete type and cannot be defined
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:32:22: error: variable 'WXDLLIMPEXP_PG wxPGGlobalVarsClass' has initializer but incomplete type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:32:22: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:34:1: error: expected primary-expression before 'public'
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:34:1: error: expected '}' before 'public'
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:34:1: error: expected ',' or ';' before 'public'
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:37:27: error: expected constructor, destructor, or type conversion before ';' token
In file included from ./src/advprops.cpp:56:0:
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:61:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:62:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:63:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:64:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:65:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:66:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:67:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:69:5: error: 'wxPGVariantDataClassInfo' does not name a type
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:72:5: error: 'wxPGVariantDataClassInfo' does not name a type
In file included from ./src/advprops.cpp:56:0:
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:102:36: error: non-member function 'int HasExtraStyle(int)' cannot have cv-qualifier
../../../src/sdk/wxpropgrid/include/wx/propgrid/propdev.h:107:1: error: expected declaration before '}' token
make[3]: *** [advprops.lo] Error 1
make[3]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/sdk/wxpropgrid'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.g2mIQx (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.g2mIQx (%build)
--------------------------------

what's happened?
I noticed that codeblocks supported for build with wx > 2.8.10 from svn 6907.
http://svn.berlios.de/wsvn/codeblocks/trunk/?op=revision&rev=6907&peg=6907

could anyone kindly help me?


Best regards.
David.
« Last Edit: January 11, 2011, 07:37:14 am by wangdong1226 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #1 on: January 11, 2011, 08:05:20 am »
C::B's source is not wx2.9 compatible.
The main problem is wxPropgrid, which is included in wx2.9 and C::B, so you get the conflicts you see.

There exist patches to build C::B with wx2.9 (search the forum), but C::B always crashes on exit (probably due to changed behaviour in event-handling/deleting event-handlers).
I noticed that codeblocks supported for build with wx > 2.8.10 from svn 6907.
http://svn.berlios.de/wsvn/codeblocks/trunk/?op=revision&rev=6907&peg=6907
The text in the commit is not correct, the error it fixes is most likely a non-pch build-fix.
And it was never meant as C::B is now wx2.9 compatible.
It only says "fix a possible build issue on  wx > wx2.8.10" (correct would be wx2.8 > wx2.8.10 because the error it fixes occured on wx2.8.11).

Nevertheless "fix a possible build issue" does not mean fix all build issues or is fully working.

Note:
C::B can be build with wx2.9 after patching it (search the forum as mentioned above), but it does not work correctly (crash on exit and maybe more), so it is far from being compatible.

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #2 on: January 11, 2011, 08:18:29 am »
Thank you very much Jens!

OK, I'll go back to wxGTK-2.8.11.

could you please be kindly to consider the codeblocks-InputMethodFix.patch?

this issue is still bothering me.  :(

I've described the details:
----
the "codeblocks-InputMethodFix.patch" is for fixing the keyboard backspace problem when open Chinese input program to type Chinese characters in the codeblocks, for example when make comments on the code.
This patch fixed this backspace issue. But no use on switching status, I mean switch English <-> Chinese.
Normally, when you open Chinese input program to input Chinese characters and want to input English words, you just need to press 'SHIFT' key, then you can freely input English. If you press 'SHIFT' key again, you will can input Chinese again.
This patch still can not work for switching.
----

Best regards.
David.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #3 on: January 11, 2011, 08:55:29 am »
I've described the details:
----
the "codeblocks-InputMethodFix.patch" is for fixing the keyboard backspace problem when open Chinese input program to type Chinese characters in the codeblocks, for example when make comments on the code.
This patch fixed this backspace issue. But no use on switching status, I mean switch English <-> Chinese.
Normally, when you open Chinese input program to input Chinese characters and want to input English words, you just need to press 'SHIFT' key, then you can freely input English. If you press 'SHIFT' key again, you will can input Chinese again.
This patch still can not work for switching.
----
Best regards.
David.

sorry I still get confused about your patch and your description. I'm a native Chinese speaker.

BTW: I think you should move the Chinese characters in your patch file. (because All the C::B devs use English for communication)
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 wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #4 on: January 11, 2011, 11:41:05 am »
sorry I still get confused about your patch and your description. I'm a native Chinese speaker.

BTW: I think you should move the Chinese characters in your patch file. (because All the C::B devs use English for communication)

Please view the attached pic01.png.7z and I've removed un-English words in the patch and submitting again.

I mean, every time when I've input Chinese words, I have to turn off input program (press 'Ctrl' + 'Space bar' keys) then I can input English.

How to let codeblocks knows that I've just pressed 'Shift' key (means that now I need to input another language in codeblocks), codeblocks automatically switch to another language (for example, switch from Chinese to English.) ? 

[attachment deleted by admin]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #5 on: January 11, 2011, 12:55:59 pm »
Ok, It works OK under Windows XP.
So, I guess your patch can fix the problem on your Linux system.
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 wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #6 on: January 12, 2011, 03:54:03 am »
Ok, It works OK under Windows XP.
So, I guess your patch can fix the problem on your Linux system.

NO, it can not works on Fedora 14 x86_64 system.

Could you please be kindly helping to test in Linux system and help to achieve the fixing patch?

Thank you very much.


Best regards.
David.
« Last Edit: January 12, 2011, 03:55:49 am by wangdong1226 »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #7 on: January 12, 2011, 03:55:42 am »
Ok, It works OK under Windows XP.
So, I guess your patch can fix the problem on your Linux system.

NO, it can not works on Fedora 14 x86_64 system.

Could you please be kindly to test in Linux and help me to achive the solved patch?

Thank you very much.

Best regards.
David.
sorry, I only use Windows XP...... Hope other Chinese guys who use Linux can try your patch.  :D
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 wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #8 on: January 12, 2011, 04:05:50 am »
Another thing that I want to know:

Does it really codeblocks will not improve the auto codecompletion for D language ?

for example, when I inputting "dou", then codeblocks automaticlly shows an rectangle frame which shows "double".

I don't think that codeblocks team has never considered about this kind of codecompletion for D.

I've asked in digitalmars.com forum as 'ollydbg' replied me last time here, feedback that it's better to ask codeblocks.

It's funny.

Personally thinking, if codeblocks can improve this will be better.
(if ask a "Language" to do this kind of codecompletion for a special IDE, frankly speaking, I think it's impossible.)
« Last Edit: January 12, 2011, 04:20:03 am by wangdong1226 »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: build codeblocks with wxGTK-devel-2.9.1 --- error!
« Reply #9 on: January 12, 2011, 05:47:08 am »
Another thing that I want to know:

Does it really codeblocks will not improve the auto codecompletion for D language ?

for example, when I inputting "dou", then codeblocks automaticlly shows an rectangle frame which shows "double".

I don't think that codeblocks team has never considered about this kind of codecompletion for D.

I've asked in digitalmars.com forum as 'ollydbg' replied me last time here, feedback that it's better to ask codeblocks.

It's funny.

Personally thinking, if codeblocks can improve this will be better.
(if ask a "Language" to do this kind of codecompletion for a special IDE, frankly speaking, I think it's impossible.)

I have never replied you at digitalmars.com. I have no touch with D language.

But from my point of view, Code::Blocks currently does not support parsing D language. the situation when the suggestion list will show "double" does not mean the CC can support parsing D language. In-fact, "double" is just a key-word, the kind of list the key-word is not enough for D language.

If you read the source code of CodeCompletion, you will notice that *no* parser exist for D language. The parser is only dedicated to C/C++.  If I can remember, you will find a CodeCompletion plugin fork for FORTRAN language, but this plugin was not officially supported.

But I'm not sure how hard/easy to parse the D language. (I guess it will be much easier than C/C++, but note that the c/c++ parser in CC is not quite good, it just use some heuristic/wild guess.)

Also, If you would like to implement some parser for D language, You can asked some question here, because loaden/blueshake/morten/me..... and other guys was quite familiar with the CC code.

Hope this answer helps.
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.