cucumber / cucumber-cpp

Support for writing Cucumber step definitions in C++
MIT License
308 stars 131 forks source link

Compability with libc: remove -Werror #235

Closed leonardoInf closed 4 years ago

leonardoInf commented 4 years ago

Summary

Compiling cucumber-cpp using Alpine (libc) produces warnings about Boost using wrong imports.

/include/sys/poll.h:1:2: error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror=cpp]

I propose to drop -Werror or otherwise cucumber-cpp will not compile on platforms without glibc.

Types of changes

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.5%) to 62.938% when pulling 44302ddd70c641c6db0b2d1b521511438ceb7569 on leonardoInf:patch-1 into dd424c1a900cb41c5db9d481714eb3471ce195e3 on cucumber:master.

sappo commented 4 years ago

Hi @leonardoInf, would using poll.h instead of sys/poll.h be the bugfix?

Werror prints that message for a reason. Ignoring it by disabling it doesn't seem wise.

leonardoInf commented 4 years ago

Hi @sappo, It´s some internal file from Boost so I do not feel comfortable editing it. I think we should allow warnings to allow builds on different platforms/compilers.

Edit: Someone even made a bugfix for this in 2016, without any reaction so no way I can change anything there: https://lists.boost.org/boost-bugs/2016/08/45917.php

sappo commented 4 years ago

This issue was addressed in boost release 1.65. Could you try to compile cucumber-cpp with that or a newer version.

See boost asio changelog https://github.com/boostorg/asio/blob/d114cff2d264f38f7eafbdbb73a76707dbb99942/doc/history.qbk#L436

leonardoInf commented 4 years ago

Ok, then this PR is not relevant. Thanks for enlightening me :D