Impossible to compile against libmemcached without c++11 with GCC 4.9

Bug #1328985 reported by Adrien Devresse on 2014-06-11
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libmemcached
Undecided
Unassigned

Bug Description

libmemcached is broken in Fedora rawhide and with any compilation implying GCC 4.9.

The header memcache.h exposes "#include <cinttypes>" which forces the usage of C++11 r triggers compilation error

https://bugzilla.redhat.com/show_bug.cgi?id=1106145
http://koji.fedoraproject.org/koji/taskinfo?taskID=6951772

https://kojipkgs.fedoraproject.org//work/tasks/7102/6957102/build.log

In file included from /usr/include/c++/4.9.0/cinttypes:35:0,
                 from /usr/include/libmemcached-1.0/memcached.h:46,
                 from /usr/include/libmemcached/memcached.h:39,
                 from /builddir/build/BUILD/dmlite-plugins-memcache-0.6.2/src/Memcache.h:7,
                 from /builddir/build/BUILD/dmlite-plugins-memcache-0.6.2/src/Memcache.cpp:11:
/usr/include/c++/4.9.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \

This is an urgent fix and block compilation existing software compiling against libmemcached

Adrien Devresse (adevress) wrote :

A solution to this problem is to replace :

#include <cinttypes>

par

# if ( __cplusplus > 201103L )
# include <cinttypes>
# else
# include <tr1/cinttypes>
# endif

Adrien Devresse (adevress) wrote :

Any news on this ? Do you want a patch ?

Adrien Devresse (adevress) wrote :

Guys ?

Still no news on this ?

Adrien Devresse (adevress) wrote :

Any News on this ?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers