-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSGPACK_ENABLE_GCC_CXX_ATOMIC - Failed #905
Comments
Yes. since C++11, msgpack-c uses msgpack-c/include/msgpack/v1/unpack.hpp Lines 257 to 264 in 6598c62
For C++03, msgpack-c provides msgpack-c/include/msgpack/sysdep.hpp Lines 44 to 69 in 6598c62
https://github.com/msgpack/msgpack-c/blob/6598c6228fb9ce798a7bc1e6300cc8af514af0a7/include/msgpack/gcc_atomic.hpp However the top level CMakeLists.txt always check it. And outputs Is that right ? If it is, the problem is not so critical but msgpack-c shouldn't output misleading message at the cmake process. |
Added compiler version cheking for atomic test for older compilers on cmake.
#906 should fix the issue. |
#906 merged. |
When running
cmake
on thecpp_master
branch on Ubuntu 18.04 I get aThe test code in
CMakeLists.txt
readsThe culprit is that since quite some time the header is under
Looking through some old systems is see that
bits/atomicity.h
ext/atomicity.h
so the transition was somewhere between gcc 4.1.1 and 4.6.3. Ubuntu 18.04 has
gcc version 7.5.0
The code compiles and tests without
atomicity.h
, hard to judge whether there are performance impacts.In case atomic actions are important, it seems to me that
std::atomic
is the natural choice these days.In closing the steps to reproduce (on an Ubuntu 18.04 system, likely on all current Ubuntu/Debian systems):
The text was updated successfully, but these errors were encountered: