Author Topic: Compiling the recent revisions on Linux  (Read 20315 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.