Author Topic: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0  (Read 22301 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
This a work in Progress

I am working on adding the Patches needed to Build Code::Blocks linking against the soon to be released,
wxWidgets 2.9.0 development build.

Tim S

Current Status is: 3. Code::Blocks Opens and Closes without crashing using safe-mode option

The Status Testing:
Code: [Select]
1. Code::Blocks Source Code Compilers and Links against wxWidgets 2.9.0 with POD Warnings
2. Code::Blocks Source Code Compilers and Links against wxWidgets 2.9.0 with-out POD Warnings
3. Code::Blocks Opens and Closes without crashing using safe-mode option
4. Code::Blocks Opens and Closes without crashing without using safe-mode option
5. Code::Blocks Compiles Itself.


Types of Patches
Code: [Select]
1. Code::Blocks Design Change Patches
2. Code::Blocks Implementation Change Patches
3. wxWidgets 2.9 required POD Warning Fixes Patches
4. wxWidgets 2.9 required design Change Patches
5. wxWidgets 2.9 optional deprecation Change Patches
« Last Edit: May 03, 2009, 03:51:21 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #1 on: May 03, 2009, 04:08:15 am »
I've committed a large number of patches to trunk in this regard. I've patched most of the core plugins (will patch today). Now Code::Blocks compiles without warnings. However, Compiler & Code-Completion plugins are creating runtime issues. I'm Investigating them. You can have a look at the patches and let me know if anything differs from your patch. :)
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #2 on: May 03, 2009, 04:16:07 am »
I've committed a large number of patches to trunk in this regard. I've patched most of the core plugins (will patch today). Now Code::Blocks compiles without warnings. However, Compiler & Code-Completion plugins are creating runtime issues. I'm Investigating them. You can have a look at the patches and let me know if anything differs from your patch. :)

That explains why my patches needed updating; last updated them about two months ago.

The Compiler is likely crashing because it is trying to open an GUI window before the GUI event handler is finished being initialized. Never, took the time to trace the cause; was hoping it would go away before 2.9.0 release, but not going to happen.

Tim S
« Last Edit: May 03, 2009, 04:27:48 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #3 on: May 03, 2009, 04:52:56 am »
Command, I Used, to build wxWidgets 2.9.0 RC2
http://biolpc22.york.ac.uk/pub/2.9.0-rc2/

Still Testing These Options, but should work.

While working on Patches to Source Code will be using wxUSE_STC=0 and USE_STC=0 to avoid Build Errors because of two wxscintilla libs.


Code: [Select]
mingw32-make -f makefile.gcc USE_PROPGRID=1 USE_OPENGL=0 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 CPPFLAGS="-Wmissing-include-dirs"

Optional: CPPFLAGS="-Wmissing-include-dirs"
Required: CXXFLAGS="-fno-strict-aliasing"
Not Certain: LDFLAGS="-enable-stdcall-fixup"

Required for wxSmith: USE_PROPGRID=1

Patch to Code::Blocks needed if NOT wxUSE_STC=0 and USE_STC=0
Edit: Changed Patch to see if this one works better, than last one.
Code: [Select]
Patch Fails to work too often to be maintained.
« Last Edit: October 25, 2009, 09:33:29 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #4 on: May 03, 2009, 05:53:21 am »
Command, I Used, to build wxWidgets 2.9.0 RC2

Still Testing These Options, but should work.

Code: [Select]
mingw32-make -f makefile.gcc USE_PROPGRID=1 USE_OPENGL=0 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 LDFLAGS="-enable-stdcall-fixup" CXXFLAGS="-fno-strict-aliasing" CPPFLAGS="-Wmissing-include-dirs"

Optional: CPPFLAGS="-Wmissing-include-dirs"
Required: CXXFLAGS="-fno-strict-aliasing"
Not Certain: LDFLAGS="-enable-stdcall-fixup"

Required for wxSmith: USE_PROPGRID=1


Didn't notice that RC2 is out.

I did build wx without the required CXXFLAGS. Will download RC2 later and use it to build C::B.
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #5 on: May 03, 2009, 06:07:28 am »
My Patch for Core Code::Blocks non-POD type warnings is to change c_str() to wx_str() this needs tested on more systems I have only tested On Windows XP. An wxWidget's person said this is not a fix that can work everywhere, but it is the simplest one I found for windows.
 
Tim S

Quote
warning: cannot pass objects of non-POD type ...
call will abort at runtime

This patch needs Tested under Linux to confirm it works
Code: [Select]
Deleted patch to save space.
« Last Edit: June 19, 2009, 01:55:05 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #6 on: May 03, 2009, 06:19:11 am »
First Patch needed to get Core Code::Blocks to Compile using wxWidgets 2.9.0 and MinGW GCC 4.40

Code: [Select]
Deleted to save space.
« Last Edit: June 19, 2009, 01:55:48 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #7 on: May 03, 2009, 06:30:54 am »

Didn't notice that RC2 is out.

I did build wx without the required CXXFLAGS. Will download RC2 later and use it to build C::B.

At one time, under windows GCC 4.x the wxWidgets would have runtime crashes if
CXXFLAGS="-fno-strict-aliasing" was not done. It might be fixed in wxWidgets or MinGW GCC 4.x.

Link to wxWidgets RC2
http://biolpc22.york.ac.uk/pub/2.9.0-rc2/

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #8 on: May 03, 2009, 07:30:40 am »
Tim,

I've already have those patches applied. I didn't commit yesterday as it was quite late night. I'd request you to wrap your patches with wxCHECK_VERSION() so that we don't break existing compatibility with wx-2.8.x.

Edit 1: Some of the patches are already in trunk. I'll commit the rest when Berlios is up.

Thanks for your good work and keep posting patches. :)

Regards,

Biplab
« Last Edit: May 03, 2009, 07:35:37 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #9 on: May 03, 2009, 07:54:19 am »
Tim,

I've already have those patches applied. I didn't commit yesterday as it was quite late night. I'd request you to wrap your patches with wxCHECK_VERSION() so that we don't break existing compatibility with wx-2.8.x.

Edit 1: Some of the patches are already in trunk. I'll commit the rest when Berlios is up.

Thanks for your good work and keep posting patches. :)

Regards,

Biplab

FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.

Once, I get the patches that break wxWidgets 2.8 will wrap with wxCHECK_VERSION().
Note, I will only be checking, against wxWidgets 2.8.4, after I get Code::Blocks Core to compile and Link; still working on that.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #10 on: May 03, 2009, 08:27:19 am »
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.

But the docs say otherwise. As per the docs, wx_str() is not defined for wx-2.8.x series. Yes, the return value is of same type.
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #11 on: May 03, 2009, 09:00:03 am »
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.

But the docs say otherwise. As per the docs, wx_str() is not defined for wx-2.8.x series. Yes, the return value is of same type.

The header file has it in it. It was depreciated, I am guessing, when the 2.0 series was released.

I can add guards but they are not really needed.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6639
    • My Best Post
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #12 on: May 03, 2009, 10:59:49 am »
@Biplab:

Possible method to add wx_str().

Does the following method meet with your OK?

Code: [Select]
Deleted to save space
« Last Edit: June 19, 2009, 01:56:44 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #13 on: May 03, 2009, 05:00:23 pm »
At one time, under windows GCC 4.x the wxWidgets would have runtime crashes if
CXXFLAGS="-fno-strict-aliasing" was not done. It might be fixed in wxWidgets or MinGW GCC 4.x.
FYI, this was only true for the 4.2 series; it has been fixed as of the 4.3 series.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: [Work In Progress] Patches to Compile C::B against wxWidgets 2.9.0
« Reply #14 on: May 03, 2009, 05:39:39 pm »
@Biplab:

Possible method to add wx_str().

Does the following method meet with your OK?

I'd prefer to have relevant code guarded with wxCHECK_VERSION. I'd prefer not to use prep.h for this.

FYI, I've patched most of the Core and Core Plugin code to ensure that build works fine. There are still many areas where I've missed out (as compiler didn't emit any warning).
Be a part of the solution, not a part of the problem.