Skip to content
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

make examples failure #285

Open
csflyer opened this issue Aug 26, 2021 · 2 comments
Open

make examples failure #285

csflyer opened this issue Aug 26, 2021 · 2 comments

Comments

@csflyer
Copy link

csflyer commented Aug 26, 2021

[root@VM-229-225-centos ~/news/ft_local/cppkafka/build]# make examples
[ 63%] Built target cppkafka
[ 68%] Built target consumers-information
[ 73%] Built target producer
[ 76%] Building CXX object examples/CMakeFiles/buffered-producer.dir/buffered_producer_example.cpp.o
In file included from /root/news/ft_local/cppkafka/examples/buffered_producer_example.cpp:4:0:
/root/news/ft_local/cppkafka/examples/../include/cppkafka/utils/buffered_producer.h: In instantiation of ‘cppkafka::BufferedProducer<BufferType, Allocator>::BufferedProducer(cppkafka::Configuration, const Allocator&) [with BufferType = std::basic_string; Allocator = std::allocator<cppkafka::ConcreteMessageBuilder<std::basic_string > >]’:
/root/news/ft_local/cppkafka/examples/buffered_producer_example.cpp:66:45: required from here
/root/news/ft_local/cppkafka/examples/../include/cppkafka/utils/buffered_producer.h:603:12: error: use of deleted function ‘std::atomic_flag::atomic_flag(const std::atomic_flag&)’
struct AckMonitor
^
In file included from /usr/include/c++/4.8.2/atomic:41:0,
from /root/news/ft_local/cppkafka/examples/../include/cppkafka/utils/buffered_producer.h:39,
from /root/news/ft_local/cppkafka/examples/buffered_producer_example.cpp:4:
/usr/include/c++/4.8.2/bits/atomic_base.h:275:5: error: declared here
atomic_flag(const atomic_flag&) = delete;
^
In file included from /root/news/ft_local/cppkafka/examples/buffered_producer_example.cpp:4:0:
/root/news/ft_local/cppkafka/examples/../include/cppkafka/utils/buffered_producer.h:754:24: note: synthesized method ‘cppkafka::BufferedProducer<std::basic_string >::AckMonitor::AckMonitor()’ first required here
retry_messages_(alloc) {
^
make[3]: *** [examples/CMakeFiles/buffered-producer.dir/buffered_producer_example.cpp.o] Error 1
make[2]: *** [examples/CMakeFiles/buffered-producer.dir/all] Error 2
make[1]: *** [examples/CMakeFiles/examples.dir/rule] Error 2
make: *** [examples] Error 2

cppkafka version: the latest verison, maybe 0.4.0

@csflyer
Copy link
Author

csflyer commented Aug 26, 2021

gcc version: 4.8.4
[root@VM-229-225-centos ~/news/ft_local/cppkafka/build]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.

@mfontanini
Copy link
Owner

The code looks fine well formed IMO. I would suggest upgrading your compiler, gcc 4.8.4 was released 6 years ago. That should fix your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants