Author Topic: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5  (Read 39618 times)

Offline knue

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #30 on: July 27, 2005, 10:58:29 pm »
The Makefile.unix.wx2.6 does not work neither
Have you anupdated version?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #31 on: July 27, 2005, 11:15:51 pm »
Yiannis: Please updload the Makefile.unix.2.6 to the /downloads page on the website. When you're done, tell me so I can update the website.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #32 on: July 27, 2005, 11:19:16 pm »
The Makefile.unix.wx2.6 does not work neither
Have you anupdated version?

No, not now. I will try to attach one tomorrow.
If you 're in a hurry, just edit Makefile.unix. Change the wx lib's name, the LIB_WXSTC name and remove all references "-l$(LIB_WXXRC)".

Yiannis: Please updload the Makefile.unix.2.6 to the /downloads page on the website. When you're done, tell me so I can update the website.
No need Rick. We 'll release soon an update with all these minor issues solved.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #33 on: July 28, 2005, 12:02:55 am »
Yeaaah, everything compiles with your Makefile mandrav :) (sorry knue I haven't tried yours...).

I could use the "update" script without having to convert it with dos2unix...
Simply made chmod +x update && ./update

The Code::Blocks IDE seems to work, however when I start it it says in a wxMessageBox "Deleted stale lock file '/home/funto/Code::Blocks-funto'.", and when I close it it says in the console :
Quote
[email protected]:~/installations/codeblocks-1.0-RC1/src/devel $ ./codeblocks.exe

(codeblocks.exe:15411): Gtk-CRITICAL **: gtk_widget_ref: assertion `GTK_IS_WIDGET (widget)' failed

(codeblocks.exe:15411): Gtk-CRITICAL **: gtk_widget_unrealize: assertion `GTK_IS_WIDGET (widget)' failed

(codeblocks.exe:15411): Gtk-CRITICAL **: gtk_widget_unparent: assertion `GTK_IS_WIDGET (widget)' failed
Erreur de segmentation

:(

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #34 on: July 28, 2005, 12:13:55 am »
NB : these errors appear when we close the window with Alt-F4, not when we use File->Quit.

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #35 on: July 28, 2005, 12:39:18 am »
Pfiou, the IDE isn't stable yet...
The Qt and wxWidgets templates didn't work, but I managed to creating a simple console project. However, if I let the code completion plug-in activated, when I write "std::" the IDE crashes :'(

I decided to remove this plug-in, but now the caret is not visible anymore (in fact it is visible only at some moments...)

Offline Cray-Z

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #36 on: July 28, 2005, 12:53:44 am »
I know somebody else who is trying to compile with Mandriva/wxGTK 2.4 ANSi and he gets the same errors ^^

This confirms that the Makefile.unix is not up to date in my opinion ^^

Hi there!

First off, congratz for such a good C++ IDE ^^ Code::Blocks could become my main IDE if i succeed in compiling it under Linux. As Funto already mentioned, i use wxGtk 2.4 and Mandriva 2005.

Till now, i've never been able to log in CB's forum (i never received any activation email, even by explicitly asking it again). But for some reason, i am able to log in now ^^

However, both revised makefiles proposed here (knue's and mandrav's one) still dont work for me :(

The errors i get are:

Code: [Select]
Linking executable devel/codeblocks.exe...
/usr/local/lib/libwx_gtk2-2.4.so: undefined reference to `_gtk_accel_group_detach'
/usr/local/lib/libwx_gtk2-2.4.so: undefined reference to `_gtk_accel_group_attach'
/usr/local/lib/libwx_gtk2-2.4.so: undefined reference to `_gtk_rc_context_get_default_font_name'
collect2: ld returned 1 exit status
make: *** [devel/codeblocks.exe] Erreur 1

Maybe it's a minor problem, but i'm afraid i can't find what the problem is by myself :(

Hopefully, someone already encountered it. Thx in advance :)

Offline knue

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #37 on: July 28, 2005, 04:53:53 am »
There is a problem with GTK because some names changed.
Some distros build wx with an old GTK version.
see
http://wiki.codeblocks.org/index.php/Compiling_Code::Blocks_in_Linux_(applies_to_all_distros)

for more details

You will also find some infos for patching this

Edit:
However: Codeblocks for linux is -- in my opinion -- pretty unstable and not worth using (too many probls, too many crashes, too many bugs). I had same probls as Funtu (and many more). I am looking forward towards a stable version.
« Last Edit: July 28, 2005, 04:57:48 am by knue »

Offline Cray-Z

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #38 on: July 28, 2005, 10:41:14 am »
Quote
Patching wxGTK

Most newer distros provide gtk2.4.x. Although wxGTK will compile using this gtk version, applications using this wxGTK will not compile succesfully.

I had read the tutorial before trying to install CB so I checked my GTK version (which is 2.6.4). As a consequence, I didn't apply this patch. However, it seems that _gtk_accel_group_detach and _gtk_rc_context_get_default_font_name are concerned by the patch. Is using Mandriva the reason that gtk 2.6.4 has to be patched ? (while tut only mentioned 2.4.x)

Thx for the help Knue ^^ i guess i have to wait to have CB works on Linux :(

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #39 on: July 28, 2005, 12:24:24 pm »
knue >> not "Funtu", "Funto" ^^

I use the default GTK+ 2.6.4 in Ubuntu and compile well...

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #40 on: July 29, 2005, 10:20:55 am »
Ok, now it's my turn trying to compile Code::Blocks under Linux.

Right now I'm trying to compile wxWidgets 2.6.1 with GTK+ 2.6.8. configure --help won't list --disable-unicode but it works. --enable-unicode=no is supposed to work too.

The difference is that I'm compiling it under Knoppix 3.2 (using unstable).

I hope I get this working so I can test the help plugin under Linux and work on it.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #41 on: July 29, 2005, 03:53:10 pm »
It compiled without any problems but in runtime wxDockIt is causing them. The IDE cannot even start because of Segmentation Faults.

If it was, at least, a bug in the IDE...

I would like to know if somebody got to run Code::Blocks CVS HEAD under Linux.

I checked wxDockIt CVS but they haven't really worked recently on it and the source file triggering the bug hasn't been touched for 2 months.

Just in case, the backtrace looks like this:

Code: [Select]
0x4034d85b in wxWindowBase::AdjustForParentClientOrigin ()
   from /usr/local/lib/libwx_gtk2-2.6.so.0
(gdb) bt
#0  0x4034d85b in wxWindowBase::AdjustForParentClientOrigin ()
   from /usr/local/lib/libwx_gtk2-2.6.so.0
#1  0x40267114 in wxWindow::DoSetSize ()
   from /usr/local/lib/libwx_gtk2-2.6.so.0
#2  0x08075967 in wxWindowBase::SetSize (this=0x81e04e0, x=-20, y=-8,
    width=17, height=16, sizeFlags=3) at window.h:220
#3  0x0807e441 in wxPaneBase::UpdateLayout (this=0x81df540, cxWidth=0,
    cyHeight=0) at src/wxDockit/src/generic/pane.cpp:222
#4  0x0807ddd5 in wxPaneBase::UpdateSize (this=0x81df540)
    at src/wxDockit/src/generic/pane.cpp:131
#5  0x0807dcab in wxPaneBase::ShowHeader (this=0x81df540, state=false)
    at src/wxDockit/src/generic/pane.cpp:92
#6  0x0806503b in MainFrame::CreateIDE (this=0x81fb398) at src/main.cpp:426
#7  0x08064078 in MainFrame (this=0x81fb398, parent=0x0) at src/main.cpp:362
#8  0x0805ca6d in CodeBlocksApp::InitFrame (this=0x80b6698) at src/app.cpp:175
#9  0x0805cee5 in CodeBlocksApp::OnInit (this=0x80b6698) at src/app.cpp:248
#10 0x0805f41a in wxAppConsole::CallOnInit (this=0x80b6698) at app.h:87
#11 0x401bc957 in wxEntry () from /usr/local/lib/libwx_gtk2-2.6.so.0
#12 0x0805c167 in main (argc=1, argv=0xbffffc94) at src/app.cpp:297

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #42 on: July 29, 2005, 03:57:34 pm »
On my Ubuntu system C::B works fine (well, always, there are crashes some times, when we open a Win32 C::B project for example, or Gtk-WARNINGs when we close the IDE), compiled from the source on the site and with wx 2.4.

I thinked since RC1 wxDockIt hasn't been used anymore...

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #43 on: July 29, 2005, 04:07:31 pm »
Quote from: Funto
I thinked since RC1 wxDockIt hasn't been used anymore...

wxDockIt is being used in HEAD and isn't in VERSION_1_0, that's why it doesn't come in the source on this site.

This is what I used to build Code::Blocks:

* GTK+ 2.6.8 (debian package @ apt-get)
* GCC 3.4.5 20050706 prerelease (debian package @ apt-get)
* wxWidgets 2.6.1 (compiled with ../configure --with-gtk=2 --enable-monolithic --disable-unicode --enable-shared)
* Code::Blocks latest CVS from HEAD

It seems like I'll have to try with VERSION_1_0.

Offline Funto

  • Multiple posting newcomer
  • *
  • Posts: 81
Re: Code::Blocks doesn't compile on Ubuntu Linux with wx 2.5
« Reply #44 on: July 29, 2005, 06:12:46 pm »
I don't understand...shouldn't HEAD be more recent than VERSION_1_0? Why is wxDockit still present in HEAD?