mingw-w64 g++ terminates unexpectly during the compilation of wxWidgets












0















I used cmake to generate MinGW makefiles to compile wxWidgets. An error was occurred during the process of make (with VERBOSE=1):



[ 12%] Building CXX object libs/base/CMakeFiles/base.dir/__/__/__/src/common/appbase.cpp.obj
cd /d C:UsersfrankDocumentsCodeswxWidgetscmakebuildlibsbase && C:PROGRA~1MinGWbinG__~1.EXE -DDLL_EXPORTS -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase311u_gcc_custom -DWXMAKINGDLL_BASE -DWX_PRECOMP -D_LIB -D_UNICODE -D__WXMSW__ -Dbase_EXPORTS -DwxUSE_BASE=1 -DwxUSE_GUI=0 @CMakeFiles/base.dir/includes_CXX.rsp -Winvalid-pch -include "C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx" -o CMakeFilesbase.dir______srccommonappbase.cpp.obj -c C:UsersfrankDocumentsCodeswxWidgetssrccommonappbase.cpp

make[2]: *** [libsbaseCMakeFilesbase.dirbuild.make:93: libs/base/CMakeFiles/base.dir/__/__/__/src/common/appbase.cpp.obj] Error 1
make[2]: Leaving directory 'C:/.../cmakebuild'
make[1]: *** [CMakeFilesMakefile2:469: libs/base/CMakeFiles/base.dir/all] Error 2
make[1]: Leaving directory 'C:/.../cmakebuild'
make: *** [Makefile:129: all] Error 2


(I've replaced the wxWidgets source path to ...)



I re-ran the the command:



C:PROGRA~1MinGWbinG__~1.EXE  -DDLL_EXPORTS -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase311u_gcc_custom -DWXMAKINGDLL_BASE -DWX_PRECOMP -D_LIB -D_UNICODE -D__WXMSW__ -Dbase_EXPORTS -DwxUSE_BASE=1 -DwxUSE_GUI=0 @CMakeFiles/base.dir/includes_CXX.rsp   -Winvalid-pch -include "C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx"  -o CMakeFilesbase.dir______srccommonappbase.cpp.obj -c C:...srccommonappbase.cpp


But I received no output. I appended -v after the command, and here is the output:



Using built-in specs.
COLLECT_GCC=C:PROGRA~1MinGWbinG__~1.EXE
Target: x86_64-w64-mingw32
Configured with: ../src/configure --enable-languages=c,c++ --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-multilib --prefix=/c/temp/gcc/dest --with-sysroot=/c/temp/gcc/dest --disable-libstdcxx-pch --disable-libstdcxx-verbose --disable-nls --disable-shared --disable-win32-registry --with-tune=haswell --enable-threads=posix --enable-libgomp
Thread model: posix
gcc version 7.3.0 (GCC)
COLLECT_GCC_OPTIONS='-D' 'DLL_EXPORTS' '-D' 'UNICODE' '-D' 'WXBUILDING' '-D' 'WXDLLNAME=wxbase311u_gcc_custom' '-D' 'WXMAKINGDLL_BASE' '-D' 'WX_PRECOMP' '-D' '_LIB' '-D' '_UNICODE' '-D' '__WXMSW__' '-D' 'base_EXPORTS' '-D' 'wxUSE_BASE=1' '-D' 'wxUSE_GUI=0' '-I' 'C:/.../cmakebuild/lib/gcc_dll/mswu' '-I' 'C:/.../include' '-I' 'C:/.../src/zlib' '-I' 'C:/.../src/regex' '-Winvalid-pch' '-include' 'C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx' '-o' 'CMakeFilesbase.dir______srccommonappbase.cpp.obj' '-c' '-v' '-mtune=haswell' '-march=x86-64'
c:/progra~1/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1plus.exe -quiet -v -I C:/.../cmakebuild/lib/gcc_dll/mswu -I C:/.../include -I C:/.../src/zlib -I C:/.../src/regex -iprefix c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT -D DLL_EXPORTS -D UNICODE -D WXBUILDING -D WXDLLNAME=wxbase311u_gcc_custom -D WXMAKINGDLL_BASE -D WX_PRECOMP -D _LIB -D _UNICODE -D __WXMSW__ -D base_EXPORTS -D wxUSE_BASE=1 -D wxUSE_GUI=0 -include C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx C:UsersfrankDocumentsCodeswxWidgetssrccommonappbase.cpp -quiet -dumpbase appbase.cpp -mtune=haswell -march=x86-64 -auxbase-strip CMakeFilesbase.dir______srccommonappbase.cpp.obj -Winvalid-pch -version -o C:UsersfrankAppDataLocalTempccF9vVx8.s
GNU C++14 (GCC) version 7.3.0 (x86_64-w64-mingw32)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/x86_64-w64-mingw32"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/backward"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include"
ignoring nonexistent directory "C:/temp/gcc/destC:/temp/gcc/dest/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "C:/temp/gcc/dest/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/.../cmakebuild/lib/gcc_dll/mswu
C:/.../include
C:/.../src/zlib
C:/.../src/regex
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/x86_64-w64-mingw32
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/backward
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/include
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C++14 (GCC) version 7.3.0 (x86_64-w64-mingw32)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 00ba9da796d75deb4f2564304e4a9551


I have no idea what the output above indicates, but if I replace -E instead of -c in the original command, it runs successfully. And if I compile the precompiled source file, it also runs successfully and produces the object file I want.



With this method I can produce the object files and make recognize them, but I can't do this manually for every single object file wxWidgets needs. What problem is this? Is there a way to fix it?



CMake version is 3.13.0-rc3



GNU Make version is 4.2.1



MinGW-W64 G++ version is 7.3.0










share|improve this question

























  • I've temporarily fixed this issue by disabling wxBUILD_PRECOMP in option.cmake of wxWidget. But I still don't know why did g++ exited.

    – P. Lowell
    Nov 23 '18 at 7:15











  • "I used cmake to generate MinGW makefiles to compile wxWidgets" Why? wxWidgets provides de makefile.gcc ready to use with mingw32-make -f makefile.gcc ... Read yourwxdirdocsmswinstall.txt. And take a look at yourwxdirbuildmakefile.gcc and config.gcc, you'll see it's not trivial.

    – Ripi2
    Nov 23 '18 at 13:25













  • @Ripi2 I'm currently learning to use cmake to build stuff, so I followed cmake build guide from the official wiki. I've already built wxWidgets with cmake, but I'm really curious about why g++ crashed.

    – P. Lowell
    Nov 24 '18 at 8:32











  • Use ming32-make with the provided makefile.gcc redirecting the output to a file. See in this file the g++ commands used to compile and build each lib file. Not all commands are the same. Compare with yours.

    – Ripi2
    Nov 24 '18 at 13:43













  • How much RAM do you have? Creating the PCH may require quite a lot of it, so one possibility is just that gcc runs out of memory and crashes. You can check whether this is the case by monitoring RAM usage in the task manager or any other similar tool while it's running.

    – VZ.
    Nov 24 '18 at 14:32
















0















I used cmake to generate MinGW makefiles to compile wxWidgets. An error was occurred during the process of make (with VERBOSE=1):



[ 12%] Building CXX object libs/base/CMakeFiles/base.dir/__/__/__/src/common/appbase.cpp.obj
cd /d C:UsersfrankDocumentsCodeswxWidgetscmakebuildlibsbase && C:PROGRA~1MinGWbinG__~1.EXE -DDLL_EXPORTS -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase311u_gcc_custom -DWXMAKINGDLL_BASE -DWX_PRECOMP -D_LIB -D_UNICODE -D__WXMSW__ -Dbase_EXPORTS -DwxUSE_BASE=1 -DwxUSE_GUI=0 @CMakeFiles/base.dir/includes_CXX.rsp -Winvalid-pch -include "C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx" -o CMakeFilesbase.dir______srccommonappbase.cpp.obj -c C:UsersfrankDocumentsCodeswxWidgetssrccommonappbase.cpp

make[2]: *** [libsbaseCMakeFilesbase.dirbuild.make:93: libs/base/CMakeFiles/base.dir/__/__/__/src/common/appbase.cpp.obj] Error 1
make[2]: Leaving directory 'C:/.../cmakebuild'
make[1]: *** [CMakeFilesMakefile2:469: libs/base/CMakeFiles/base.dir/all] Error 2
make[1]: Leaving directory 'C:/.../cmakebuild'
make: *** [Makefile:129: all] Error 2


(I've replaced the wxWidgets source path to ...)



I re-ran the the command:



C:PROGRA~1MinGWbinG__~1.EXE  -DDLL_EXPORTS -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase311u_gcc_custom -DWXMAKINGDLL_BASE -DWX_PRECOMP -D_LIB -D_UNICODE -D__WXMSW__ -Dbase_EXPORTS -DwxUSE_BASE=1 -DwxUSE_GUI=0 @CMakeFiles/base.dir/includes_CXX.rsp   -Winvalid-pch -include "C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx"  -o CMakeFilesbase.dir______srccommonappbase.cpp.obj -c C:...srccommonappbase.cpp


But I received no output. I appended -v after the command, and here is the output:



Using built-in specs.
COLLECT_GCC=C:PROGRA~1MinGWbinG__~1.EXE
Target: x86_64-w64-mingw32
Configured with: ../src/configure --enable-languages=c,c++ --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-multilib --prefix=/c/temp/gcc/dest --with-sysroot=/c/temp/gcc/dest --disable-libstdcxx-pch --disable-libstdcxx-verbose --disable-nls --disable-shared --disable-win32-registry --with-tune=haswell --enable-threads=posix --enable-libgomp
Thread model: posix
gcc version 7.3.0 (GCC)
COLLECT_GCC_OPTIONS='-D' 'DLL_EXPORTS' '-D' 'UNICODE' '-D' 'WXBUILDING' '-D' 'WXDLLNAME=wxbase311u_gcc_custom' '-D' 'WXMAKINGDLL_BASE' '-D' 'WX_PRECOMP' '-D' '_LIB' '-D' '_UNICODE' '-D' '__WXMSW__' '-D' 'base_EXPORTS' '-D' 'wxUSE_BASE=1' '-D' 'wxUSE_GUI=0' '-I' 'C:/.../cmakebuild/lib/gcc_dll/mswu' '-I' 'C:/.../include' '-I' 'C:/.../src/zlib' '-I' 'C:/.../src/regex' '-Winvalid-pch' '-include' 'C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx' '-o' 'CMakeFilesbase.dir______srccommonappbase.cpp.obj' '-c' '-v' '-mtune=haswell' '-march=x86-64'
c:/progra~1/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1plus.exe -quiet -v -I C:/.../cmakebuild/lib/gcc_dll/mswu -I C:/.../include -I C:/.../src/zlib -I C:/.../src/regex -iprefix c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT -D DLL_EXPORTS -D UNICODE -D WXBUILDING -D WXDLLNAME=wxbase311u_gcc_custom -D WXMAKINGDLL_BASE -D WX_PRECOMP -D _LIB -D _UNICODE -D __WXMSW__ -D base_EXPORTS -D wxUSE_BASE=1 -D wxUSE_GUI=0 -include C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx C:UsersfrankDocumentsCodeswxWidgetssrccommonappbase.cpp -quiet -dumpbase appbase.cpp -mtune=haswell -march=x86-64 -auxbase-strip CMakeFilesbase.dir______srccommonappbase.cpp.obj -Winvalid-pch -version -o C:UsersfrankAppDataLocalTempccF9vVx8.s
GNU C++14 (GCC) version 7.3.0 (x86_64-w64-mingw32)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/x86_64-w64-mingw32"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/backward"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include"
ignoring nonexistent directory "C:/temp/gcc/destC:/temp/gcc/dest/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "C:/temp/gcc/dest/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/.../cmakebuild/lib/gcc_dll/mswu
C:/.../include
C:/.../src/zlib
C:/.../src/regex
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/x86_64-w64-mingw32
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/backward
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/include
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C++14 (GCC) version 7.3.0 (x86_64-w64-mingw32)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 00ba9da796d75deb4f2564304e4a9551


I have no idea what the output above indicates, but if I replace -E instead of -c in the original command, it runs successfully. And if I compile the precompiled source file, it also runs successfully and produces the object file I want.



With this method I can produce the object files and make recognize them, but I can't do this manually for every single object file wxWidgets needs. What problem is this? Is there a way to fix it?



CMake version is 3.13.0-rc3



GNU Make version is 4.2.1



MinGW-W64 G++ version is 7.3.0










share|improve this question

























  • I've temporarily fixed this issue by disabling wxBUILD_PRECOMP in option.cmake of wxWidget. But I still don't know why did g++ exited.

    – P. Lowell
    Nov 23 '18 at 7:15











  • "I used cmake to generate MinGW makefiles to compile wxWidgets" Why? wxWidgets provides de makefile.gcc ready to use with mingw32-make -f makefile.gcc ... Read yourwxdirdocsmswinstall.txt. And take a look at yourwxdirbuildmakefile.gcc and config.gcc, you'll see it's not trivial.

    – Ripi2
    Nov 23 '18 at 13:25













  • @Ripi2 I'm currently learning to use cmake to build stuff, so I followed cmake build guide from the official wiki. I've already built wxWidgets with cmake, but I'm really curious about why g++ crashed.

    – P. Lowell
    Nov 24 '18 at 8:32











  • Use ming32-make with the provided makefile.gcc redirecting the output to a file. See in this file the g++ commands used to compile and build each lib file. Not all commands are the same. Compare with yours.

    – Ripi2
    Nov 24 '18 at 13:43













  • How much RAM do you have? Creating the PCH may require quite a lot of it, so one possibility is just that gcc runs out of memory and crashes. You can check whether this is the case by monitoring RAM usage in the task manager or any other similar tool while it's running.

    – VZ.
    Nov 24 '18 at 14:32














0












0








0








I used cmake to generate MinGW makefiles to compile wxWidgets. An error was occurred during the process of make (with VERBOSE=1):



[ 12%] Building CXX object libs/base/CMakeFiles/base.dir/__/__/__/src/common/appbase.cpp.obj
cd /d C:UsersfrankDocumentsCodeswxWidgetscmakebuildlibsbase && C:PROGRA~1MinGWbinG__~1.EXE -DDLL_EXPORTS -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase311u_gcc_custom -DWXMAKINGDLL_BASE -DWX_PRECOMP -D_LIB -D_UNICODE -D__WXMSW__ -Dbase_EXPORTS -DwxUSE_BASE=1 -DwxUSE_GUI=0 @CMakeFiles/base.dir/includes_CXX.rsp -Winvalid-pch -include "C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx" -o CMakeFilesbase.dir______srccommonappbase.cpp.obj -c C:UsersfrankDocumentsCodeswxWidgetssrccommonappbase.cpp

make[2]: *** [libsbaseCMakeFilesbase.dirbuild.make:93: libs/base/CMakeFiles/base.dir/__/__/__/src/common/appbase.cpp.obj] Error 1
make[2]: Leaving directory 'C:/.../cmakebuild'
make[1]: *** [CMakeFilesMakefile2:469: libs/base/CMakeFiles/base.dir/all] Error 2
make[1]: Leaving directory 'C:/.../cmakebuild'
make: *** [Makefile:129: all] Error 2


(I've replaced the wxWidgets source path to ...)



I re-ran the the command:



C:PROGRA~1MinGWbinG__~1.EXE  -DDLL_EXPORTS -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase311u_gcc_custom -DWXMAKINGDLL_BASE -DWX_PRECOMP -D_LIB -D_UNICODE -D__WXMSW__ -Dbase_EXPORTS -DwxUSE_BASE=1 -DwxUSE_GUI=0 @CMakeFiles/base.dir/includes_CXX.rsp   -Winvalid-pch -include "C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx"  -o CMakeFilesbase.dir______srccommonappbase.cpp.obj -c C:...srccommonappbase.cpp


But I received no output. I appended -v after the command, and here is the output:



Using built-in specs.
COLLECT_GCC=C:PROGRA~1MinGWbinG__~1.EXE
Target: x86_64-w64-mingw32
Configured with: ../src/configure --enable-languages=c,c++ --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-multilib --prefix=/c/temp/gcc/dest --with-sysroot=/c/temp/gcc/dest --disable-libstdcxx-pch --disable-libstdcxx-verbose --disable-nls --disable-shared --disable-win32-registry --with-tune=haswell --enable-threads=posix --enable-libgomp
Thread model: posix
gcc version 7.3.0 (GCC)
COLLECT_GCC_OPTIONS='-D' 'DLL_EXPORTS' '-D' 'UNICODE' '-D' 'WXBUILDING' '-D' 'WXDLLNAME=wxbase311u_gcc_custom' '-D' 'WXMAKINGDLL_BASE' '-D' 'WX_PRECOMP' '-D' '_LIB' '-D' '_UNICODE' '-D' '__WXMSW__' '-D' 'base_EXPORTS' '-D' 'wxUSE_BASE=1' '-D' 'wxUSE_GUI=0' '-I' 'C:/.../cmakebuild/lib/gcc_dll/mswu' '-I' 'C:/.../include' '-I' 'C:/.../src/zlib' '-I' 'C:/.../src/regex' '-Winvalid-pch' '-include' 'C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx' '-o' 'CMakeFilesbase.dir______srccommonappbase.cpp.obj' '-c' '-v' '-mtune=haswell' '-march=x86-64'
c:/progra~1/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1plus.exe -quiet -v -I C:/.../cmakebuild/lib/gcc_dll/mswu -I C:/.../include -I C:/.../src/zlib -I C:/.../src/regex -iprefix c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT -D DLL_EXPORTS -D UNICODE -D WXBUILDING -D WXDLLNAME=wxbase311u_gcc_custom -D WXMAKINGDLL_BASE -D WX_PRECOMP -D _LIB -D _UNICODE -D __WXMSW__ -D base_EXPORTS -D wxUSE_BASE=1 -D wxUSE_GUI=0 -include C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx C:UsersfrankDocumentsCodeswxWidgetssrccommonappbase.cpp -quiet -dumpbase appbase.cpp -mtune=haswell -march=x86-64 -auxbase-strip CMakeFilesbase.dir______srccommonappbase.cpp.obj -Winvalid-pch -version -o C:UsersfrankAppDataLocalTempccF9vVx8.s
GNU C++14 (GCC) version 7.3.0 (x86_64-w64-mingw32)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/x86_64-w64-mingw32"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/backward"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include"
ignoring nonexistent directory "C:/temp/gcc/destC:/temp/gcc/dest/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "C:/temp/gcc/dest/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/.../cmakebuild/lib/gcc_dll/mswu
C:/.../include
C:/.../src/zlib
C:/.../src/regex
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/x86_64-w64-mingw32
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/backward
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/include
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C++14 (GCC) version 7.3.0 (x86_64-w64-mingw32)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 00ba9da796d75deb4f2564304e4a9551


I have no idea what the output above indicates, but if I replace -E instead of -c in the original command, it runs successfully. And if I compile the precompiled source file, it also runs successfully and produces the object file I want.



With this method I can produce the object files and make recognize them, but I can't do this manually for every single object file wxWidgets needs. What problem is this? Is there a way to fix it?



CMake version is 3.13.0-rc3



GNU Make version is 4.2.1



MinGW-W64 G++ version is 7.3.0










share|improve this question
















I used cmake to generate MinGW makefiles to compile wxWidgets. An error was occurred during the process of make (with VERBOSE=1):



[ 12%] Building CXX object libs/base/CMakeFiles/base.dir/__/__/__/src/common/appbase.cpp.obj
cd /d C:UsersfrankDocumentsCodeswxWidgetscmakebuildlibsbase && C:PROGRA~1MinGWbinG__~1.EXE -DDLL_EXPORTS -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase311u_gcc_custom -DWXMAKINGDLL_BASE -DWX_PRECOMP -D_LIB -D_UNICODE -D__WXMSW__ -Dbase_EXPORTS -DwxUSE_BASE=1 -DwxUSE_GUI=0 @CMakeFiles/base.dir/includes_CXX.rsp -Winvalid-pch -include "C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx" -o CMakeFilesbase.dir______srccommonappbase.cpp.obj -c C:UsersfrankDocumentsCodeswxWidgetssrccommonappbase.cpp

make[2]: *** [libsbaseCMakeFilesbase.dirbuild.make:93: libs/base/CMakeFiles/base.dir/__/__/__/src/common/appbase.cpp.obj] Error 1
make[2]: Leaving directory 'C:/.../cmakebuild'
make[1]: *** [CMakeFilesMakefile2:469: libs/base/CMakeFiles/base.dir/all] Error 2
make[1]: Leaving directory 'C:/.../cmakebuild'
make: *** [Makefile:129: all] Error 2


(I've replaced the wxWidgets source path to ...)



I re-ran the the command:



C:PROGRA~1MinGWbinG__~1.EXE  -DDLL_EXPORTS -DUNICODE -DWXBUILDING -DWXDLLNAME=wxbase311u_gcc_custom -DWXMAKINGDLL_BASE -DWX_PRECOMP -D_LIB -D_UNICODE -D__WXMSW__ -Dbase_EXPORTS -DwxUSE_BASE=1 -DwxUSE_GUI=0 @CMakeFiles/base.dir/includes_CXX.rsp   -Winvalid-pch -include "C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx"  -o CMakeFilesbase.dir______srccommonappbase.cpp.obj -c C:...srccommonappbase.cpp


But I received no output. I appended -v after the command, and here is the output:



Using built-in specs.
COLLECT_GCC=C:PROGRA~1MinGWbinG__~1.EXE
Target: x86_64-w64-mingw32
Configured with: ../src/configure --enable-languages=c,c++ --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-multilib --prefix=/c/temp/gcc/dest --with-sysroot=/c/temp/gcc/dest --disable-libstdcxx-pch --disable-libstdcxx-verbose --disable-nls --disable-shared --disable-win32-registry --with-tune=haswell --enable-threads=posix --enable-libgomp
Thread model: posix
gcc version 7.3.0 (GCC)
COLLECT_GCC_OPTIONS='-D' 'DLL_EXPORTS' '-D' 'UNICODE' '-D' 'WXBUILDING' '-D' 'WXDLLNAME=wxbase311u_gcc_custom' '-D' 'WXMAKINGDLL_BASE' '-D' 'WX_PRECOMP' '-D' '_LIB' '-D' '_UNICODE' '-D' '__WXMSW__' '-D' 'base_EXPORTS' '-D' 'wxUSE_BASE=1' '-D' 'wxUSE_GUI=0' '-I' 'C:/.../cmakebuild/lib/gcc_dll/mswu' '-I' 'C:/.../include' '-I' 'C:/.../src/zlib' '-I' 'C:/.../src/regex' '-Winvalid-pch' '-include' 'C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx' '-o' 'CMakeFilesbase.dir______srccommonappbase.cpp.obj' '-c' '-v' '-mtune=haswell' '-march=x86-64'
c:/progra~1/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/7.3.0/cc1plus.exe -quiet -v -I C:/.../cmakebuild/lib/gcc_dll/mswu -I C:/.../include -I C:/.../src/zlib -I C:/.../src/regex -iprefix c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/ -D_REENTRANT -D DLL_EXPORTS -D UNICODE -D WXBUILDING -D WXDLLNAME=wxbase311u_gcc_custom -D WXMAKINGDLL_BASE -D WX_PRECOMP -D _LIB -D _UNICODE -D __WXMSW__ -D base_EXPORTS -D wxUSE_BASE=1 -D wxUSE_GUI=0 -include C:/.../cmakebuild/libs/base/cotire/base_CXX_prefix.hxx C:UsersfrankDocumentsCodeswxWidgetssrccommonappbase.cpp -quiet -dumpbase appbase.cpp -mtune=haswell -march=x86-64 -auxbase-strip CMakeFilesbase.dir______srccommonappbase.cpp.obj -Winvalid-pch -version -o C:UsersfrankAppDataLocalTempccF9vVx8.s
GNU C++14 (GCC) version 7.3.0 (x86_64-w64-mingw32)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/x86_64-w64-mingw32"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/backward"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include"
ignoring nonexistent directory "C:/temp/gcc/destC:/temp/gcc/dest/lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed"
ignoring duplicate directory "c:/progra~1/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "C:/temp/gcc/dest/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/.../cmakebuild/lib/gcc_dll/mswu
C:/.../include
C:/.../src/zlib
C:/.../src/regex
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/x86_64-w64-mingw32
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../include/c++/7.3.0/backward
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/include
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed
c:progra~1mingwbin../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C++14 (GCC) version 7.3.0 (x86_64-w64-mingw32)
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.1.0, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 00ba9da796d75deb4f2564304e4a9551


I have no idea what the output above indicates, but if I replace -E instead of -c in the original command, it runs successfully. And if I compile the precompiled source file, it also runs successfully and produces the object file I want.



With this method I can produce the object files and make recognize them, but I can't do this manually for every single object file wxWidgets needs. What problem is this? Is there a way to fix it?



CMake version is 3.13.0-rc3



GNU Make version is 4.2.1



MinGW-W64 G++ version is 7.3.0







c++ cmake g++ wxwidgets gnu-make






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 6:58







P. Lowell

















asked Nov 23 '18 at 6:43









P. LowellP. Lowell

133




133













  • I've temporarily fixed this issue by disabling wxBUILD_PRECOMP in option.cmake of wxWidget. But I still don't know why did g++ exited.

    – P. Lowell
    Nov 23 '18 at 7:15











  • "I used cmake to generate MinGW makefiles to compile wxWidgets" Why? wxWidgets provides de makefile.gcc ready to use with mingw32-make -f makefile.gcc ... Read yourwxdirdocsmswinstall.txt. And take a look at yourwxdirbuildmakefile.gcc and config.gcc, you'll see it's not trivial.

    – Ripi2
    Nov 23 '18 at 13:25













  • @Ripi2 I'm currently learning to use cmake to build stuff, so I followed cmake build guide from the official wiki. I've already built wxWidgets with cmake, but I'm really curious about why g++ crashed.

    – P. Lowell
    Nov 24 '18 at 8:32











  • Use ming32-make with the provided makefile.gcc redirecting the output to a file. See in this file the g++ commands used to compile and build each lib file. Not all commands are the same. Compare with yours.

    – Ripi2
    Nov 24 '18 at 13:43













  • How much RAM do you have? Creating the PCH may require quite a lot of it, so one possibility is just that gcc runs out of memory and crashes. You can check whether this is the case by monitoring RAM usage in the task manager or any other similar tool while it's running.

    – VZ.
    Nov 24 '18 at 14:32



















  • I've temporarily fixed this issue by disabling wxBUILD_PRECOMP in option.cmake of wxWidget. But I still don't know why did g++ exited.

    – P. Lowell
    Nov 23 '18 at 7:15











  • "I used cmake to generate MinGW makefiles to compile wxWidgets" Why? wxWidgets provides de makefile.gcc ready to use with mingw32-make -f makefile.gcc ... Read yourwxdirdocsmswinstall.txt. And take a look at yourwxdirbuildmakefile.gcc and config.gcc, you'll see it's not trivial.

    – Ripi2
    Nov 23 '18 at 13:25













  • @Ripi2 I'm currently learning to use cmake to build stuff, so I followed cmake build guide from the official wiki. I've already built wxWidgets with cmake, but I'm really curious about why g++ crashed.

    – P. Lowell
    Nov 24 '18 at 8:32











  • Use ming32-make with the provided makefile.gcc redirecting the output to a file. See in this file the g++ commands used to compile and build each lib file. Not all commands are the same. Compare with yours.

    – Ripi2
    Nov 24 '18 at 13:43













  • How much RAM do you have? Creating the PCH may require quite a lot of it, so one possibility is just that gcc runs out of memory and crashes. You can check whether this is the case by monitoring RAM usage in the task manager or any other similar tool while it's running.

    – VZ.
    Nov 24 '18 at 14:32

















I've temporarily fixed this issue by disabling wxBUILD_PRECOMP in option.cmake of wxWidget. But I still don't know why did g++ exited.

– P. Lowell
Nov 23 '18 at 7:15





I've temporarily fixed this issue by disabling wxBUILD_PRECOMP in option.cmake of wxWidget. But I still don't know why did g++ exited.

– P. Lowell
Nov 23 '18 at 7:15













"I used cmake to generate MinGW makefiles to compile wxWidgets" Why? wxWidgets provides de makefile.gcc ready to use with mingw32-make -f makefile.gcc ... Read yourwxdirdocsmswinstall.txt. And take a look at yourwxdirbuildmakefile.gcc and config.gcc, you'll see it's not trivial.

– Ripi2
Nov 23 '18 at 13:25







"I used cmake to generate MinGW makefiles to compile wxWidgets" Why? wxWidgets provides de makefile.gcc ready to use with mingw32-make -f makefile.gcc ... Read yourwxdirdocsmswinstall.txt. And take a look at yourwxdirbuildmakefile.gcc and config.gcc, you'll see it's not trivial.

– Ripi2
Nov 23 '18 at 13:25















@Ripi2 I'm currently learning to use cmake to build stuff, so I followed cmake build guide from the official wiki. I've already built wxWidgets with cmake, but I'm really curious about why g++ crashed.

– P. Lowell
Nov 24 '18 at 8:32





@Ripi2 I'm currently learning to use cmake to build stuff, so I followed cmake build guide from the official wiki. I've already built wxWidgets with cmake, but I'm really curious about why g++ crashed.

– P. Lowell
Nov 24 '18 at 8:32













Use ming32-make with the provided makefile.gcc redirecting the output to a file. See in this file the g++ commands used to compile and build each lib file. Not all commands are the same. Compare with yours.

– Ripi2
Nov 24 '18 at 13:43







Use ming32-make with the provided makefile.gcc redirecting the output to a file. See in this file the g++ commands used to compile and build each lib file. Not all commands are the same. Compare with yours.

– Ripi2
Nov 24 '18 at 13:43















How much RAM do you have? Creating the PCH may require quite a lot of it, so one possibility is just that gcc runs out of memory and crashes. You can check whether this is the case by monitoring RAM usage in the task manager or any other similar tool while it's running.

– VZ.
Nov 24 '18 at 14:32





How much RAM do you have? Creating the PCH may require quite a lot of it, so one possibility is just that gcc runs out of memory and crashes. You can check whether this is the case by monitoring RAM usage in the task manager or any other similar tool while it's running.

– VZ.
Nov 24 '18 at 14:32












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53441781%2fmingw-w64-g-terminates-unexpectly-during-the-compilation-of-wxwidgets%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53441781%2fmingw-w64-g-terminates-unexpectly-during-the-compilation-of-wxwidgets%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'