Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Bonanza on December 26, 2008, 01:17:04 am

Title: Problem building CodeBlocks nightly Rev 5322 from scratch
Post by: Bonanza on December 26, 2008, 01:17:04 am
Hi,

As part of some plugin development I tried to compile and execute Nightly 26. November Rev 5322 from scatch.

But the executeable i build crashes upon execution.

This was all done on a WinXP machine with Service pack 3.

Here is what i did:
1. Downloaded and installed wxWidgets 2.8.9
2. Compiled a wxWidgets dll using this command:  mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
3. Set up a SVN view using tortoise SVN pointing to codeblocks trunk.
4. Switch SVN view to Revision 5322 + did an SVN update on highest folder structure.
5. Loaded Codeblocks.cbp into codeblocks and did a rebuild workspace.
6. Loaded  Contrib workspace and did a rebuild workspace.
7. Ran the update.bat file to get the ressources packed.

I used the MinGW GCC 4.2.1 compiler form this location:
http://sourceforge.net/project/showfiles.php?group_id=173460 (http://sourceforge.net/project/showfiles.php?group_id=173460)

When executing my build version of CodeBlocks I get this crash:
Code
C:\Appz\codeblocks\src\output\codeblocks.exe caused an Access Violation at location 6287cd8c in module C:\Appz\codeblocks\src\output\wxmsw28u_gcc_custom.dll Reading from location e704094f.

Registers:
eax=07bce568 ebx=07bce568 ecx=e70408ff edx=e70408ff esi=07bce568 edi=000000d9
eip=6287cd8c esp=0022f8c0 ebp=0022f938 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010206

Call stack:
6287CD8C  C:\Appz\codeblocks\src\output\wxmsw28u_gcc_custom.dll:6287CD8CDwarf Error: found dwarf version '16897', this reader only handles version 2 information.Dwarf Error: found dwarf version '768', this reader only handles version 2 information.Dwarf Error: found dwarf version '30839', this reader only handles version 2 information.  _ZN10wxMenuBase8UpdateUIEP12wxEvtHandler
627F95EB  C:\Appz\codeblocks\src\output\wxmsw28u_gcc_custom.dll:627F95EB  _ZNK7wxFrame19GetClientAreaOriginEv
627F9511  C:\Appz\codeblocks\src\output\wxmsw28u_gcc_custom.dll:627F9511  _ZN7wxFrame15DoSetClientSizeEii
00454B94  C:\Appz\codeblocks\src\output\codeblocks.exe:00454B94-------------------

I have no idea what I a am doing wrong. Any help would really be appreciated.
Thanks Flemming

...I keep hearing myself praise codeblocks:-)...
Title: Re: Problem building CodeBlocks nightly Rev 5322 from scratch
Post by: stahta01 on December 26, 2008, 02:46:41 am
Here is what i did:
1. Downloaded and installed wxWidgets 2.8.9
2. Compiled a wxWidgets dll using this command:  mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
3. Set up a SVN view using tortoise SVN pointing to codeblocks trunk.
4. Switch SVN view to Revision 5322 + did an SVN update on highest folder structure.
5. Loaded Codeblocks.cbp into codeblocks and did a rebuild workspace.
6. Loaded  Contrib workspace and did a rebuild workspace.
7. Ran the update.bat file to get the ressources packed.

I used the MinGW GCC 4.2.1 compiler form this location:
http://sourceforge.net/project/showfiles.php?group_id=173460 (http://sourceforge.net/project/showfiles.php?group_id=173460)


Try skipping building Contrib workspace; till you can get the base Code::Blocks build working.
Note: Building Contrib requires global variable "cb" to be set correctly.

I would also not use "MinGW GCC 4.2.1"; I know the Code::Blocks dev does, but I trust MinGW 3.4.5 version (mingw-vista special r3) better. And, the "MinGW GCC 4.2.1" gives bad crash reports.

Then, I would suggest using TDM GCC version 4.2.4-tdm-1; can be found on
http://www.tdragon.net/recentgcc/
This tests your stuff can be built by people using "MinGW GCC 4.2.x".

My own build steps

1. Download wxWidgets source code
2. Compiled wxWidgets dll using this command: 
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
3. Set up a SVN view using tortoise SVN pointing to codeblocks trunk.
4. Use tortoise SVN "Update to revision"; input revision number
5a. Copy the wxWidgets dll created in step 2 to the devel folder.
5b. Copy the mingwm10.dll from your MinGW bin folder to the devel folder.
5c. delete the contents of the devel folder except for "mingwm10.dll" and wxWidgets DLL
5d. Loaded Codeblocks.cbp into codeblocks and do a rebuild workspace.
6a. verify global variable "cb" points to correct location
6b. delete the "output" folder.
6c. Ran the update.bat; Some Contrib require the directory structure to exist in the "output" folder.
6d. Loaded  Contrib workspace and do a rebuild workspace.
7. Ran the update.bat file to get the resources packed.