[stacktrace] 1.65.0 RC1 fails to build for MSYS2/mingw-w64
Hi, I just attempted to build Boost 1.65.0 RC1 with MSYS2/mingw-w64. (My build script for 1.64.0 is available at https://github.com/StephanTLavavej/mingw-distro/blob/6e5976af8c63de93bec7612... ; I just had to change the filenames for 1.65.0 RC1.) The stacktrace build failed with: gcc.compile.c++ bin.v2\libs\stacktrace\build\gcc-mingw-7.1.0\release\link-static\runtime-link-static\threading-multi\windbg_cached.o In file included from libs\stacktrace\build\..\src\windbg_cached.cpp:10:0: ./boost/stacktrace/detail/frame_msvc.ipp:167:72: warning: missing terminating ' character # error Your compiler does not support C++11 thread_local storage. It's impossible to build with BOOST_STACKTRACE_USE_WINDBG_CACHED. ^ ./boost/stacktrace/detail/frame_msvc.ipp:167:5: error: #error Your compiler does not support C++11 thread_local storage. It's impossible to build with BOOST_STACKTRACE_USE_WINDBG_CACHED. # error Your compiler does not support C++11 thread_local storage. It's impossible to build with BOOST_STACKTRACE_USE_WINDBG_CACHED. ^~~~~ In file included from ./boost/detail/winapi/file_management.hpp:17:0, from ./boost/stacktrace/detail/safe_dump_win.ipp:20, from ./boost/stacktrace/safe_dump_to.hpp:206, from ./boost/stacktrace/frame.hpp:20, from ./boost/stacktrace/detail/frame_msvc.ipp:15, from libs\stacktrace\build\..\src\windbg_cached.cpp:10: ./boost/detail/winapi/overlapped.hpp:39:9: warning: ISO C++ prohibits anonymous structs [-Wpedantic] }; ^ "g++" -O3 -finline-functions -Wno-inline -Wall -pedantic -mthreads -m64 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2\libs\stacktrace\build\gcc-mingw-7.1.0\release\link-static\runtime-link-static\threading-multi\windbg_cached.o" "libs\stacktrace\build\..\src\windbg_cached.cpp" ...failed gcc.compile.c++ bin.v2\libs\stacktrace\build\gcc-mingw-7.1.0\release\link-static\runtime-link-static\threading-multi\windbg_cached.o... It appears that frame_msvc.ipp is intended to work with both MSVC and MinGW, but it's not correctly recognizing mingw-w64 GCC 7.1.0's behavior. This compiler supports thread_local, although it doesn't support C++11's multithreading headers (without the pthreads wrapper, which I don't build). Either this library should correctly detect mingw-w64, or it should be disabled for mingw-w64. Thanks, STL
2017-08-07 2:30 GMT+03:00 Stephan Lavavej via Boost
Hi,
I just attempted to build Boost 1.65.0 RC1 with MSYS2/mingw-w64. (My build script for 1.64.0 is available at https://github.com/StephanTLavavej/mingw-distro/blob/6e5976af8c63de93bec7612... ; I just had to change the filenames for 1.65.0 RC1.)
The stacktrace build failed with: <...> It appears that frame_msvc.ipp is intended to work with both MSVC and MinGW, but it's not correctly recognizing mingw-w64 GCC 7.1.0's behavior. This compiler supports thread_local, although it doesn't support C++11's multithreading headers (without the pthreads wrapper, which I don't build).
Ok, I've found out the issue. It's related to MinGW issue with thread_local https://github.com/boostorg/config/blob/21830e11ff5ee114c0c6d9fbf9f3b48b7b06... Fixed it here: https://github.com/boostorg/stacktrace/commit/cd420b37ae7e84196cdb8202e489d5... Do not forget to add --reconfigure while running you b2 with the patch from above. -- Best regards, Antony Polukhin
2017-08-08 1:19 GMT+03:00 Antony Polukhin
Fixed it here: https://github.com/boostorg/stacktrace/commit/cd420b37ae7e84196cdb8202e489d5...
And here too https://github.com/boostorg/stacktrace/commit/b84d6533f5c5f0a2b2737c6511ecd6... You could just take the right version from here: https://raw.githubusercontent.com/boostorg/stacktrace/b84d6533f5c5f0a2b2737c... -- Best regards, Antony Polukhin
participants (2)
-
Antony Polukhin
-
Stephan Lavavej