memcached_stats plugin is using an old version of libmemcached and we are requiring 0.38 for memcached_functions.
Error follows:
plugin/memcached_stats/stats_table.cc:66:56: error: macro "memcached_server_name" requires 2 arguments, but only 1 given
plugin/memcached_stats/stats_table.cc:67:54: error: macro "memcached_server_port" requires 2 arguments, but only 1 given
CXX plugin/multi_thread/plugin_libmulti_thread_plugin_la-multi_thread.lo
CXX plugin/pool_of_threads/plugin_libpool_of_threads_plugin_la-pool_of_threads.lo
plugin/memcached_stats/analysis_table.cc:96:70: error: macro "memcached_server_name" requires 2 arguments, but only 1 given
plugin/memcached_stats/analysis_table.cc:98:67: error: macro "memcached_server_name" requires 2 arguments, but only 1 given
plugin/memcached_stats/analysis_table.cc:100:63: error: macro "memcached_server_name" requires 2 arguments, but only 1 given
CXX plugin/pool_of_threads/plugin_libpool_of_threads_plugin_la-session_scheduler.lo
CXX plugin/registry_dictionary/plugin_libregistry_dictionary_plugin_la-dictionary.lo
plugin/memcached_stats/stats_table.cc: In function ‘memcached_return server_function(const memcached_st*, const memcached_server_st*, void*)’:
plugin/memcached_stats/stats_table.cc:66: error: ‘memcached_server_name’ was not declared in this scope
plugin/memcached_stats/stats_table.cc:67: error: ‘memcached_server_port’ was not declared in this scope
cc1plus: warnings being treated as errors
plugin/memcached_stats/stats_table.cc: At global scope:
plugin/memcached_stats/stats_table.cc:60: error: unused parameter ‘server’ [-Wunused-parameter]
plugin/memcached_stats/stats_table.cc: In member function ‘virtual bool StatsTableTool::Generator::populate()’:
plugin/memcached_stats/stats_table.cc:188: error: invalid conversion from ‘memcached_return (*)(const memcached_st*, const memcached_server_st*, void*)’ to ‘memcached_return_t (*)(const memcached_st*, memcached_server_st*, void*)’ [-fpermissive]
CXX plugin/registry_dictionary/plugin_libregistry_dictionary_plugin_la-modules.lo
make[2]: *** [plugin/memcached_stats/plugin_libmemcached_stats_plugin_la-stats_table.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
plugin/memcached_stats/analysis_table.cc: In member function ‘virtual bool AnalysisTableTool::Generator::populate()’:
plugin/memcached_stats/analysis_table.cc:96: error: ‘memcached_server_name’ was not declared in this scope
cc1plus: warnings being treated as errors
plugin/memcached_stats/analysis_table.cc:86: error: unused variable ‘servers’ [-Wunused-variable]
make[2]: *** [plugin/memcached_stats/plugin_libmemcached_stats_plugin_la-analysis_table.lo] Error 1
make[2]: Leaving directory `/home/hudson/hudson/workspace/drizzle-param/BUILD_TYPE/release/label/debian-squeeze-amd64'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/hudson/hudson/workspace/drizzle-param/BUILD_TYPE/release/label/debian-squeeze-amd64'
I was pretty confused about this!! I pulled the latest libmemcached from launchpad which is version 0.39 and memcached_ server_ name only takes 1 parameter:
http:// bazaar. launchpad. net/~libmemcach ed-developers/ libmemcached/ trunk/annotate/ head%3A/ libmemcached/ server. h#L116
The memcached_stats plugin compiles on my machine also with libmemcached 0.39.
Looking at the revision history for the server.h header file in libmemcached, we can see that it was changed in February from a macro to a function which takes one parameter:
http:// bazaar. launchpad. net/~libmemcach ed-developers/ libmemcached/ trunk/revision/ 792#libmemcache d/server. h
So unfortunately, it looks like the API for this function changed between 0.38 and 0.39. I can fix if you think its a good idea but maybe we should just require 0.39 instead?