Author Topic: Compiling the recent revisions on Linux  (Read 20954 times)

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Compiling the recent revisions on Linux
« on: February 06, 2006, 04:36:38 pm »
There is a small patch necessary to build revision 1946 and newer on Linux:
Code
Index: src/src/app.cpp
===================================================================
--- src/src/app.cpp     (revision 1951)
+++ src/src/app.cpp     (working copy)
@@ -534,7 +534,7 @@
             #ifdef __WXMSW__
                 wxICON(A_MAIN_ICON),
             #else
-                wxIcon(app)
+                wxIcon(app),
             #endif // __WXMSW__
                 _("Building ") + wxFileNameFromPath(wxString(argv[argc-1])));
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compiling the recent revisions on Linux
« Reply #1 on: February 06, 2006, 05:47:27 pm »
Applied, thank you.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Compiling the recent revisions on Linux
« Reply #2 on: February 06, 2006, 08:02:15 pm »
Revision 1952 (yeah I'm the one with the outdated gcc that doesn't support pch):
Code: diff
Index: src/sdk/blockallocated.cpp
===================================================================
--- src/sdk/blockallocated.cpp  (revision 1952)
+++ src/sdk/blockallocated.cpp  (working copy)
@@ -13,6 +13,7 @@
 #include <sdk_precomp.h>

 #ifndef CB_PRECOMP
+    #include "wx/regex.h"
     #include "blockallocated.h"
 #endif

Index: src/sdk/projectoptionsdlg.cpp
===================================================================
--- src/sdk/projectoptionsdlg.cpp       (revision 1952)
+++ src/sdk/projectoptionsdlg.cpp       (working copy)
@@ -32,7 +32,8 @@
     #include "projectmanager.h"
     #include "compilerfactory.h"
     #include "globals.h"
-
+    #include "scriptingmanager.h"
+
     #include <wx/xrc/xmlres.h>
     #include <wx/treectrl.h>
     #include <wx/spinctrl.h>

Also I get the following when building cclistctrl.cpp from codecompletion plugin that I wasn't able to solve :(
../../../src/sdk/blockallocated.h: In destructor `BlockAllocator<T, pool_size, debug>::~BlockAllocator() [with T = CodeBlocksEvent, unsigned int pool_size  = 75, bool debug = false]':
../../../src/sdk/blockallocated.h:140:   instantiated from here
../../../src/sdk/blockallocated.h:85: error: `_U' undeclared (first use this
   function)
Life would be so much easier if we could just look at the source code.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compiling the recent revisions on Linux
« Reply #3 on: February 06, 2006, 08:10:29 pm »
Fixed both in 1953. :)


EDIT:
Oh by the way, you *really* want to use a more recent compiler.
I compiled wxWidgets on Ubuntu using gcc 4 the other day, and it took only 4 minutes.
Compiling wxWidgets on Windows using gcc 3.4.4 on the very same machine takes about 25 minutes...
If there is no other reason to use a more recent compiler, then I'd say this is one  8)
« Last Edit: February 06, 2006, 08:14:10 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Compiling the recent revisions on Linux
« Reply #4 on: February 06, 2006, 10:05:41 pm »
Oh by the way, you *really* want to use a more recent compiler.
I 'll change my linux distro (decided to drop Suse) so I won't bother updating right now. But even if I do who 'll provide you with the info for compilers that don't support pch?  :lol:
Life would be so much easier if we could just look at the source code.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compiling the recent revisions on Linux
« Reply #5 on: February 06, 2006, 10:07:25 pm »
But even if I do who 'll provide you with the info for compilers that don't support pch?  :lol:
True :lol:

But hey, 4 versus 25 minutes is quite convincing, I knew it was somewhat faster, but not that much :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

  • Guest
Re: Compiling the recent revisions on Linux
« Reply #6 on: February 06, 2006, 10:09:28 pm »
But hey, 4 versus 25 minutes is quite convincing, I knew it was somewhat faster, but not that much :)

 :shock: When is GCC 4 (MinGW) coming out for us Windoze users I wonder?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compiling the recent revisions on Linux
« Reply #7 on: February 06, 2006, 10:15:34 pm »
If I have understood correctly, never.
Some 6 months or so ago, I read that the MinGW team would not port gcc 4.0 at all (don't remember if that info was official or inofficial). Instead, they will (according to what I read) wait for 4.1 or 4.2 to be stable and go for that then.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

sethjackson

  • Guest
Re: Compiling the recent revisions on Linux
« Reply #8 on: February 06, 2006, 10:41:56 pm »
Oh I see I have awhile to wait then.  :P

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Compiling the recent revisions on Linux
« Reply #9 on: February 06, 2006, 10:46:25 pm »
And the last one (sorry I got stuck on the last one and didn't finish make) to build flawlesly, (this file does not use #ifndef CB_PRECOMP so you'll get the double header parsing I'm afraid):
Code: diff
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp     (revision 1953)
+++ src/plugins/compilergcc/compilergcc.cpp     (working copy)
@@ -36,7 +36,7 @@
 #include <editormanager.h>
 #include <scriptingmanager.h>
 #include <configurationpanel.h>
-
+#include <pluginmanager.h>
 #include <cbeditor.h>
 #include <annoyingdialog.h>
 #include <wx/xrc/xmlres.h>
But hey, 4 versus 25 minutes is quite convincing, I knew it was somewhat faster, but not that much :)
Please don't tempt me, you know what it means to switch compilers to an rpm based installation... (especially when no official rpms are available)
Life would be so much easier if we could just look at the source code.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compiling the recent revisions on Linux
« Reply #10 on: February 06, 2006, 10:49:35 pm »
Done, thanks :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Compiling the recent revisions on Linux
« Reply #11 on: February 11, 2006, 08:48:34 pm »
For the known reasons (revision 1982)
Code: diff
Index: src/sdk/compiler.cpp
===================================================================
--- src/sdk/compiler.cpp        (revision 1982)
+++ src/sdk/compiler.cpp        (working copy)
@@ -19,6 +19,7 @@
     #include "messagemanager.h"
     #include "configmanager.h"
     #include "globals.h"
+    #include "compilerfactory.h"

     #include <wx/intl.h>
     #include <wx/regex.h>
Index: src/sdk/projectoptionsdlg.cpp
===================================================================
--- src/sdk/projectoptionsdlg.cpp       (revision 1982)
+++ src/sdk/projectoptionsdlg.cpp       (working copy)
@@ -32,6 +32,7 @@
     #include "projectmanager.h"
     #include "compilerfactory.h"
     #include "globals.h"
+    #include "scriptingmanager.h"

     #include <wx/xrc/xmlres.h>
     #include <wx/treectrl.h>
« Last Edit: February 11, 2006, 08:52:46 pm by yop »
Life would be so much easier if we could just look at the source code.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Compiling the recent revisions on Linux
« Reply #12 on: February 11, 2006, 08:53:06 pm »
Done, thanks :)
Be patient!
This bug will be fixed soon...

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Compiling the recent revisions on Linux
« Reply #13 on: February 13, 2006, 10:42:34 pm »
A little typo:
Code: diff
Index: src/sdk/workspaceloader.cpp
===================================================================
--- src/sdk/workspaceloader.cpp (revision 2001)
+++ src/sdk/workspaceloader.cpp (working copy)
@@ -22,7 +22,7 @@
     #include "projectmanager.h"
     #include "messagemanager.h"
     #include "cbproject.h"
-    #inclued "globals.h"
+    #include "globals.h"
     #include "workspaceloader.h"
 #endif
 

Because I need the wxSmith plugin in linux I also did a --enable-contrib build and:

Code: diff
Index: src/plugins/contrib/wxSmith/wxsheaders.h
===================================================================
--- src/plugins/contrib/wxSmith/wxsheaders.h (revision 2001)
+++ src/plugins/contrib/wxSmith/wxsheaders.h (working copy)
@@ -3,7 +3,7 @@
 
 #include <sdk.h>
 
-#ifdef CB_PRECOMP
+#ifndef CB_PRECOMP
     #include <wx/propgrid/propgrid.h>
     #include <wx/propgrid/propdev.h>
     #include <wx/propgrid/advprops.h>
Index: src/plugins/contrib/wxSmith/wxsevent.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsevent.cpp (revision 2001)
+++ src/plugins/contrib/wxSmith/wxsevent.cpp (working copy)
@@ -3,6 +3,7 @@
 
 #include "wxsmith.h"
 #include "wxsglobals.h"
+#include <messagemanager.h>
 
 const wxEventType wxEVT_SELECT_RES = wxNewEventType();
 const wxEventType wxEVT_UNSELECT_RES = wxNewEventType();
Life would be so much easier if we could just look at the source code.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Compiling the recent revisions on Linux
« Reply #14 on: February 14, 2006, 12:28:12 pm »
Oh I see I have awhile to wait then.  :P

Sorry for the off-topic, but you can always try GCC 4.1.0 snapshot from Ceniza. I use it and it works well, despite some "modifications". Anyway, I keep my original MinGW 5 installation (but probably I will update it to 5.0.2).

Michael

PS.: In Windows GCC 4.1.0 is not so fast as in Linux :(. But may be it is because it is not the final release.

Offline ASJ

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: Compiling the recent revisions on Linux
« Reply #15 on: February 14, 2006, 06:31:33 pm »
a small question for yob: may I ask which version of suse you are using at the moment (and which you decided to get rid of) ? I have been trying to get the svn version of codeblocks compiling on SuSE 10 but without succes....

Maybe I should get a really recent version and try again?

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Compiling the recent revisions on Linux
« Reply #16 on: February 14, 2006, 06:58:42 pm »
a small question for yob: may I ask which version of suse you are using at the moment (and which you decided to get rid of) ? I have been trying to get the svn version of codeblocks compiling on SuSE 10 but without succes....

Maybe I should get a really recent version and try again?
Who is yob anyway? Everybody is mispelling my name in Greek now it's my username :lol:
Anyway I'm using Suse 9.3 (I haven't installed 10.00 because I 'm too lazy to install icc and vtune again) and I want to change because I find it too restrictive for my taste. I'll probably give ubuntu a shot or if I'm in the mood gentoo. Whatever problems you have you can ask, I think we 'll get it to build. For me I just followed the wiki instructions to build wxWidgets and Code::Blocks back when cvs was still used. Now as I'm a bit more experienced with C::B code I can generally recognize some errors and correct them so almost every time I update I can also build.
Life would be so much easier if we could just look at the source code.

Offline ASJ

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: Compiling the recent revisions on Linux
« Reply #17 on: February 15, 2006, 06:23:23 pm »
well it seems that taking the latest svn version I could get (2012)  solved already most of my problems. The only thing I came across was the fact that I tried to make in a directory containing a space in it's name. Although for the largest part this is no problem, I got errors compiling. Making in a directory without spaces in it's name solved this problem and codeblocks compiled smoothly (without the contributed plugins)
Now I'll redo the procedure to try to get the contributed plugin as well... 8)


Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Compiling the recent revisions on Linux
« Reply #18 on: February 15, 2006, 06:59:58 pm »
The only thing I came across was the fact that I tried to make in a directory containing a space in it's name.
This is not a good habbit, stop it (even in windows) while it's early ;)
I'm glad you built out of the box :)
Life would be so much easier if we could just look at the source code.

Offline ASJ

  • Multiple posting newcomer
  • *
  • Posts: 46
Re: Compiling the recent revisions on Linux
« Reply #19 on: February 15, 2006, 08:12:45 pm »
you're right....
it cost me quite a bit of time (couple of weeks on and off)

By the way, including the contributed plugins it also compiles out of the box!!
and the new looks great! :D :D :D :D
Time to try it out!

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Compiling the recent revisions on Linux
« Reply #20 on: February 15, 2006, 08:31:39 pm »
[...]I want to change because I find it too restrictive for my taste. I'll probably give ubuntu a shot or if I'm in the mood gentoo. Whatever problems you have you can ask, I think we 'll get it to build. For me I just followed the wiki instructions to build wxWidgets and Code::Blocks back when cvs was still used.

Sorry for the question a bit off-topic, but I have not really understood what you meant by

Quote
[...]I'll probably give ubuntu a shot or if I'm in the mood gentoo.

I am interested in using Linux (Windows is boring me :)) and the huge choice of distributions make me the task not easy. If you can tell me what do you think about ubuntu and gentoo, I would really appreciate it. Thanks.

Michael

sethjackson

  • Guest
Re: Compiling the recent revisions on Linux
« Reply #21 on: February 15, 2006, 08:36:46 pm »
Well Gentoo is kewl. It takes awhile to setup, but you get more control. I have used Kubuntu, and I hated it.  I used KDE (therefore Kubuntu) for my desktop. I couldn't figure out how to get KDE back to the "factory" default. With Gentoo it (KDE) is at "factory" default. I think (this is my opinion no offense to anyone) that the people behind the ubuntu distro's are making it easy for people to switch to Linux. So my choice is Gentoo out of those two.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Compiling the recent revisions on Linux
« Reply #22 on: February 15, 2006, 08:43:56 pm »
Thank for your reply :).

Personally, I was thinking about ubuntu and/or gentoo. May be Debian too. I like the philosophy of ubuntu. Years ago, I have had a bad experience with a RedHat distribution.

Anyway, I have to investigate more, before taking a decision (and I have also to wait until I get a new computer :)).

Michael

sethjackson

  • Guest
Re: Compiling the recent revisions on Linux
« Reply #23 on: February 15, 2006, 08:48:41 pm »
RedHat based stuff is terrible IMO.  :lol: :lol: I tried Fedora Core awhile back, and I hated it.... Mandrake (Mandrivia whatever) is well for new Linux users..... I don't like it either.  :P Never tried Debian (well ubuntu really isn't Debian).....

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Compiling the recent revisions on Linux
« Reply #24 on: February 15, 2006, 08:54:58 pm »
RedHat based stuff is terrible IMO.  :lol: :lol:

RedHat was quite ok at that time (year 2000 :D). What was terrible was when I decided to change the screen resolution. The OS modified the keyboard layout too. After several days in trying to re-change it, I decided to re-install RedHat again :D.

Michael

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compiling the recent revisions on Linux
« Reply #25 on: February 15, 2006, 09:14:40 pm »
RedHat (and Fedora) have been loyally serving me for one decade on a wide range of hardware. Some of my machines were high-end hardware, while I literally pulled the parts for some others out of the dustbin! RedHat did them all just fine without any problems. My internet gateway is still a Fedora machine today.

Maybe RedHat/Fedora is not the top performer in every respect, but hey... it works out of the box, and it works for years.

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Compiling the recent revisions on Linux
« Reply #26 on: February 15, 2006, 09:55:09 pm »
Maybe RedHat/Fedora is not the top performer in every respect, but hey... it works out of the box, and it works for years.
Nowadays most of them do... It's more a matter of personal taste and habbit I guess with rare exceptions (most of them in work enviroments). Anyway I've been using suse for quite a while and I am used to it but I want to get out of rpm based distros (so fedora is out also). Ubuntu has great comments from everyone, while Gentoo has the largest community and the best documentation (imagine gentoo without any docs :lol: ) but it requires a lot of reading, dedication and time to get working the way it is supposed to (and for Gentoo that is the way you want it to).
Life would be so much easier if we could just look at the source code.