Author Topic: who builds CB with GCC (read on please)  (Read 7176 times)

Online killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5149
who builds CB with GCC (read on please)
« on: June 21, 2006, 01:42:08 pm »
I'd like to know who builds CB from sources with a version of GCC < 3.4 ?
If so could you tell me your OS and if possible why you are not using a more recent version of GCC ?

Why this question : something about precompiled headers. ;-)

Hey, even if you use a gcc >= 3.4, feel free to tell me.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: who builds CB with GCC (read on please)
« Reply #1 on: June 21, 2006, 02:00:20 pm »
gcc 3.4.4 (WinXP)
gcc 4.0.2 (Ubuntu 5.10)

i tried gcc 3.4.5 on WinXP but got too much warnings using dllexports and certain compile flags,
and i couldn't find any thing what would have worked better than with gcc 3.4.4

on linux i use simply the standard from the ubuntu update server
« Last Edit: June 21, 2006, 02:39:24 pm by tiwag »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: who builds CB with GCC (read on please)
« Reply #2 on: June 21, 2006, 02:00:42 pm »
Hey, even if you use a gcc >= 3.4, feel free to tell me.

Hello,

I have used on Windows GCC 3.4.4, 3.4.5, 4.1.0 and now 4.1.1. Unfortunately, I could not build C::B with 4.0.3 (but I could build wxWidgets :D).

On Ubuntu Dapper --> GCC 4.0.3
On Gentoo 2006.0 --> GCC 3.4.6

Best wishes,
Michael
« Last Edit: June 21, 2006, 02:18:55 pm by Michael »

Offline oz

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: who builds CB with GCC (read on please)
« Reply #3 on: June 21, 2006, 02:03:10 pm »
WindowsXP+sp2: MinGW GCC 3.4.5
fedora core 5: GCC 4.1.1
« Last Edit: June 21, 2006, 02:05:44 pm by oz »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: who builds CB with GCC (read on please)
« Reply #4 on: June 21, 2006, 02:29:31 pm »
regularly:
Windows XP SP2: MinGW gcc 3.4.5
Ubuntu 5.10/AMD64: gcc 4.0.x

occasionally:
Fedora Core 5/AMD64: gcc 4.1.x
SuSE 10.1/AMD64: gcc 4.1.x

months ago:
Fedora Core 4/x86: uh.... 4.0.x?
Windows XP SP2: MinGW gcc 3.4.4
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: who builds CB with GCC (read on please)
« Reply #5 on: June 21, 2006, 02:48:44 pm »
gcc 3.4.6 on gentoo

But I still have a version of gcc 3.3 (I guess it is 3.3.6) installed. If you want to I could probably try a build with this compiler on the next weekend...
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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9489
Re: who builds CB with GCC (read on please)
« Reply #6 on: June 21, 2006, 03:09:24 pm »
gcc 3.4.5 on WinXP and gcc 3.3.5 on SuSE Linux 9.3 (BTW: I'm just a user on that machine so it's not possible to update.)
Last time I build C::B under Linux was 2 days ago - it worked that time.

Edit: It actually did not work that time but I've committed a fix that it worked after I tried... ;-)
« Last Edit: June 21, 2006, 03:12:33 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2121
Re: who builds CB with GCC (read on please)
« Reply #7 on: June 21, 2006, 03:18:24 pm »
Win XPsp2 gcc 3.4.4

Ubuntu 5.1.0 gcc 4.0.2

OS X 10.3 gcc 3.3 (last available version for this platform. Cannot be updated)

OS X 10.4 gcc 3.3 & gcc 4.0.0 (3.3 required to build for prior 10.x releases)
« Last Edit: June 21, 2006, 03:22:00 pm by Pecan »

sethjackson

  • Guest
Re: who builds CB with GCC (read on please)
« Reply #8 on: June 21, 2006, 07:25:05 pm »
Windows XP Pro SP2 GCC 3.4.4 (planning on upgrading to 3.4.5 soon......)

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: who builds CB with GCC (read on please)
« Reply #9 on: June 22, 2006, 10:07:16 am »
Win XP Pro SP2
GCC 3.4.5 (I think. VCF only builds with this version or higher so I compile C::B with it to)
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: who builds CB with GCC (read on please)
« Reply #10 on: June 29, 2006, 08:25:43 pm »
Sorry for not answering until now but I didn't have the time yet.
I just compiled revision 2639 with gcc 3.3.6. It worked after adding one include to the debugger-plugin:
Code: [Select]
Index: src/plugins/debuggergdb/debugger_defs.cpp
===================================================================
--- src/plugins/debuggergdb/debugger_defs.cpp   (revision 2639)
+++ src/plugins/debuggergdb/debugger_defs.cpp   (working copy)
@@ -7,6 +7,7 @@
 #include <wx/dialog.h>
 #include <wx/font.h>
 #include <wx/sizer.h>
+#include <wx/textctrl.h>
 
 #include <wx/arrimpl.cpp>
 WX_DEFINE_OBJARRAY(WatchesArray);
Anyway, I couldn't compile the contrib-plugins yet because I get an error within byoCBTris::OnPaint (It works with gcc 3.4.6) and I did not check if Code::Blocks runs.

Besides: I'm not sure if we should still care about gcc 3.3 and older compilers. Does any distribution still use this compiler?
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 Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2121
Re: who builds CB with GCC (read on please)
« Reply #11 on: June 29, 2006, 09:07:05 pm »

Besides: I'm not sure if we should still care about gcc 3.3 and older compilers. Does any distribution still use this compiler?

Mac OS X 10.3 (Panther) uses it exclusively and OS X 10.4 uses it as a means to backward compatiblilty from Tiger/ppc/Intel systems.

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: who builds CB with GCC (read on please)
« Reply #12 on: June 29, 2006, 09:26:10 pm »
Ok, I managed to build the contrib plugins with gcc 3.3.6. The ByoGames Plugin needed a few patches to get compiled, one of them is a real error:
Code: [Select]
Index: src/plugins/contrib/byogames/byocbtris.cpp
===================================================================
--- src/plugins/contrib/byogames/byocbtris.cpp  (revision 2639)
+++ src/plugins/contrib/byogames/byocbtris.cpp  (working copy)
@@ -108,7 +108,8 @@
 
 void byoCBTris::OnPaint(wxPaintEvent& event)
 {
-    wxBitmap buffer(wxImage(GetClientSize().GetWidth(),GetClientSize().GetHeight()));
+       wxSize size = GetClientSize();
+    wxBitmap buffer(wxImage(size.GetWidth(),size.GetHeight()));
     wxBufferedPaintDC DC(this,buffer);
     DrawBrickField(&DC);
     DrawCurrentChunk(&DC);
Index: src/plugins/contrib/byogames/byosnake.cpp
===================================================================
--- src/plugins/contrib/byogames/byosnake.cpp   (revision 2639)
+++ src/plugins/contrib/byogames/byosnake.cpp   (working copy)
@@ -77,7 +77,8 @@
 
 void byoSnake::OnPaint(wxPaintEvent& event)
 {
-    wxBitmap buffer(wxImage(GetClientSize().GetWidth(),GetClientSize().GetHeight()));
+       wxSize size = GetClientSize();
+    wxBitmap buffer(wxImage(size.GetWidth(),size.GetHeight()));
     wxBufferedPaintDC DC(this,buffer);
     DrawBorder(&DC);
     DrawSnake(&DC);
Index: src/plugins/contrib/byogames/byogameselect.cpp
===================================================================
--- src/plugins/contrib/byogames/byogameselect.cpp      (revision 2639)
+++ src/plugins/contrib/byogames/byogameselect.cpp      (working copy)
@@ -1,5 +1,5 @@
 #include "sdk.h"
-#ifdef CB_PRECOMP
+#ifndef CB_PRECOMP
 #include <wx/button.h>
 #include <wx/intl.h>
 #include <wx/listbox.h>
The last one is a real error the two others are som surprising problems - although the original code was correct gcc 3.3.6 seems to have some problems with it. But with this workaround I got it compiled.

Anyway, make install ran without problems, too, but I can't start Code::Blocks because wxGTK is compiled with gcc 3.4 and thus not compatible to my just build version of Code::Blocks. And I don't want to recompile wxGTK twice now ;)

Quote from: Pecan
Mac OS X 10.3 (Panther) uses it exclusively and OS X 10.4 uses it as a means to backward compatiblilty from Tiger/ppc/Intel systems.
Well, then we should still support this oldtimer and apply these few small patches.
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.

Online killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5149
Re: who builds CB with GCC (read on please)
« Reply #13 on: June 29, 2006, 09:27:40 pm »
Sorry for not answering until now but I didn't have the time yet.
I just compiled revision 2639 with gcc 3.3.6. It worked after adding one include to the debugger-plugin:
Code: [Select]
Index: src/plugins/debuggergdb/debugger_defs.cpp
===================================================================
--- src/plugins/debuggergdb/debugger_defs.cpp   (revision 2639)
+++ src/plugins/debuggergdb/debugger_defs.cpp   (working copy)
@@ -7,6 +7,7 @@
 #include <wx/dialog.h>
 #include <wx/font.h>
 #include <wx/sizer.h>
+#include <wx/textctrl.h>
 
 #include <wx/arrimpl.cpp>
 WX_DEFINE_OBJARRAY(WatchesArray);
Anyway, I couldn't compile the contrib-plugins yet because I get an error within byoCBTris::OnPaint (It works with gcc 3.4.6) and I did not check if Code::Blocks runs.

Besides: I'm not sure if we should still care about gcc 3.3 and older compilers. Does any distribution still use this compiler?

could you tell me what would happen if in sdk_common.h the following section would be removed :
Code: [Select]
#if defined(__GNUC__) && !defined(__APPLE__)
    #if ( (__GNUC__ < 3) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ < 4) ) )
        #undef CB_PRECOMP
    #endif
#endif // __GNUC__ && !__APPLE__

support for old compilers : yes, that's the question.
I think Pecan was already able to build with that old gcc (and for him that section can go, because he has __APPLE__ defined ;-)  )
« Last Edit: June 29, 2006, 09:29:44 pm by killerbot »

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Re: who builds CB with GCC (read on please)
« Reply #14 on: June 29, 2006, 10:24:23 pm »
I can compile revision 2639 with gcc 3.3.6 on Linux without these lines of code. But you should note that I still had the few patches mentioned before applied. Perhaps these are necessary and the problems that made these pachtes necessary were introduced by a recent change. That would explain why Pecan could compile Code::Blocks without errors while I couldn't. But with these patches it still works.
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.

Online killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5149
Re: who builds CB with GCC (read on please)
« Reply #15 on: June 29, 2006, 10:31:27 pm »
could be, I am not sure on how recent those things were. I have adjusted some headers in byogames, probably that mistake ifdef CB_PRECOMP, where it should have been ifndef, comes from me :-(
The other 2 constructs seems weird that your gcc compiler doesn't like them. By the way, I have applied and commited those changes. The debugger_defs I also think I know why. It just seems that when compiling without pch's, the list of include files (actually being included) seems to be different depending on the platform.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2121
Re: who builds CB with GCC (read on please)
« Reply #16 on: June 30, 2006, 12:40:13 am »
I can compile revision 2639 with gcc 3.3.6 on Linux without these lines of code. But you should note that I still had the few patches mentioned before applied. Perhaps these are necessary and the problems that made these pachtes necessary were introduced by a recent change. That would explain why Pecan could compile Code::Blocks without errors while I couldn't. But with these patches it still works.

I have not tried to compile the contribs with gcc 3.3. I got stuck with AngelScript for a few months. I've only compiled CB itself.

And yep, there are a few patches (on my mac) that I have not submitted yet.
It seem we're all running down the same road.
« Last Edit: June 30, 2006, 12:44:04 am by Pecan »