[stacktrace] 1.65.0 RC1 fails to build for MSYS2/mingw-w64

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[stacktrace] 1.65.0 RC1 fails to build for MSYS2/mingw-w64

Boost - Dev mailing list
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/6e5976af8c63de93bec761261e4ddcbed17b1649/boost.sh
; 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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [stacktrace] 1.65.0 RC1 fails to build for MSYS2/mingw-w64

Boost - Dev mailing list
2017-08-07 2:30 GMT+03:00 Stephan Lavavej via Boost <[hidden email]>:
> 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/6e5976af8c63de93bec761261e4ddcbed17b1649/boost.sh
> ; 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/21830e11ff5ee114c0c6d9fbf9f3b48b7b067e18/include/boost/config/compiler/gcc.hpp#L307-L310

Fixed it here: https://github.com/boostorg/stacktrace/commit/cd420b37ae7e84196cdb8202e489d5d276c55f0b
Do not forget to add --reconfigure while running you b2 with the patch
from above.

--
Best regards,
Antony Polukhin

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [stacktrace] 1.65.0 RC1 fails to build for MSYS2/mingw-w64

Boost - Dev mailing list
2017-08-08 1:19 GMT+03:00 Antony Polukhin <[hidden email]>:
<...>
> Fixed it here: https://github.com/boostorg/stacktrace/commit/cd420b37ae7e84196cdb8202e489d5d276c55f0b

And here too https://github.com/boostorg/stacktrace/commit/b84d6533f5c5f0a2b2737c6511ecd602a957cd95
You could just take the right version from here:
https://raw.githubusercontent.com/boostorg/stacktrace/b84d6533f5c5f0a2b2737c6511ecd602a957cd95/build/has_windbg_cached.cpp

--
Best regards,
Antony Polukhin

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Loading...