Author Topic: Building Code::Blocks on Win 64  (Read 82709 times)

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: Building Code::Blocks on Win 64
« Reply #30 on: August 18, 2010, 03:22:01 am »
The answer is Yes, it will be incorporated in SVN. I was waiting for the new release. Now as the release process is over, I'll commit those changes to trunk. But it will take some time. At least I target committing major portion of patch to trunk within few months. There are few things holding me at the moment.

Excellent, I look forward to beta testing it! ;)

As TDragon mentioned, his TDM-GCC is excellent.  It's based on MinGW-w64 and produces native 64-bit binaries.  If you are looking for a native 64-bit gcc, I've also come across this: http://code.google.com/p/mingw-w64-dgn/.

Cheers!

Chris

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #31 on: August 18, 2010, 04:08:58 pm »
This could be related to this:
http://forums.codeblocks.org/index.php/topic,10908.msg87337.html#msg87337

Also on linux I get this crash:

Code
(gdb) bt
#0  0x0000000000000021 in ?? ()
#1  0x00007ffff7aa33a0 in wxPGGlobalVarsClass::~wxPGGlobalVarsClass() () from /usr/lib/libcodeblocks.so.0
#2  0x00007ffff7ab9508 in wxPGGlobalVarsClassManager::~wxPGGlobalVarsClassManager() () from /usr/lib/libcodeblocks.so.0
#3  0x00007ffff485aa25 in __cxa_finalize () from /lib/libc.so.6
#4  0x00007ffff7782556 in ?? () from /usr/lib/libcodeblocks.so.0
#5  0x0000000000000076 in ?? ()
#6  0x0000000000000000 in ?? ()
This is related to the wxPG 1.4 and happens only when I build C::B with autotools sysmem.

I'll check that thread. Thanks for the pointer. However the bug I'm mentioning is not wxPG related.

It's the closest thing to a native 64-bit compiler you're going to find. It's configured with build, host, and target system all assigned as x86_64-w64-mingw32. Even the MinGW-w64 project itself doesn't distribute a build with this configuration.

If the fact that the compiler binaries are 32-bit is causing problems for you, I'd definitely like to hear about it.

I have not tried TDM-GCC 64 bit compiler. The issue is not that the compiler binary is 32 bit; issue is resulting C::B 64 bit binary doesn't run. It crashes at startup and GDB doesn't show any useful information. I'll give TDM-GCC a try.


@Biplab: I haven't seen vityan's updated patch on the tracker so I suppose your patch "64bit-13-01-10_v1" is still the last version ?

I had posted another patch on 29/may/2010. That patch is also attached with this post.

If my current build (with wx-2.9.1) is successful, I'll post another patch.



Excellent, I look forward to beta testing it! ;)

As TDragon mentioned, his TDM-GCC is excellent.  It's based on MinGW-w64 and produces native 64-bit binaries.  If you are looking for a native 64-bit gcc, I've also come across this: http://code.google.com/p/mingw-w64-dgn/.

Thanks for the pointer. I'll try them in future.

If my current build successful I'll upload a new binary. You can try that! :)

Edit 1:
Old Patch attached.
« Last Edit: August 18, 2010, 06:02:56 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #32 on: August 18, 2010, 06:01:33 pm »
I've uploaded a new test build to the following link.

Quote
http://www.box.net/shared/qkjyd2yldy

Patch needed to build this is attached with this post.

Please note-
1) hang-on-exit bug is still there. You need to kill it using Task manager.
2) If this build crashes while opening a project / file, disable "Code Completion" plugin and then try again.
3) This build includes only Core plugins.
Be a part of the solution, not a part of the problem.

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building Code::Blocks on Win 64
« Reply #33 on: August 26, 2010, 03:36:26 pm »
1) hang-on-exit bug is still there. You need to kill it using Task manager.
2) If this build crashes while opening a project / file, disable "Code Completion" plugin and then try again.

Ok I did some quick and dirty testing :

=> opening codeblocks (core) project file and contrib plugins workspace causes the application to crash. disabling Code Completion plugin effectively solves the issue. (as mentioned)
=> buling codeblocks (w/ contrib plugins) using the command line works properly. The hang-on-exit bug doesn't apply in this case.
=> running codeblocks in safe mode still harbors the hang-on-exit bug.

I will try to make use of this build for my upcoming project. Will post feedback as I encounter issues.

regards, Billy

ps: I was wondering if the dumpfiles windows provides for crash reports could be of any use... If needed I'll post them too.
(ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #34 on: August 26, 2010, 05:53:20 pm »
ps: I was wondering if the dumpfiles windows provides for crash reports could be of any use... If needed I'll post them too.

Please post them. :)
Be a part of the solution, not a part of the problem.

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building Code::Blocks on Win 64
« Reply #35 on: August 26, 2010, 06:37:19 pm »
Ok here you are.
Those are the crash dumps for both cases (hang-on-exit and opening a project with CC enabled).

I have noticed two more things:
Somehow I managed to close CB without having to force it to close; however it would take about 10secs+ to close and I can't figure out how to reproduce it. Most of the time I still have to kill the program.
Second, CB doesn't crash after re-enabling CC when a project is open. Of course it still doesn't work properly afterwards...

steps to reproduce :
---
A.1:Open CB
A.2:Open the CB project file
Result: Crash
---
B.1:Open CB
B.2:Disable CC-plugin
B.3:Open the CB project file
B.4:Enable CC-plugin
Result: CB stays alive, CC not working
(ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #36 on: August 29, 2010, 07:11:01 am »
Ok here you are.
Those are the crash dumps for both cases (hang-on-exit and opening a project with CC enabled).

Hi Billy,

I can't unzip your crash dumps. Please post them in .7z format or use a zip file version which 7-zip can understand.

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Building Code::Blocks on Win 64
« Reply #37 on: August 29, 2010, 07:57:54 am »
Ok here you are.
Those are the crash dumps for both cases (hang-on-exit and opening a project with CC enabled).

Hi Billy,

I can't unzip your crash dumps. Please post them in .7z format or use a zip file version which 7-zip can understand.

Regards,

Biplab

I can unzip his file with 7z beta version.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building Code::Blocks on Win 64
« Reply #38 on: August 29, 2010, 01:32:32 pm »
effectively, it seems 7-zip beta (9.15) has some backwards compatibility issues...
I re-uploaded the files again but using 7z (bzip2 method). Let me know if it works...
(ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #39 on: August 29, 2010, 04:08:42 pm »
effectively, it seems 7-zip beta (9.15) has some backwards compatibility issues...
I re-uploaded the files again but using 7z (bzip2 method). Let me know if it works...

Thanks a lot. I upgraded 7-zip and then I was able to extract old file.

However I could not extract more info from the crash dumps. I need to run compiled C::B under GDB to get any meaningful trace.
Be a part of the solution, not a part of the problem.

Offline childinsilence

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Building Code::Blocks on Win 64
« Reply #40 on: October 03, 2010, 12:00:16 am »
I've tried to build C::B rev. 6661 on Win7 x64 wit TDM64-GCC 4.5.1.
All seems fine till the make reaches SqPlus. Then I get:
Code
g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE  -fno-inline  -std=c++0x -Wall   -I.\include -ID:\Daten\Stefan\Tools\WxWidgets\wxWidgets-2.9.1\contrib\include -I.\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude\scripting\include -Iinclude\scripting\sqplus  -c D:\Daten\Stefan\Entwicklung\codeblocks\trunk\src\sdk\scripting\sqplus\SquirrelBindingsUtilsWin32.cpp -o .objs\sdk\scripting\sqplus\SquirrelBindingsUtilsWin32.o
In file included from c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/windows.h:62:0,
                 from include\scripting\sqplus/SquirrelBindingsUtilsWin32.h:7,
                 from D:\Daten\Stefan\Entwicklung\codeblocks\trunk\src\sdk\scripting\sqplus\SquirrelBindingsUtilsWin32.cpp:5:
c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/windef.h:105:13: error: conflicting declaration 'typedef int BOOL'
include\scripting\sqplus/sqplus.h:54:21: error: 'BOOL' has a previous declaration as 'typedef SQInteger BOOL'
c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.1/../../../../x86_64-w64-mingw32/include/windef.h:132:13: error: conflicting declaration 'typedef int INT'
include\scripting\sqplus/sqplus.h:55:21: error: 'INT' has a previous declaration as 'typedef SQInteger INT'

I think there is a problem with the inclusion order and the different sizes. SQInteger is typedefed to __int64 not to int.

Offline daniloz

  • Regular
  • ***
  • Posts: 268
Re: Building Code::Blocks on Win 64
« Reply #41 on: February 28, 2011, 08:52:43 pm »
Just a ping...

Any news on building C::B on Win 64. I've just tried on win7 with wxWidgets 2.9.11 and I'm still hitting the SQPlus redefinition of BOOL and INT. Even after applying the patch I've found in "some post I don't remember anymore" (I'll try to provide a link here), I hit an error when compiling cbauibook.cpp, related to ProcessEvent... sorry, I don't have the log and no access to my win7 computer right now... But wanted to see if anyone has done it, anyway...

Any help is much appreciated.

Thx,
daniloz

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #42 on: January 31, 2012, 05:40:08 am »
First of all, sorry for the delay in updating this thread and keeping you all up to date.

I have updated my patches to trunk and posted a new build at the following link. Patch required to build is added to the binary package and as well as also attached to this post. Grab it from the following link and let me know how it works.

Quote
http://www.box.com/s/dyh4yenh2byrgig4dpuv

Important notes:
1) CC freezes while parsing. So disable it until this is fixed.
2) Some quick testing shows "Crash-on-exit" problem is gone (with CC disabled).
3) Doesn't include any Contrib plugins.
4) Crash handler exchndl.dll is omitted as the code is broken under Win 64 bit. So if you are interested in debugging it, let me know - I'll post a build with Debugging information.
Be a part of the solution, not a part of the problem.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Building Code::Blocks on Win 64
« Reply #43 on: January 31, 2012, 07:15:44 am »
Quote
http://www.box.com/s/dyh4yenh2byrgig4dpuv
VERY NICE, Biplab!

I've done a lot of work in that direction, too. I'll try to integrate both of our works.

1) CC freezes while parsing. So disable it until this is fixed.
2) Some quick testing shows "Crash-on-exit" problem is gone (with CC disabled).
3) Doesn't include any Contrib plugins.
4) Crash handler exchndl.dll is omitted as the code is broken under Win 64 bit. So if you are interested in debugging it, let me know - I'll post a build with Debugging information.
Concerning 1.): I guess I've fixed this. Because it does not happen on my machine anymore.
Concerning 2.): Good to know - was it related to the Pushing 7 Popping of the event handlers, too?
Concerning 3.): I have *some* working already. But it's a pain to need another project file all the time (at least for me).
Concerning 4.): I did some work in that direction, that it will at least compile, but still not work., :-(

BTW: Did you try on Linux, too?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #44 on: January 31, 2012, 07:52:49 am »
I've done a lot of work in that direction, too. I'll try to integrate both of our works.

Good to know that. You can send me patches and I'll incorporate them & test.

Concerning 1.): I guess I've fixed this. Because it does not happen on my machine anymore.
Concerning 2.): Good to know - was it related to the Pushing 7 Popping of the event handlers, too?
Concerning 3.): I have *some* working already. But it's a pain to need another project file all the time (at least for me).
Concerning 4.): I did some work in that direction, that it will at least compile, but still not work., :-(

BTW: Did you try on Linux, too?
1) That's good news. Send / commit a patch.
2) Yes. It was related to that.
3) I'll compile them and fix if patch is necessary.
4) Awaiting your patch.

And, I didn't try it on Linux. :)
Be a part of the solution, not a part of the problem.