Author Topic: "codesnippets" error when built rpm package -- svn 7028 [ SOLVED ]  (Read 9793 times)

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
I've downloaded the latest svn 7028 version of CB.
And I started to build rpm packages, but I got errors on "codesnippets" area, here are the output log:

=======
.....
.....
g++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12    -I../../../../../src/include -I../../../../../src/sdk/wxscintilla/include -I../../../../../src/plugins/contrib/codesnippets -I../../../../../src/plugins/contrib/codesnippets/Search -I../../../../../src/plugins/contrib/codesnippets/editor -I../../../../../src/include/mozilla_chardet  -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 codesnippetsevent.o `test -f './../codesnippetsevent.cpp' || echo './'`./../codesnippetsevent.cpp
g++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12    -I../../../../../src/include -I../../../../../src/sdk/wxscintilla/include -I../../../../../src/plugins/contrib/codesnippets -I../../../../../src/plugins/contrib/codesnippets/Search -I../../../../../src/plugins/contrib/codesnippets/editor -I../../../../../src/include/mozilla_chardet  -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 codesnippetstreectrl.o `test -f './../codesnippetstreectrl.cpp' || echo './'`./../codesnippetstreectrl.cpp
./../codesnippetstreectrl.cpp: In constructor 'CodeSnippetsTreeCtrl::CodeSnippetsTreeCtrl(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int)':
./../codesnippetstreectrl.cpp:97:39: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note:                 wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp: In member function 'void CodeSnippetsTreeCtrl::EndInternalTreeItemDrag()':
./../codesnippetstreectrl.cpp:1073:23: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note:                 wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp:1074:21: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note:                 wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp: In member function 'void CodeSnippetsTreeCtrl::FinishExternalDrag()':
./../codesnippetstreectrl.cpp:1294:23: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note:                 wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp:1295:21: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note:                 wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp: In member function 'void CodeSnippetsTreeCtrl::OnEndTreeItemDrag(wxTreeEvent&)':
./../codesnippetstreectrl.cpp:1406:21: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note:                 wxTreeItemId::wxTreeItemId(void*)
make[5]: *** [codesnippetstreectrl.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib/codesnippets/resources'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib/codesnippets'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins'
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.4mxdSo (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.4mxdSo (%build)
[David@Ocean SPECS]$
=======

But the svn 7028 on WebSVN shows that:
CodeSnippets 1.3.120 2011/02/11
- Fix crash when double clicking previously opened snippet
- Copy fixes 5995 & 6000 from CB EditorManager to SEditormanager

Could anyone be kindly to help me? how to solve the problem?


David.
« Last Edit: March 01, 2011, 01:43:27 am by wangdong1226 »

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #1 on: February 26, 2011, 09:54:19 am »
If I downgrade to svn 7027, it can be built successfully.

My system is Fedora 14 (x86_64) with latest subcomponents installed (gcc, make, ...).


Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #2 on: February 26, 2011, 05:38:02 pm »
I do not get any errors. My results are clean.
Also, your statements numbers do not match mine.
Some of the lines you're getting errors on are blank lines for me.

It looks like you're using lib64. If you want to provide changes that would work with 64 bit Codeblocks and wxWidgets, I'll be glad to try and make the changes.

svn build  rev 7028 (2011-02-24 18:02:27)   gcc 4.4.3 Linux/unicode - 32 bit

Code: [Select]

-------------- Clean: Plugin-unix in CodeSnippets-unix ---------------

Cleaned "CodeSnippets-unix - Plugin-unix"

-------------- Clean: App-unix in CodeSnippets-unix ---------------

Cleaned "CodeSnippets-unix - App-unix"

-------------- Build: Plugin-unix in CodeSnippets-unix ---------------
<snip>
g++ -Wall -g -Ulinux -Uunix -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -fexceptions -Winvalid-pch -fPIC -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12    -DcbDEBUG -DCB_PRECOMP     -I../../../include -I../../../sdk/wxscintilla/include -I. -Ieditor -ISearch -I../../../include/mozilla_chardet -I/usr/include  -c /home/pecan/devel/trunk/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp -o ../../../.objs/plugins/contrib/codesnippets/plugin/codesnippetstreectrl.o

<snip>
Output size is 7.71 MB

-------------- Build: App-unix in CodeSnippets-unix ---------------
<snip>
g++ -Wall -g -Ulinux -Uunix -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -fexceptions -Winvalid-pch -fPIC -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12    -DcbDEBUG -DCB_PRECOMP     -I../../../include -I../../../sdk/wxscintilla/include -I. -Ieditor -ISearch -I../../../include/mozilla_chardet -I/usr/include  -c /home/pecan/devel/trunk/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp -o ../../../.objs/plugins/contrib/codesnippets/app/codesnippetstreectrl.o

Output size is 7.55 MB
Running project post-build steps
./update
  adding: manifest.xml (deflated 51%)
Process terminated with status 0 (1 minutes, 47 seconds)
0 errors, 0 warnings (1 minutes, 47 seconds)


« Last Edit: February 26, 2011, 06:11:34 pm by Pecan »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11939
    • Travis build status
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #3 on: February 26, 2011, 06:46:42 pm »
This looks like missing includes... probably a no-PCH issue
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #4 on: February 26, 2011, 07:06:36 pm »
CB_PRECOMP is set!
Anyway: if I compile without CB_PRECOMP and with NOPCH, it still compiles without problems on 64-bit debian.

I also set all defines and special parameters the same way, but it still compiles.

What version of wxWidgets do you use ( wx-config --version-full )?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6613
    • My Best Post
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #5 on: February 27, 2011, 01:11:24 am »
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)

Assuming the treebase.h is the same as mine; you have the WXWIN_COMPATIBILITY_2_4 set.
The building of Code::Blocks does NOT normally have WXWIN_COMPATIBILITY_2_4 set.
(No idea if it is failing because of wxWidgets or Code::Blocks source code error.)

From wxWidgets file treebase.h; so, wxWidgets issue lines 73 to 79
Quote
Code: [Select]
#if WXWIN_COMPATIBILITY_2_4
    // deprecated: only for compatibility, don't work on 64 bit archs
    wxTreeItemId(long item) { m_pItem = wxUIntToPtr(item); }
    operator long() const { return (long)wxPtrToUInt(m_pItem); }
#else // !WXWIN_COMPATIBILITY_2_4
    operator bool() const { return IsOk(); }
#endif // WXWIN_COMPATIBILITY_2_4/!WXWIN_COMPATIBILITY_2_4

Try building wxWidgets without using "--enable-compat24"; this assumes I guessed the correct cause of the problem.

Tim S.
« Last Edit: February 27, 2011, 03:29:01 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #6 on: February 27, 2011, 10:04:48 am »
CB_PRECOMP is set!
Anyway: if I compile without CB_PRECOMP and with NOPCH, it still compiles without problems on 64-bit debian.

I also set all defines and special parameters the same way, but it still compiles.

What version of wxWidgets do you use ( wx-config --version-full )?


my wxWidgets version:
 wx-config --version-full
 2.8.11.0

maybe my system's ( Fedora 14 X86_64 ) problem. But actually when I compiled svn 7027, it was succeeded.
Why?  :(

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #7 on: February 27, 2011, 10:09:15 am »
I do not get any errors. My results are clean.
Also, your statements numbers do not match mine.
Some of the lines you're getting errors on are blank lines for me.

It looks like you're using lib64. If you want to provide changes that would work with 64 bit Codeblocks and wxWidgets, I'll be glad to try and make the changes.

svn build  rev 7028 (2011-02-24 18:02:27)   gcc 4.4.3 Linux/unicode - 32 bit

Code: [Select]

-------------- Clean: Plugin-unix in CodeSnippets-unix ---------------

Cleaned "CodeSnippets-unix - Plugin-unix"

-------------- Clean: App-unix in CodeSnippets-unix ---------------

Cleaned "CodeSnippets-unix - App-unix"

-------------- Build: Plugin-unix in CodeSnippets-unix ---------------
<snip>
g++ -Wall -g -Ulinux -Uunix -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -fexceptions -Winvalid-pch -fPIC -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12    -DcbDEBUG -DCB_PRECOMP     -I../../../include -I../../../sdk/wxscintilla/include -I. -Ieditor -ISearch -I../../../include/mozilla_chardet -I/usr/include  -c /home/pecan/devel/trunk/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp -o ../../../.objs/plugins/contrib/codesnippets/plugin/codesnippetstreectrl.o

<snip>
Output size is 7.71 MB

-------------- Build: App-unix in CodeSnippets-unix ---------------
<snip>
g++ -Wall -g -Ulinux -Uunix -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread  -fexceptions -Winvalid-pch -fPIC -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12    -DcbDEBUG -DCB_PRECOMP     -I../../../include -I../../../sdk/wxscintilla/include -I. -Ieditor -ISearch -I../../../include/mozilla_chardet -I/usr/include  -c /home/pecan/devel/trunk/src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp -o ../../../.objs/plugins/contrib/codesnippets/app/codesnippetstreectrl.o

Output size is 7.55 MB
Running project post-build steps
./update
  adding: manifest.xml (deflated 51%)
Process terminated with status 0 (1 minutes, 47 seconds)
0 errors, 0 warnings (1 minutes, 47 seconds)



That's very kind of you, if you can do some tests or changes under lib64.
I've quarried my system about the wxGTK, I got these out puts:

 [David@Ocean ~]$ rpm -qa | grep wxGTK
wxGTK-gl-2.8.11-3.fc14.x86_64
wxGTK-2.8.11-3.fc14.i686
wxGTK-2.8.11-3.fc14.x86_64
wxGTK-devel-2.8.11-3.fc14.x86_64
wxGTK-media-2.8.11-3.fc14.x86_64
[David@Ocean ~]$ rpm -qa | grep wxBase
wxBase-2.8.11-3.fc14.x86_64
wxBase-2.8.11-3.fc14.i686

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #8 on: February 27, 2011, 02:58:09 pm »
... If you want to provide changes that would work with 64 bit Codeblocks and wxWidgets, I'll be glad to try and make the changes.

That's very kind of you, if you can do some tests or changes under lib64.
I've quarried my system about the wxGTK, I got these out puts:

 [David@Ocean ~]$ rpm -qa | grep wxGTK
wxGTK-gl-2.8.11-3.fc14.x86_64
wxGTK-2.8.11-3.fc14.i686
wxGTK-2.8.11-3.fc14.x86_64
wxGTK-devel-2.8.11-3.fc14.x86_64
wxGTK-media-2.8.11-3.fc14.x86_64
[David@Ocean ~]$ rpm -qa | grep wxBase
wxBase-2.8.11-3.fc14.x86_64
wxBase-2.8.11-3.fc14.i686


Please note: I said -- "If you want to provide changes...".

I do not have the time to test with 64-bit CB yet. But I'll make changes to CodeSnippets that provide a patch and are correctly debugged.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #9 on: February 27, 2011, 04:00:53 pm »
It's not a problem with 64-bit in general.
It's a problem with 64-bit libraries, that use deprecated functions (that are removed in wx2.9 by the way), because WXWIN_COMPATIBILITY_2_4 is defined.

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #10 on: February 28, 2011, 01:39:31 pm »
It's not a problem with 64-bit in general.
It's a problem with 64-bit libraries, that use deprecated functions (that are removed in wx2.9 by the way), because WXWIN_COMPATIBILITY_2_4 is defined.

Dear Jens,
I have to remove WXWIN_COMPATIBILITY_2_4 from my system also?  how to do it?

waiting for kindly feedback.

Best regards.
David.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6613
    • My Best Post
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #11 on: February 28, 2011, 03:23:45 pm »


Try building wxWidgets without using "--enable-compat24"; this assumes I guessed the correct cause of the problem.

Tim S.

Do the above to NOT enable WXWIN_COMPATIBILITY_2_4 during wxWidgets build.
Note: If you download a per built wxWidgets; please report the fact that WXWIN_COMPATIBILITY_2_4 and 64 bit build is NOT supported together to your source of pre-built library.

Tim S.
« Last Edit: February 28, 2011, 03:26:17 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline wangdong1226

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: "codesnippets" error when built rpm package -- svn 7028
« Reply #12 on: March 01, 2011, 01:42:48 am »


Try building wxWidgets without using "--enable-compat24"; this assumes I guessed the correct cause of the problem.

Tim S.

Do the above to NOT enable WXWIN_COMPATIBILITY_2_4 during wxWidgets build.
Note: If you download a per built wxWidgets; please report the fact that WXWIN_COMPATIBILITY_2_4 and 64 bit build is NOT supported together to your source of pre-built library.

Tim S.

Thank you very much Tim S.

According to your guide, I rebuilt the wxWidgets and then rebuilt the CB based on new built wxWidgets, successfully passed!  :)

Detail as follows:
1). install wxGTK src package;
2). in the SPECS subfolder of the rpmbuild folder, edit the wxGTK.spec file; Remove the "--enable-compat24 \" parameter of the "%configure" command;
3). then run rpmbuild command to build the wxGTK and wxBase and other files automaticlly;
4). install new built wxGTK & wxBase & wxGTK-devel & other built files (without install 'debuginfo rpm');
5). rebuilt the CodeBlocks svn 7031; sucessfully passed!