Code::Blocks
April 19, 2014, 11:49:37 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!
 
   Home   Help Search Login Register  :: WebsiteWiki  
Pages: 1 2 [3] 4   Go Down
  Send this topic  |  Print  
Author Topic: gcc4.7 can't build codeblocks  (Read 13707 times)
reckless
Regular
***
Offline Offline

Posts: 303


« Reply #30 on: April 20, 2012, 06:58:43 pm »

Ill give it a go thanks Smiley
Note allready linking libstdc++ static.
Besides the initialization problem it builds just fine.
Logged
stahta01
Lives here!
****
Offline Offline

Posts: 4108


WWW
« Reply #31 on: April 23, 2012, 01:33:55 am »

EDIT: Found link to patch in this thread http://pastie.org/pastes/3781948

I will try it and see if it is all that is needed for Windows Build fix.
EDit2: It fixed it for the Windows Build of contrib help plugin.

Has anyone gotten the contrib help plugin to build?

It did not compile without errors even after I added the "-fpermissive" option to it.


The other  contrib plugins compiled successfully.

Tim S.
« Last Edit: April 23, 2012, 02:58:59 am by stahta01 » Logged

C Programmer working to learn more about C++.
Compiling CB Trunk against wxWidgets WX_3_0_BRANCH branch.
--
When in doubt, read the CB WiKi FAQ.
headkase
Advanced newcomer
*
Offline Offline

Posts: 43


« Reply #32 on: April 25, 2012, 08:35:05 am »

Did anyone save that pastie help_plugin.patch?  Pastie is dead.  Their pansy host pulled the plug on them.
Logged
stahta01
Lives here!
****
Offline Offline

Posts: 4108


WWW
« Reply #33 on: April 25, 2012, 01:27:41 pm »

Did anyone save that pastie help_plugin.patch?  Pastie is dead.  Their pansy host pulled the plug on them.


Code:
Index: src/plugins/contrib/help_plugin/man2html.cpp
===================================================================
--- src/plugins/contrib/help_plugin/man2html.cpp (revision 7939)
+++ src/plugins/contrib/help_plugin/man2html.cpp (working copy)
@@ -123,7 +123,7 @@
 
 #include <ctype.h>
 
-//#include <unistd.h>
+#include <unistd.h>
 #include <string.h>
 
 #include <stdio.h>

Code:
Index: src/plugins/contrib/help_plugin/defs.h
===================================================================
--- src/plugins/contrib/help_plugin/defs.h (revision 7939)
+++ src/plugins/contrib/help_plugin/defs.h (working copy)
@@ -289,7 +289,7 @@
 
             if (i.second == false && overwrite)
             {
-                find(k)->second = t;
+                this->find(k)->second = t;
             }
 
             return i.first;
« Last Edit: April 25, 2012, 01:29:14 pm by stahta01 » Logged

C Programmer working to learn more about C++.
Compiling CB Trunk against wxWidgets WX_3_0_BRANCH branch.
--
When in doubt, read the CB WiKi FAQ.
headkase
Advanced newcomer
*
Offline Offline

Posts: 43


« Reply #34 on: April 25, 2012, 11:27:03 pm »

Thank you stahta01, I'll also attach it here for good measure!
Logged
oBFusCATed
Developer
Lives here!
*****
Offline Offline

Posts: 7200


« Reply #35 on: April 25, 2012, 11:33:09 pm »

Does this patch work on windows or the help plugin is not compiled there?
Logged

<debugger plugin maintainer>
(most of the time I ignore long posts)
stahta01
Lives here!
****
Offline Offline

Posts: 4108


WWW
« Reply #36 on: April 26, 2012, 12:00:42 am »

Does this patch work on windows or the help plugin is not compiled there?

It fixes the compile errors under windows (on the help plugin) that are left after the "-fpermissive" option is used.

Tested with un-official MinGW (nuwen.net) GCC version 4.7 under windows 7 32 bit wxWidgets 2.8 branch.

Tim S.
« Last Edit: April 26, 2012, 12:02:27 am by stahta01 » Logged

C Programmer working to learn more about C++.
Compiling CB Trunk against wxWidgets WX_3_0_BRANCH branch.
--
When in doubt, read the CB WiKi FAQ.
headkase
Advanced newcomer
*
Offline Offline

Posts: 43


« Reply #37 on: April 26, 2012, 12:25:39 am »

Just wanted to add: I just compiled Code::Blocks SVN 7943 under Arch Linux x86_64 using the attached help_plugin_fix.patch and the "-fpermissive" compiler option with GCC 4.7.0.  It appears to be working fine.

Edit: removed attachment.
« Last Edit: April 26, 2012, 01:37:53 am by headkase » Logged
oBFusCATed
Developer
Lives here!
*****
Offline Offline

Posts: 7200


« Reply #38 on: April 26, 2012, 01:13:32 am »

In svn...

@headkase: Why are you adding the patch for every post? Keep in mind that the disk space for the forum is limited and attachments get deleted from time to time. So please don't abuse the attach feature of the forum.
Logged

<debugger plugin maintainer>
(most of the time I ignore long posts)
headkase
Advanced newcomer
*
Offline Offline

Posts: 43


« Reply #39 on: April 26, 2012, 01:28:56 am »

In svn...

@headkase: Why are you adding the patch for every post? Keep in mind that the disk space for the forum is limited and attachments get deleted from time to time. So please don't abuse the attach feature of the forum.

Ok, sorry, didn't realize that.  Was just being a bit paranoid when the patch was lost for a bit with pastie.

Edit: I see SVN is now up to 7944.  Compiling now with just "-fpermissive", when the compile is done in about 20 minutes will post if it succeeded or not.

Edit2: Code::Blocks SVN 7944 built successfully, in Arch Linux x86_64,  under GCC 4.7.0 using only the "-fpermissive" compiler flag.  Thank you very much oBFusCATed! Smiley

See: Here for the source of the patch that was posted.  It was contributed by RevenantX so props to him and thanks to the credited source.
« Last Edit: April 26, 2012, 02:40:31 am by headkase » Logged
reckless
Regular
***
Offline Offline

Posts: 303


« Reply #40 on: May 14, 2012, 06:52:23 am »

Finally i got it working Smiley

Gcc-4.7.0 can be bootstrapped with

--disable-build-poststage1-with-cxx \
--disable-build-with-cxx \

For the libstdc++ problem you need to recompile binutils and mingw-w64 api.
use --enable-threads=posix and suddenly it worked  Huh damnest thing is all executables now need libwinpthread-0.dll (im gonna try if i can link it in statically).
Logged
reckless
Regular
***
Offline Offline

Posts: 303


« Reply #41 on: May 18, 2012, 08:16:09 am »

Just a heads up.
Got gcc 4.7.0 to work with win32 threads again and i rebuilt the trunk version of CodeBlocks with it, and it works it seems.
I can upload the 4.7.0 build CodeBlocks if someone wants to test it.
Logged
MortenMacFly
Administrator
Lives here!
*****
Offline Offline

Posts: 8543



« Reply #42 on: May 18, 2012, 01:28:45 pm »

Got gcc 4.7.0 to work with win32 threads again and i rebuilt the trunk version of CodeBlocks with it, and it works it seems.
The question is: Did you need to patch C::B to make it compile or not?
Logged

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
xunxun
Almost regular
**
Offline Offline

Posts: 187



« Reply #43 on: May 18, 2012, 03:46:22 pm »

Finally i got it working Smiley

Gcc-4.7.0 can be bootstrapped with

--disable-build-poststage1-with-cxx \
--disable-build-with-cxx \

For the libstdc++ problem you need to recompile binutils and mingw-w64 api.
use --enable-threads=posix and suddenly it worked  Huh damnest thing is all executables now need libwinpthread-0.dll (im gonna try if i can link it in statically).

Don't know why you add
--disable-build-poststage1-with-cxx \
--disable-build-with-cxx \

Another thing, when you use --enable-threads=posix and winpthread, I suggest you to use gcc static edition, because someone found that shared edition is not normal when using some std:thread
Logged

Regards,
xunxun
reckless
Regular
***
Offline Offline

Posts: 303


« Reply #44 on: May 19, 2012, 09:44:14 am »

@ Morten. Only with the patches from here + -fpermissive in the compiler vars.
@ Xunxun. Dont need pthreads anymore i got i working with win32 threads. Only need --disable-build-poststage1-with-cxx because g++ seems to have a bug with its system header composition (older versions of gcc used gcc for bootstrapping everything, 4.7.0 uses g++ from stage2 and forward). But agree if using --enable-threads=posix and winpthread static might be the better choice.
Logged
Pages: 1 2 [3] 4   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!