Author Topic: Having fun compiling C::B on Linux 64 bits  (Read 5238 times)

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Having fun compiling C::B on Linux 64 bits
« on: January 23, 2006, 04:36:32 pm »
Hi! I'm trying to get C::B working on Ubuntu Breezy x64.

Making it compile:

I attach a little patch, most fixes are because
Code: C++
  1. sizeof(void*) != sizeof(int)
It applies to AngelScript, wxAUI, and cbKeyBinder.
Note: I didn't sent the patch because I want to discuss the correctness here.

I had to define AS_MAX_PORTABILITY in as_config.h, because the faster calling conventions aren't availabe for x64 yet (thus if you don't enable this flag will get linker errors).
AS_MAX_PORTABILITY: Disables all platform specific code. Only the asCALL_GENERIC calling convention will be available in with this flag set.

After those changes, C::B compiles just fine. :D

Making it run:
Now, when running C::B, because "Only the asCALL_GENERIC calling convention is available" I get lot's of asserts
Code: C++
  1. assert( r >= 0 );
in /bindings/sc_wxstring.cpp and /bindings/sc_wxarraystring.cpp.
It's because the error return code of those functions is -7, which means asNOT_SUPPORTED (The feature you are trying to use is not yet supported.).
It's obviously because C::B doesn't use asCALL_GENERIC calling functions here.

Well, after removing the asserts, C::B runs just fine, at least doesn't crashes. :D
Or so I thought...

Errors when using it (discovered in a few minutes):
First of all, just because I know cbKeyBinder is buggy I disable it.

* Menu File->Save as is enabled, and only the Start page is open.
* Menu File->Close Project is enabled even trough there isn't any project open.
* The same goes for Save Workspace, Save Workspace as, and Close Workspace.

* Menu File->Export does nothing. It doesn't expand any list even (HTML, PDF, etc).

* Menu View->Manager hides the manager. But it never gets back. :( (but others like View->Messages does work).
* Menu View->Open files list hides the Open files list. But it never gets back. :(

* Menu View->FullScreen does absolutely nothing.

* In the new revamped settings dialogs, no icon is displayed (neither in Environment or Editor). Strange is that no message error appears.

* Some ocasionally segfaults when moving panels. Some segfaults when moving things around (dragging text, dragging toolbars, dragging panels, dragging anything).

* C::B hanged when I closed a project, but still a little responsive, but after doing some clicks on the menus, segfaulted (codeblocks_backtrace_rev1840-2.xml).
In the console:
Code: [Select]
(codeblocks:27485): Gtk-CRITICAL **: gtk_check_menu_item_set_active: assertion `GTK_IS_CHECK_MENU_ITEM (check_menu_item)' failed
addr2line: 'codeblocks': No such file
addr2line: 'codeblocks': No such file
addr2line: 'codeblocks': No such file
Aborted


* On stdio/stderr are displayed some ocassionaly messages (don't ask when):

Code: [Select]
(codeblocks:25357): GLib-GObject-WARNING **: invalid cast from `GtkScrolledWindow' to `GtkWindow'

(codeblocks:25357): Gtk-CRITICAL **: gtk_window_set_transient_for: assertion `parent == NULL || GTK_IS_WINDOW (parent)' failed

(codeblocks:25357): Gtk-CRITICAL **: gtk_check_menu_item_set_active: assertion `GTK_IS_CHECK_MENU_ITEM (check_menu_item)' failed

* This too:
Code: [Select]
(codeblocks:25734): Gtk-CRITICAL **: gtk_check_menu_item_set_active: assertion `GTK_IS_CHECK_MENU_ITEM (check_menu_item)' failed
...
addr2line: 'codeblocks': No such file
addr2line: 'codeblocks': No such file
addr2line: 'codeblocks': No such file
addr2line: 'codeblocks': No such file
addr2line: 'codeblocks': No such file
....
Segmentation fault

* Some fun for byo too (wxSmith):
Just closing tabs:
Code: [Select]
codeblocks: ./wxsresource.cpp:43: void wxsResource::EditorSaysHeIsClosing(): Assertion `Editor != __null' failed.
Aborted

And all of this catched in a few minutes :lol:
Lot's of fun, but something tells me that C::B is not ready for the primetime yet. :P


[attachment deleted by admin]
« Last Edit: January 23, 2006, 04:40:51 pm by Takeshi Miya »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Having fun compiling C::B on Linux 64 bits
« Reply #1 on: January 23, 2006, 05:16:29 pm »
I think you'd better discuss the AngelScript issues with Andreas Jönsson. First of all, he is The One who knows, and second, it is better if he adds 64bit support to AngelScript rather than if we patch it... :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Having fun compiling C::B on Linux 64 bits
« Reply #2 on: January 24, 2006, 01:06:25 am »
You might not have read the entire post, but AngelScript only errors on compiling. The other problems I'm talking are specifically on C::B, and probably they ocurr in any linux (not only 64 bits). (Example: http://forums.codeblocks.org/index.php?topic=2098.msg16522;topicseen#msg16522)

Anyways, Yiannis asked me for the patch, I'll talk with Andreas too.