Author Topic: wxWidgets 2.8.12 Compile Error  (Read 591 times)

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 110
wxWidgets 2.8.12 Compile Error
« on: May 02, 2019, 06:34:27 am »
Following the directions at:
http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows

I removed the C:\TDM-GCC-64\bin; path from Windows 7 PATH variable. I added the paths C:\MinGW\bin;C:\MinGW\mingw32\bin;
I attempted to compile wxWidgets 2.8.12 so that I could compile the latest SVN version of Code::Blocks.

I executed this command sequence in Windows 7's cmd.exe terminal emulator:
Code: [Select]
cd C:\wxMSW-2.8.12\build\msw
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

The compilation ended with this error:
Code: [Select]
process_begin: CreateProcess(NULL, g++ -c -o gcc_mswudll\monodll_dummy.o -O2 -mt
hreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -I..\..\lib\gcc_dll\mswu
-I..\..\include -W -Wall -DWXBUILDING -I..\..\src\tiff -I..\..\src\jpeg -I..\..\
src\png -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib -DwxUSE_BASE=1
-DWXMAKINGDLL -Wno-ctor-dtor-privacy -MTgcc_mswudll\monodll_dummy.o -MFgcc_mswud
ll\monodll_dummy.o.d -MD -MP ../../src/common/dummy.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
makefile.gcc:4717: recipe for target 'gcc_mswudll\monodll_dummy.o' failed
mingw32-make: *** [gcc_mswudll\monodll_dummy.o] Error 2

Where did this go wrong?

Offline Miguel Gimenez

  • Regular
  • ***
  • Posts: 251
Re: wxWidgets 2.8.12 Compile Error
« Reply #1 on: May 02, 2019, 01:57:12 pm »
This happened to me some years ago. IIRC this CreateProcess issue occurs only when you are mixing MSYS and CMD environments. Also recheck your path (you can remove C:\MinGW\mingw32\bin). When changing the path (in the desktop) you must close and reopen the CMD window for the change to take effect.

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxWidgets 2.8.12 Compile Error
« Reply #2 on: May 03, 2019, 03:51:08 am »
I was using CMD aka Window 7's terminal emulator. So I tried it in MSYS. In the MSYS terminal emulator I did this command sequences:
Code: [Select]
export PATH=$PATH:/c/MinGW/bin;
export PATH=$PATH:/c/MinGW/mingw32/bin;
cd C:/wxMSW-2.8.12/build/msw
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

Compilation terminated with the same error.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6506
    • My Best Post
Re: wxWidgets 2.8.12 Compile Error
« Reply #3 on: May 03, 2019, 04:42:17 am »
Have you verified the "g++" command exists?

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 spflanze

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxWidgets 2.8.12 Compile Error
« Reply #4 on: May 03, 2019, 05:36:53 am »
The command:
Code: [Select]
g++ --helpgets the expected response. The error it terminates on appears after many successful executions of the g++ command. So for sure it does exist.

From what I can interpret of the error message there is a file it seems to expect named  dummy.cpp that it cannot find.
« Last Edit: May 03, 2019, 05:44:20 am by spflanze »

Online sodev

  • Regular
  • ***
  • Posts: 255
Re: wxWidgets 2.8.12 Compile Error
« Reply #5 on: May 03, 2019, 05:57:39 am »
The Makefiles have a long outstanding bug that they cant create the required directory structure in the output directory, you have to create it yourself. Out of memory it should be something like mswu[d]\wx\msw in the lib and dll output directory.

Also is there any specific reason why you compile that ancient wxWidgets version?

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxWidgets 2.8.12 Compile Error
« Reply #6 on: May 04, 2019, 02:31:11 am »
I want to compile the ancient wxWidgets version so I can compile a 64 bit Code::Blocks. I decided I should compile a 32 bit version before the additional complication 64 bits.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6506
    • My Best Post
Re: wxWidgets 2.8.12 Compile Error
« Reply #7 on: May 04, 2019, 03:55:55 am »
I want to compile the ancient wxWidgets version so I can compile a 64 bit Code::Blocks. I decided I should compile a 32 bit version before the additional complication 64 bits.

So, you are wasting your time. Note: wxWidgets 2.8.12 is only 32 bit under Windows OS.

NOTE: It is easier to build 64 bit apps than it is to build 32 bit apps.

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 spflanze

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxWidgets 2.8.12 Compile Error
« Reply #8 on: May 04, 2019, 05:21:05 am »
I chose wxWidgets 2.8.12 because that is what Code::Blocks 17.12 (the current stable release) was built with.

Can Code::Blocks be built with a more recent version of wxWidgets, and one with which a 64 bit version of Code::Blocks can be built?

What version of wxWidgets are the Code::Blocks nightly builds being built with?

Online stahta01

  • Lives here!
  • ****
  • Posts: 6506
    • My Best Post
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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2326
Re: wxWidgets 2.8.12 Compile Error
« Reply #10 on: May 05, 2019, 01:53:55 pm »
I compiled wxWidgets endless times on windows and never had a message like this...
Do you have a mix of compilers in your PATH? PATH hygiene is very difficult today, because every compiler puts itself into it...
I for myself remove all compiler paths and add them manualy per cmd if i need to compile something...

Offline spflanze

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxWidgets 2.8.12 Compile Error
« Reply #11 on: May 07, 2019, 05:21:54 am »
http://forums.codeblocks.org/index.php/topic,3299.0.html

I downloaded mingw-w64-install.exe from:
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download

This installation file gives me several options for Version, Architecture, Threads, Exception, and Build revison.

For Version I set the latest version I saw on the page you provided the link for, which is 8.1.0.

For Architecture I set x86_64 because I desire to build a 64 bit Code::Blocks.

Build revision gives me only one choice, which is 0, so that is an easy choice.

I do not know what to choose in the Threads, and Exception, selection boxes. Should these be left at default?

The choices for Threads are posix, and win32. The default is posix.

The choices for Exception is seh, and sjlj. The default is seh.

My OS is a 64 Bit Windows 7.
« Last Edit: May 08, 2019, 01:19:19 am by spflanze »

Online stahta01

  • Lives here!
  • ****
  • Posts: 6506
    • My Best Post
Re: wxWidgets 2.8.12 Compile Error
« Reply #12 on: May 07, 2019, 05:43:13 am »
64 bit normally uses seh for Exception so that is correct; no idea on threading which answer is best for building C::B or wxWidgets.

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 spflanze

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: wxWidgets 2.8.12 Compile Error
« Reply #13 on: May 14, 2019, 06:55:34 am »
I proceeded to install with the default options. After the current version of the dlls were copied to the same directory the codeblocks.exe was in, as instructed here:
http://forums.codeblocks.org/index.php?topic=3232.0
I got svn build rev 11628 released on 2019-04-16 working.

I downloaded the version codeblocks-code-r11687-trunk version from svn. In the Code::Blocks File dialog I went to that version's src directory and found these project files:
Code: [Select]
CodeBlocks.cbp
CodeBlocks_wx30.cbp
CodeBlocks_wx30_64.cbp
CodeBlocks_wx30-unix.cbp
CodeBlocks_wx31.cbp
CodeBlocks_wx31_64.cbp
CodeBlocks-unix.cbp
and their associated workspaces of similar names.

I have 64 bit Windows 7, and I want to develop applications using wxWidgets 3.1.2. So that narrows the choices to:
Code: [Select]
CodeBlocks.cbp
CodeBlocks_wx31_64.cbp
My initial inclination is to use CodeBlocks_wx31_64.cbp. But what is CodeBlocks.cbp there for?

Online sodev

  • Regular
  • ***
  • Posts: 255
Re: wxWidgets 2.8.12 Compile Error
« Reply #14 on: May 14, 2019, 08:15:59 am »
These workspaces and project files are for building CodeBlocks itself and dont limit you what applications you can build with CodeBlocks (except the issues with the debugger which requires a matching architecture).

Luckily these days CodeBlocks works stable with wxWidgets 3.1.x (with my 2 patches that rot on the issue tracker even with all compatibility options disabled) so pick one of these. The untagged variant should be the wxWidgets 2.8 variant.

Offline Miguel Gimenez

  • Regular
  • ***
  • Posts: 251
Re: wxWidgets 2.8.12 Compile Error
« Reply #15 on: May 14, 2019, 08:29:13 am »
The CodeBlocks.cbp project uses wx2.8.12.
If you want to compile C::B with wx3.1.x you must use CodeBlocks_31.cbp or CodeBlocks_31_64.cbp (or the matching workspaces if you want the plugins).
The simplest option is compiling C::B with the same wxWidgets version you will use for your programs.

Beware if using wx3.1.2, you will get crashes with Code Completion if you don't patch wxWidgets.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2326
Re: wxWidgets 2.8.12 Compile Error
« Reply #16 on: May 15, 2019, 05:49:13 pm »
Quote
with my 2 patches that rot on the issue tracker
Sry, can you point to this patches?

Online sodev

  • Regular
  • ***
  • Posts: 255
Re: wxWidgets 2.8.12 Compile Error
« Reply #17 on: May 15, 2019, 08:36:31 pm »
To compile without unsafe string conversions enabled (plus possible crash fix): https://sourceforge.net/p/codeblocks/tickets/687/
To compile without wx 3.0 compatibility enabled (or always in newer revisions, can't remember): https://sourceforge.net/p/codeblocks/tickets/704/

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2326
Re: wxWidgets 2.8.12 Compile Error
« Reply #18 on: May 16, 2019, 08:44:42 am »
To compile without unsafe string conversions enabled (plus possible crash fix): https://sourceforge.net/p/codeblocks/tickets/687/
To compile without wx 3.0 compatibility enabled (or always in newer revisions, can't remember): https://sourceforge.net/p/codeblocks/tickets/704/
Thank you... Will look into them as soon as my new compiler setup is ready