cppkafka icon indicating copy to clipboard operation
cppkafka copied to clipboard

make examples failure

Open csflyer opened this issue 4 years ago • 2 comments

[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 avatar Aug 26 '21 12:08 csflyer

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.

csflyer avatar Aug 26 '21 12:08 csflyer

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.

mfontanini avatar Sep 03 '21 20:09 mfontanini