Boost logo

Boost :

Subject: Re: [boost] [stacktrace] Not working on Cygwin
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2017-09-06 12:25:28


On 09/06/2017 01:36 AM, Antony Polukhin via Boost wrote:
> 2017-09-03 20:52 GMT+03:00 Phil Bouchard via Boost <boost_at_[hidden]>:
>> Hi,
>>
>> I tried stacktrace on Cygwin and after tweaking some local and system
>> headers I was able to compile libboost_stacktrace_windbg.a and
>> libboost_stacktrace_addr2line.a but when I run my application calls to
>> boost::stacktrace::stacktrace(1, 1) doesn't output anything.
>>
>> It works fine under Linux using libboost_stacktrace_backtrace.a.
>
> Thanks for the issue report!
>
> What headers have you changed in what manner? What version of Cygwin
> do you have and were did you downloaded it?

Basically I have installed the latest Cygwin and:

- There is a missing boost/stacktrace/detail/push_options.pp

- There is a missing boost/stacktrace/detail/pop_options.pp

- I had to change the scope of GetModuleFileNameA in:
stacktrace/detail/location_from_symbol.hpp:
if (!GetModuleFileNameA(handle, file_name_, DEFAULT_PATH_SIZE_))

- I had to change some __POSIX_VISIBLE macros in the system header files
to enable some functions:
/usr/include/stdio.h:337:#if 1//__POSIX_VISIBLE
/usr/include/sys/signal.h:177:#if 1//__POSIX_VISIBLE
/cygwin64/usr/include/sys/unistd.h:292:#if 1//__BSD_VISIBLE ||
__POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4

Thanks,
-Phil


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk