linux compiling error
root@aebc7aa466c5:/postmanc/dockerbuild/cppkafka/build# cmake ../ -- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Build will generate a shared library. Use CPPKAFKA_BUILD_SHARED=0 to perform a static build -- Found RDKAFKA: /usr/local/lib/librdkafka.so -- Found valid rdkafka version -- Disabling examples -- Disabling tests because submodule Catch2 isn't checked out -- Configuring done -- Generating done -- Build files have been written to: /postmanc/dockerbuild/cppkafka/build
root@aebc7aa466c5:/postmanc/dockerbuild/cppkafka/build# make [ 4%] Building CXX object src/CMakeFiles/cppkafka.dir/configuration.cpp.o In file included from /postmanc/dockerbuild/cppkafka/src/../include/cppkafka/message.h:39:0, from /postmanc/dockerbuild/cppkafka/src/../include/cppkafka/event.h:37, from /postmanc/dockerbuild/cppkafka/src/../include/cppkafka/configuration.h:45, from /postmanc/dockerbuild/cppkafka/src/configuration.cpp:30: /postmanc/dockerbuild/cppkafka/src/../include/cppkafka/buffer.h:150:5: error: 'template<class T, long unsigned int N> cppkafka::Buffer::Buffer(const T (&)[N])' cannot be overloaded Buffer(const T(&data)[N]) ^ /postmanc/dockerbuild/cppkafka/src/../include/cppkafka/buffer.h:136:5: error: with 'template<class T, long unsigned int N> cppkafka::Buffer::Buffer(const T (&)[N])' Buffer(const T(&data)[N]) ^ make[2]: *** [src/CMakeFiles/cppkafka.dir/configuration.cpp.o] Error 1 make[1]: *** [src/CMakeFiles/cppkafka.dir/all] Error 2 make: *** [all] Error 2
I have the same issue Scanning dependencies of target cppkafka [ 4%] Building CXX object src/CMakeFiles/cppkafka.dir/configuration.cpp.o In file included from /home/alex/prjs/cppkafka/src/../include/cppkafka/message.h:39:0, from /home/alex/prjs/cppkafka/src/../include/cppkafka/event.h:37, from /home/alex/prjs/cppkafka/src/../include/cppkafka/configuration.h:45, from /home/alex/prjs/cppkafka/src/configuration.cpp:30: /home/alex/prjs/cppkafka/src/../include/cppkafka/buffer.h:150:5: error: ‘template<class T, long unsigned int N> cppkafka::Buffer::Buffer(const T (&)[N])’ cannot be overloaded Buffer(const T(&data)[N]) ^~~~~~ /home/alex/prjs/cppkafka/src/../include/cppkafka/buffer.h:136:5: error: with ‘template<class T, long unsigned int N> cppkafka::Buffer::Buffer(const T (&)[N])’ Buffer(const T(&data)[N]) ^~~~~~
It's related to recent merge #140. Should be backed out. Until then just checkout the commit before that.
Sorry, I left that PR open for so long I forgot it had been fixed on another PR. If you clone master it should be fixed.