Web lists-archives.com

[Bug] __wait_status_to_int() is expected to be a macro




Hi

I'm trying to compile a very simple program:

#include <boost/process.hpp>
int main() { }

And I get the following error:

In file included from /usr/include/boost/process/detail/child_decl.hpp:31:0,
                 from /usr/include/boost/process/child.hpp:21,
                 from /usr/include/boost/process/async_system.hpp:22,
                 from /usr/include/boost/process.hpp:24,
                 from bp.cpp:2:
/usr/include/boost/process/detail/posix/is_running.hpp:18:1: error:
non-constant condition for static assertion
 static_assert(!WIFEXITED(still_active), "Internal Error");
 ^~~~~~~~~~~~~
In file included from /usr/include/cygwin/stdlib.h:13:0,
                 from /usr/include/stdlib.h:26,
                 from
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/include/c++/cstdlib:75,
                 from
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/include/c++/ext/string_conversions.h:41,
                 from
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/include/c++/bits/basic_string.h:6349,
                 from
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/include/c++/string:52,
                 from
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/include/c++/stdexcept:39,
                 from
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/include/c++/system_error:41,
                 from /usr/include/boost/process/detail/config.hpp:21,
                 from /usr/include/boost/process/detail/basic_cmd.hpp:10,
                 from /usr/include/boost/process/args.hpp:33,
                 from /usr/include/boost/process.hpp:22,
                 from bp.cpp:2:
/usr/include/boost/process/detail/posix/is_running.hpp:18:16: error: call
to non-constexpr function 'int __wait_status_to_int(int)'
 static_assert(!WIFEXITED(still_active), "Internal Error");
                ^

As people suggested:
https://stackoverflow.com/questions/50760411/boostprocess-doesnt-work-in-cygwin
it's a bug in /usr/include/sys/wait.h

__wait_status_to_int must be a macros but it's redefined as a function.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple