Author Topic: CodeBlocks build on RHEL 5.5  (Read 16953 times)

Offline screamingindigital

  • Multiple posting newcomer
  • *
  • Posts: 14
CodeBlocks build on RHEL 5.5
« on: December 28, 2010, 05:22:19 pm »
I downloaded wxWidgets 2.8.11(GTK) and built the libraries successfully.

I then downloaded the CodeBlocks source(SVN-6285) and attempted to build, however it stops after about 15 minutes with the following error.  Before you ask, "Yes!", I did follow the build directions, however I have it as shared libraries.  The Wiki shows to build with static libs.  Is this a requirement?

Here is the error I receive during the build.

 g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT HexEditPanel.lo -MD -MP -MF .deps/HexEditPanel.Tpo -c HexEditPanel.cpp  -fPIC -DPIC -o .libs/HexEditPanel.o
HexEditPanel.cpp: In member function 'void HexEditPanel::OnDrawAreaKeyDown(wxKeyEvent&)':
HexEditPanel.cpp:1031: error: 'class wxKeyEvent' has no member named 'GetUnicodeKey'
make[4]: *** [HexEditPanel.lo] Error 1
make[4]: Leaving directory `/mnt/2/packages/codeblocks-10.05svn6285/src/plugins/contrib/HexEditor'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/2/packages/codeblocks-10.05svn6285/src/plugins/contrib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/2/packages/codeblocks-10.05svn6285/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/2/packages/codeblocks-10.05svn6285/src'
make: *** [all-recursive] Error 1


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: CodeBlocks build on RHEL 5.5
« Reply #1 on: December 28, 2010, 06:31:43 pm »
What is the result of "wx-config --list"?
Do you have an unicode version of wxGTK?
C::B can't be build with an ansi version of wxGTK.
(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 screamingindigital

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: CodeBlocks build on RHEL 5.5
« Reply #2 on: December 29, 2010, 06:04:23 pm »
Doh!

Sorry about my dumb post!   :?

wx-config --list returns...

    Default config is gtk2-ansi-release-2.8


Is "--enable-unicode" the only configure option I need to add to create the necessary libraries?


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: CodeBlocks build on RHEL 5.5
« Reply #3 on: December 29, 2010, 08:13:49 pm »
Why don't you use binary packages for wxGTK?
(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 screamingindigital

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: CodeBlocks build on RHEL 5.5
« Reply #4 on: December 30, 2010, 03:25:46 pm »
I actually have Oracle's version of RHEL 5.5 called "Unbreakable Linux", which has a lot of things "stripped" from the normal distribution.  Also the repositories are limited.  I am sure a binary package for Redhat 5.5 would work, but I would rather recompile.  I have compiled wxGTK before.

I will try it again with unicode support enabled.

FYI, I was using Fedora Core 10 for everything, including Oracle, but I have wanted to try their "Unbreakable Linux".

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: CodeBlocks build on RHEL 5.5
« Reply #5 on: December 30, 2010, 04:28:28 pm »
Another option is to find srpms (source packages) for RHEL and build binary packages...
(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 screamingindigital

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: CodeBlocks build on RHEL 5.5
« Reply #6 on: December 30, 2010, 04:33:06 pm »
I rebuilt wxGTK with unicode and XRC support.  I then rebuilt codeblocks successfully, however, it crashes when I click "File-Open".  I know the preferred method on the Wiki is to use static libs, but that should not matter.  I ran "ldd" on the codeblocks executable and nothing was reported missing.

I have attached the dump file written from the crash.

FYI, many of the libraries are reported more than once because of the symbolic links.

<stack>
<frame level="0"/>
<frame level="1" function="strncmp" offset="0000003a"/>
<frame level="2" function="__xmlParserInputBufferCreateFilename" offset="00000129"/>
<frame level="3" function="xmlNewTextReaderFilename" offset="00000025"/>
<frame level="4"/>
<frame level="5"/>
<frame level="6" function="gnome_vfs_mime_get_value" offset="00000028"/>
<frame level="7" function="gnome_vfs_mime_get_icon" offset="0000001c"/>
<frame level="8" function="gnome_icon_lookup" offset="000002d4"/>
<frame level="9"/>
<frame level="10"/>
<frame level="11"/>
<frame level="12"/>
<frame level="13" function="g_main_context_dispatch" offset="000001b4"/>
<frame level="14"/>
<frame level="15" function="g_main_loop_run" offset="000001ca"/>
<frame level="16" function="gtk_main" offset="000000a3"/>
<frame level="17" function="wxEventLoop::Run()" offset="0000006d"/>
<frame level="18" function="wxDialog::ShowModal()" offset="000000d1"/>
<frame level="19" function="MainFrame::DoOnFileOpen(bool)" offset="00000000" file="/mnt/2/packages/codeblocks-10.05svn6285/src/src/main.cpp" line="2477"/>
<frame level="20" function="wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)" offset="0000007f"/>
<frame level="21" function="wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)" offset="0000009f"/>
<frame level="22" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="000000b9"/>
<frame level="23" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="24" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="25" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="26" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="27" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="28" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="29" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="30" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="31" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="32" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="33" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="34" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="35" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="36" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="37" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="38" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="39" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="40" function="wxEvtHandler::ProcessEvent(wxEvent&)" offset="00000050"/>
<frame level="41"/>
<frame level="42" function="g_closure_invoke" offset="0000010a"/>
<frame level="43"/>
<frame level="44" function="g_signal_emit_valist" offset="00000858"/>
<frame level="45" function="g_signal_emit" offset="00000083"/>
<frame level="46" function="gtk_widget_activate" offset="0000006a"/>
<frame level="47" function="gtk_menu_shell_activate_item" offset="00000100"/>
<frame level="48"/>
<frame level="49"/>
<frame level="50" function="g_closure_invoke" offset="0000010a"/>
<frame level="51"/>
<frame level="52" function="g_signal_emit_valist" offset="00000626"/>
<frame level="53" function="g_signal_emit" offset="00000083"/>
<frame level="54"/>
<frame level="55" function="gtk_propagate_event" offset="000000fd"/>
<frame level="56" function="gtk_main_do_event" offset="00000321"/>
<frame level="57"/>
<frame level="58" function="g_main_context_dispatch" offset="000001b4"/>
<frame level="59"/>
<frame level="60" function="g_main_loop_run" offset="000001ca"/>
<frame level="61" function="gtk_main" offset="000000a3"/>
<frame level="62" function="wxEventLoop::Run()" offset="0000006d"/>
<frame level="63" function="wxAppBase::MainLoop()" offset="0000004b"/>
</stack>

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: CodeBlocks build on RHEL 5.5
« Reply #7 on: December 30, 2010, 05:23:53 pm »
Something is wrong with your wxGTK, does the wxGTK samples work?
(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 screamingindigital

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: CodeBlocks build on RHEL 5.5
« Reply #8 on: December 30, 2010, 05:38:40 pm »
Correction to previous post.  I meant "monolithic" instead of "static".  I did not build monolithic.

Offline screamingindigital

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: CodeBlocks build on RHEL 5.5
« Reply #9 on: December 30, 2010, 05:42:03 pm »
No problem on the samples.  I built everything in "samples" and tested 10 of them.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: CodeBlocks build on RHEL 5.5
« Reply #10 on: December 30, 2010, 06:42:58 pm »
I copy the ./configure line, I use on debian, if I build wxWidgets myself (it's sometimes necessary, for debugging purposes, even if this line is not for debugging, it was to compile wx2.8 from svn).
Code
../configure --prefix=/home/jens/wx-tmp --with-zlib=sys --disable-reserved-virtual --with-gtk --enable-mediactrl --enable-sound --with-sdl --enable-display --enable-geometry --enable-graphics_ctx --with-libtiff=sys --with-libjpeg=sys --with-libpng=sys --enable-unicode --with-opengl --disable-stl --enable-aui --disable-debug

Monolithic is useful on windows, but normally not needed on linux (if you use wx-config).

Offline screamingindigital

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: CodeBlocks build on RHEL 5.5
« Reply #11 on: December 30, 2010, 08:22:46 pm »
Obfuscated( :P) & Jens,

Thank you for your replies, but I tried it again with Jens' configure options, and I still get a segmentation fault when I click "File-Open".  Most of the other options seem to work okay.  After I ran "make install"(as root), I launched "codeblocks" from the command line to see if there was any output.  I have listed it below.

I have four build versions of wxGTK, and I have tested all of them with the samples.  I do not have any problems.  "Codeblocks" compiles okay, but this runtime error occurs.  I do not believe it is a fault of the code or the wxGTK libraries.

I must be retarded.  I know you suggested getting RHEL 5.5 binaries, but I cannot find any.

I am going to look in the mirror, shout "Schweinhundt!", take my Computer Science degree from the wall, wipe my dog's rear with it, and use it for target practice!  :x

FYI, the latest open source QT will not compile either, because it requires CLIBCXX_3.4.9 for qpatch.

[root@icedearth bin]# ./codeblocks &
[1] 2778
[root@icedearth bin]# Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading toolbar...
ClassWizard: loaded
Autosave: loaded
FilesExtensionHandler: loaded
ToDoList: loaded
AStylePlugin: loaded
ProjectsImporter: loaded
CodeCompletion: loaded
Debugger: loaded
ScriptedWizard: loaded
OpenFilesList: loaded
Compiler: loaded
Class wizard plugin activated
Autosave plugin activated
Files extension handler plugin activated
Todo List plugin activated
Source code formatter (AStyle) plugin activated
Foreign projects importer plugin activated
Code completion plugin activated
Debugger plugin activated
Project wizard added for 'Empty project'
Project wizard added for 'Console application'
Project wizard added for 'D application'
Project wizard added for 'FLTK project'
Project wizard added for 'GLFW project'
Project wizard added for 'GLUT project'
Project wizard added for 'GTK+ project'
Project wizard added for 'Irrlicht project'
Project wizard added for 'Lightfeather project'
Project wizard added for 'OpenGL project'
Project wizard added for 'Ogre project'
Project wizard added for 'Code::Blocks plugin'
Project wizard added for 'QT4 project'
Project wizard added for 'SDL project'
Project wizard added for 'SFML project'
Project wizard added for 'Static library'
Project wizard added for 'Shared library'
Project wizard added for 'wxWidgets project'
Build-target wizard added for 'Console'
Build-target wizard added for 'Static library'
Build-target wizard added for 'wxWidgets'
Project wizard added for 'ARM Project'
Project wizard added for 'AVR Project'
Project wizard added for 'TriCore Project'
Project wizard added for 'PowerPC Project'
File(s) wizard added for 'Empty file'
File(s) wizard added for 'C/C++ source'
File(s) wizard added for 'C/C++ header'
Scripted wizard plugin activated
Open files list plugin activated
Added compiler "GNU GCC Compiler"
Parsing stage done (0 total parsed files, 0 tokens in 0 minute(s), 0.0 seconds).
Updating class browser...
Class browser updated.
Added compiler "Intel C/C++ Compiler"
Added compiler "SDCC Compiler"
Added compiler "Tiny C Compiler"
Added compiler "GDC D Compiler"
Added compiler "Digital Mars D Compiler"
Added compiler "GNU ARM GCC Compiler"
Added compiler "GNU AVR GCC Compiler"
Added compiler "GNU GCC Compiler for PowerPC"
Added compiler "GNU GCC Compiler for TriCore"
Compiler plugin activated
Initializing plugins...

[1]+  Segmentation fault      ./codeblocks


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: CodeBlocks build on RHEL 5.5
« Reply #12 on: December 30, 2010, 09:40:53 pm »
Are you sure that C::B is using the wxGTK it has been built with?
If I were you, I'll remove all wxGTK I don't need and recompile C::B again...
(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 screamingindigital

  • Multiple posting newcomer
  • *
  • Posts: 14
Good news and bad news
« Reply #13 on: December 31, 2010, 06:09:10 am »
I removed all existing builds for wxWidgets & Codeblocks and started over, but the problem still existed.

I launched Codeblocks through the shell and passed a filename(using "--file=").  It launched and loaded the file.

However, if I try to use "File-Save File As" or "File Open", it will crash.  The log files show lines 2567 and 2477 in "main.cpp".  From what I can decipher from the code and the comments, this is the point where these dialog boxes are called.

So, I thought I should try one of the wxWidgets samples that opens a file.  I used the "docview" sample, and it worked fine.

I then decided to just start and create a new sample project.  I tried three separate projects.  They were created, compiled, and ran without issues.

This could be a total "shot in the dark", but looking at the "main.cpp" file, the tags in "default.conf" are accessed using an xpath style.  Does wxWidgets have some sort of XML api to read, parse, and return values from this file, or are you using something unrelated to wxWidgets?  I do not know enough about wxWidgets to determine this.  Since the "docview" sample worked okay, could there be something causing a problem to the values passed to the dialog box for open/save that are read from the "default.conf" file that causes it to "barf"?

Is there any way to get these values parsed, saved, and passed to methods written to the terminal or a file?

Thanks again for your assistance.

If this becomes too much of a headache, I may be forced to go back to Fedora x64.  I did not have any issues with that.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: CodeBlocks build on RHEL 5.5
« Reply #14 on: December 31, 2010, 08:56:54 am »
Hm, strange... you would have to debug it yourself :(

The easiest way is to build cb from cb and put some breakpoints here and there to see where and why it crashes.
(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!]