MinGW Build failure -undefined reference to '_Unwind_Resume'

MinGW Build failure -undefined reference to '_Unwind_Resume'

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

MinGW Build failure -undefined reference to '_Unwind_Resume'

Post by SpliFF »

Code: Select all

Linking CXX executable ..\..\..\spring.exe
cd /d C:\Builds\spring\rts\builds\default && "C:\Apps\CMake 2.8\bin\cmake.exe" -E cmake_link_script CMakeFiles\engine-default.dir\link.txt --verbose=1
"C:\Apps\CMake 2.8\bin\cmake.exe" -E remove -f CMakeFiles\engine-default.dir/objects.a
C:\CodeBlocks\MinGW\bin\ar.exe cr CMakeFiles\engine-default.dir/objects.a @CMakeFiles\engine-default.dir\objects1.rsp
C:\CodeBlocks\MinGW\bin\g++.exe   -mwindows            -march=i686 -msse -mfpmath=sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a -mno-avx -mno-fma -mno-fma4 -mno-xop -mno-lwp -mno-avx2 -fsingle-precision-constant -frounding-math -mieee-fp -pipe -fno-strict-aliasing   -mthreads  -O2      -DNDEBUG -g        -Wl,--enable-auto-import -Wl,--large-address-aware -Wl,--whole-archive CMakeFiles\engine-default.dir/objects.a -Wl,--no-whole-archive  -o ..\..\..\spring.exe -Wl,--out-implib,libspring.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -lmingw32 C:\GitHub\mingwlibs\dll\SDL.dll C:\GitHub\mingwlibs\lib\libSDLmain.a -lopengl32 -lglu32 C:\GitHub\mingwlibs\dll\glew32.dll C:\GitHub\mingwlibs\dll\freetype6.dll ..\..\lib\squish\libsquish.a ..\..\lib\rg-etc1\librgetc1.a ..\..\System\Sound\libsound.a C:\GitHub\mingwlibs\lib\libdevil.a C:\GitHub\mingwlibs\lib\libboost_regex-mt.a C:\GitHub\mingwlibs\lib\libboost_program_options-mt.a C:\GitHub\mingwlibs\lib\libboost_signals-mt.a C:\GitHub\mingwlibs\lib\libboost_system-mt.a ..\..\lib\7z\lib7zip.a ..\..\lib\minizip\libminizip.a C:\GitHub\mingwlibs\dll\zlib1.dll ..\..\lib\lua\liblua.a ..\..\lib\luasocket\libluasocket.a ..\..\System\FileSystem\Archives\libarchives.a ..\..\lib\streflop\libstreflop.a ..\..\lib\assimp\code\libassimp.a C:\GitHub\mingwlibs\lib\libboost_chrono-mt.a -limagehlp -lws2_32 -lwinmm -lmingw32 C:\GitHub\mingwlibs\lib\libboost_thread-mt.a C:\GitHub\mingwlibs\lib\libboost_chrono-mt.a -limagehlp -lws2_32 -lwinmm C:\GitHub\mingwlibs\lib\libboost_thread-mt.a C:\GitHub\mingwlibs\dll\vorbisfile.dll C:\GitHub\mingwlibs\dll\vorbis.dll C:\GitHub\mingwlibs\dll\ogg.dll C:\GitHub\mingwlibs\dll\OpenAL32.dll -lmingw32 C:\GitHub\mingwlibs\dll\SDL.dll C:\GitHub\mingwlibs\lib\libSDLmain.a ..\..\lib\7z\lib7zip.a ..\..\lib\minizip\libminizip.a C:\GitHub\mingwlibs\dll\zlib1.dll -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.text+0x140): undefined reference to `_Unwind_Resume'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.text+0x1c4): undefined reference to `_Unwind_Resume'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.text+0x2d1): undefined reference to `_Unwind_Resume'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.text+0x2e2): undefined reference to `_Unwind_Resume'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.text$_ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorINS_11regex_errorEEEE7rethrowEv[__ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorINS_11regex_errorEEEE7rethrowEv]+0xb5): undefined reference to `_Unwind_Resume'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.text$_ZN5boost16exception_detail19error_info_injectorINS_11regex_errorEED1Ev[__ZN5boost16exception_detail19error_info_injectorINS_11regex_errorEED1Ev]+0x44): more undefined references to `_Unwind_Resume' follow
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.eh_frame+0x9f): undefined reference to `__gxx_personality_v0'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.eh_frame$_ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorINS_11regex_errorEEEE7rethrowEv+0x13): undefined reference to `__gxx_personality_v0'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.eh_frame$_ZN5boost16exception_detail19error_info_injectorINS_11regex_errorEED1Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.eh_frame$_ZN5boost16exception_detail19error_info_injectorISt13runtime_errorED0Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\GitHub\mingwlibs\lib\libboost_regex-mt.a(regex.o):regex.cpp:(.eh_frame$_ZN5boost16exception_detail10clone_implINS0_19error_info_injectorISt11logic_errorEEED1Ev+0x13): undefined reference to `__gxx_personality_v0'
...
Process terminated with status 2 (25 minutes, 1 seconds)
50 errors, 1 warnings (25 minutes, 1 seconds)
I seem to remember this being related to the types of debugging symbols used when the mingwlibs are built. I'm using the MinGW version that's included with code::blocks

Code: Select all

C:\GitHub\spring>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/lto-wra
pper.exe
Target: mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-languages=c,c++,ada,fortran,objc,obj-c++ --enablethreads=win32 --enable-libgomp --enable-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disable-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections-fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm-1)
Do I need a different version of MinGW or is this something else?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: MinGW Build failure -undefined reference to '_Unwind_Res

Post by jK »

you need a dwarf2 build of mingw/gcc
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: MinGW Build failure -undefined reference to '_Unwind_Res

Post by SpliFF »

Thanks. I replaced my C:\CodeBlocks\MinGW directory with an official version compiled --with-dwarf2 and it builds now.
Post Reply

Return to “Help & Bugs”