[ 25%] Building CXX object storage/innobase/CMakeFiles/innobase.dir/buf/buf0buf.cc.o
In file included from /Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/buf/buf0buf.cc:33:
In file included from /Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/include/ha_prototypes.h:32:
In file included from /Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/include/univ.i:600:
In file included from /Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/include/sync0types.h:32:
In file included from /Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/include/ut0new.h:124:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/map:820:5: error: static_assert failed "Allocator::value_type must be same type as value_type"
static_assert((is_same<typename allocator_type::value_type, value_type>::value),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:729:36: note: expanded from macro 'static_assert'
# define static_assert(__b, __m) _Static_assert(__b, __m)
^ ~~~
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/buf/buf0buf.cc:395:19: note: in instantiation of template class 'std::__1::map<const unsigned char *, buf_chunk_t *, std::__1::less<const unsigned char *>, ut_allocator<std::__1::pair<const unsigned char *, buf_chunk_t *> > >' requested here
buf_chunk_map_reg->insert(buf_pool_chunk_map_t::value_type(
^
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/buf/buf0buf.cc:3927:2: error: no type named 'iterator' in 'std::__1::map<const unsigned char *, buf_chunk_t *, std::__1::less<const unsigned char *>, ut_allocator<std::__1::pair<const unsigned char *, buf_chunk_t *> > >'; did you mean
'TrxUndoRsegs::iterator'?
buf_pool_chunk_map_t::iterator it;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TrxUndoRsegs::iterator
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/include/trx0types.h:186:32: note: 'TrxUndoRsegs::iterator' declared here
typedef trx_rsegs_t::iterator iterator;
^
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/buf/buf0buf.cc:3936:18: error: no member named 'upper_bound' in 'std::__1::map<const unsigned char *, buf_chunk_t *, std::__1::less<const unsigned char *>, ut_allocator<std::__1::pair<const unsigned char *, buf_chunk_t *> > >'
it = chunk_map->upper_bound(bound);
~~~~~~~~~ ^
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/buf/buf0buf.cc:3938:24: error: no member named 'end' in 'std::__1::map<const unsigned char *, buf_chunk_t *, std::__1::less<const unsigned char *>, ut_allocator<std::__1::pair<const unsigned char *, buf_chunk_t *> > >'
ut_a(it != chunk_map->end());
~~~~~~~~~ ^
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/include/ut0dbg.h:52:30: note: expanded from macro 'ut_a'
if (UNIV_UNLIKELY(!(ulint) (EXPR))) { \
^~~~
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/include/univ.i:574:41: note: expanded from macro 'UNIV_UNLIKELY'
#define UNIV_UNLIKELY(cond) UNIV_EXPECT(cond, FALSE)
^~~~
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/include/univ.i:528:54: note: expanded from macro 'UNIV_EXPECT'
# define UNIV_EXPECT(expr,constant) __builtin_expect(expr, constant)
^~~~
/Users/count/scratch/percona-xtrabackup-2.4.9/storage/innobase/buf/buf0buf.cc:3940:25: error: member reference base type 'trx_rseg_t *' is not a structure or union
buf_chunk_t* chunk = it->second;
~~^ ~~~~~~
5 errors generated.
make[2]: *** [storage/innobase/CMakeFiles/innobase.dir/buf/buf0buf.cc.o] Error 1
make[1]: *** [storage/innobase/CMakeFiles/innobase.dir/all] Error 2
make: *** [all] Error 2
It is not new to 2.4.9. 2.4.8 has all the same issues. While OS X is not on the list of supported platforms, this issue actually exposes some bugs in MySQL server.
Here is the patch to fix the build:
diff --git i/sql/json_dom.h w/sql/json_dom.h .545d31d5f97 100644 std::string, Json_dom *, Json_key_ comparator, allocator< std::pair< std::string, Json_dom *> > > Json_object_map; allocator< std::pair< const std::string, Json_dom *> > > Json_object_map;
index 557eda617dc.
--- i/sql/json_dom.h
+++ w/sql/json_dom.h
@@ -368,7 +368,7 @@ struct Json_key_comparator
Json_object class.
*/
typedef std::map<
- Malloc_
+ Malloc_
/** innobase/ buf/buf0buf. cc w/storage/ innobase/ buf/buf0buf. cc .0f423d99e32 100644 innobase/ buf/buf0buf. cc innobase/ buf/buf0buf. cc std::pair< const byte*, buf_chunk_t*> > > std::pair< const byte* const, buf_chunk_t*> > > chunk_map_ t;
Represents a JSON container value of type "object" (ECMA), type
diff --git i/storage/
index b065ccff040.
--- i/storage/
+++ w/storage/
@@ -340,7 +340,7 @@ typedef std::map<
const byte*,
buf_chunk_t*,
std::less<const byte*>,
- ut_allocator<
+ ut_allocator<
buf_pool_
static buf_pool_ chunk_map_ t* buf_chunk_map_reg; innobase/ dict/dict0stats .cc w/storage/ innobase/ dict/dict0stats .cc .199d18cb713 100644 innobase/ dict/dict0stats .cc innobase/ dict/dict0stats .cc ib_uint64_ t, ut_allocator< ib_uint64_ t> > boundaries_t;
diff --git i/storage/
index e3a9a6a5858.
--- i/storage/
+++ w/storage/
@@ -139,7 +139,7 @@ then we would store 5,7,10,11,12 in the array. */
typedef std::vector<
/** Allocator type used for index_map_t. */ std::pair< const char*, dict_index_t*> > std::pair< const char* const, dict_index_t*> > map_t_allocator ;
-typedef ut_allocator<
+typedef ut_allocator<
index_
/** Auxiliary map used for sorting indexes by name in dict_stats_save(). */ innobase/ sync/sync0debug .cc w/storage/ innobase/ sync/sync0debug .cc .cbb4b2e8cd8 100644 innobase/ sync/sync0debug .cc innobase/ sync/sync0debug .cc id_less, std::pair< const std::string, latch_meta_t> > > std::pair< const os_thread_id_t, Latches*> > >
diff --git i/storage/
index fc137ab5994.
--- i/storage/
+++ w/storage/
@@ -129,7 +129,7 @@ struct LatchDebug {
os_thread_id_t,
Latches*,
os_thread_
- ut_allocator<
+ ut_allocator<
ThreadMap;
/** Constructor */ level_less, std::pair< latch_level_ t, std::string> > > std::pair< const latch_level_t, std::string> > >
@@ -424,7 +424,7 @@ private:
latch_level_t,
std::string,
latch_
- ut_allocator<
+ ut_allocator<
Levels;
/** Mutex protecting the deadlock detector data structures. */ std::pair< const void*, File> > > std::pair< const void* const, File> > >
@@ -1718,7 +1718,7 @@ private:
const void*,
File,
std::less<const void*>,
- ut_allocator<
+ ut_allocator<
Files;
typedef OSMutex Mutex;