Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Der Meister on February 06, 2006, 04:36:38 pm

Title: Compiling the recent revisions on Linux
Post by: Der Meister 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])));
Title: Re: Compiling the recent revisions on Linux
Post by: thomas on February 06, 2006, 05:47:27 pm
Applied, thank you.
Title: Re: Compiling the recent revisions on Linux
Post by: yop 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)
Title: Re: Compiling the recent revisions on Linux
Post by: thomas 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)
Title: Re: Compiling the recent revisions on Linux
Post by: yop 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:
Title: Re: Compiling the recent revisions on Linux
Post by: thomas 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 :)
Title: Re: Compiling the recent revisions on Linux
Post by: sethjackson 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?
Title: Re: Compiling the recent revisions on Linux
Post by: thomas 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.
Title: Re: Compiling the recent revisions on Linux
Post by: sethjackson on February 06, 2006, 10:41:56 pm
Oh I see I have awhile to wait then.  :P
Title: Re: Compiling the recent revisions on Linux
Post by: yop 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)
Title: Re: Compiling the recent revisions on Linux
Post by: thomas on February 06, 2006, 10:49:35 pm
Done, thanks :)
Title: Re: Compiling the recent revisions on Linux
Post by: yop 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>
Title: Re: Compiling the recent revisions on Linux
Post by: mandrav on February 11, 2006, 08:53:06 pm
Done, thanks :)
Title: Re: Compiling the recent revisions on Linux
Post by: yop 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();
Title: Re: Compiling the recent revisions on Linux
Post by: Michael 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.
Title: Re: Compiling the recent revisions on Linux
Post by: ASJ 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?
Title: Re: Compiling the recent revisions on Linux
Post by: yop 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.
Title: Re: Compiling the recent revisions on Linux
Post by: ASJ 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)

Title: Re: Compiling the recent revisions on Linux
Post by: yop 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 :)
Title: Re: Compiling the recent revisions on Linux
Post by: ASJ 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!
Title: Re: Compiling the recent revisions on Linux
Post by: Michael 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
Title: Re: Compiling the recent revisions on Linux
Post by: sethjackson 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.
Title: Re: Compiling the recent revisions on Linux
Post by: Michael 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
Title: Re: Compiling the recent revisions on Linux
Post by: sethjackson 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).....
Title: Re: Compiling the recent revisions on Linux
Post by: Michael 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
Title: Re: Compiling the recent revisions on Linux
Post by: thomas 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.

Title: Re: Compiling the recent revisions on Linux
Post by: yop 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).