Looks like your compiler can't handle the conversion even though it's
defined in its base class, gcc 4.3+ (supposedly more std conforming)
handles it fine. A workaround is to an explicit conversion as a copy
ctor in the CellCacheAllocator like this (untested):
template <typename U>
CellCacheAllocator(const PageArenaAllocator<U, CellCacheArena> &other)
: Impl(other) {}
Let me know if it works for you.
On Thu, Dec 10, 2009 at 4:50 PM, Sanjit Jhala <[email protected]> wrote:
> Hi Luke,
> I'm seeing some build problems with the latest CellCache allocator
> changes in the pu branch.
> I'm using Mac OSX 10.5, gcc version 4.0.1 (Apple Inc. build 5484).
>
> Heres what I see:
> [ 74%] Building CXX object
> src/cc/Hypertable/Lib/CMakeFiles/commit_log_test.dir/tests/commit_log_test.cc.o
> /usr/include/c++/4.0.0/bits/stl_tree.h: In member function ‘_Alloc
> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
> _Alloc>::get_allocator() const [with _Key = const
> Hypertable::SerializedKey, _Val = std::pair<const
> Hypertable::SerializedKey, uint32_t>, _KeyOfValue =
> std::_Select1st<std::pair<const Hypertable::SerializedKey, uint32_t>
>>, _Compare = std::less<const Hypertable::SerializedKey>, _Alloc =
> Hypertable::CellCacheAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>,
> Hypertable::PageArenaAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>, Hypertable::PageArena<uint8_t,
> Hypertable::CellCachePageAllocator> > >]’:
> /usr/include/c++/4.0.0/bits/stl_tree.h:389: instantiated from ‘void
> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
> _Alloc>::destroy_node(std::_Rb_tree_node<_Val>*) [with _Key = const
> Hypertable::SerializedKey, _Val = std::pair<const
> Hypertable::SerializedKey, uint32_t>, _KeyOfValue =
> std::_Select1st<std::pair<const Hypertable::SerializedKey, uint32_t>
>>, _Compare = std::less<const Hypertable::SerializedKey>, _Alloc =
> Hypertable::CellCacheAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>,
> Hypertable::PageArenaAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>, Hypertable::PageArena<uint8_t,
> Hypertable::CellCachePageAllocator> > >]’
> /usr/include/c++/4.0.0/bits/stl_tree.h:1058: instantiated from ‘void
> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
> _Alloc>::_M_erase(std::_Rb_tree_node<_Val>*) [with _Key = const
> Hypertable::SerializedKey, _Val = std::pair<const
> Hypertable::SerializedKey, uint32_t>, _KeyOfValue =
> std::_Select1st<std::pair<const Hypertable::SerializedKey, uint32_t>
>>, _Compare = std::less<const Hypertable::SerializedKey>, _Alloc =
> Hypertable::CellCacheAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>,
> Hypertable::PageArenaAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>, Hypertable::PageArena<uint8_t,
> Hypertable::CellCachePageAllocator> > >]’
> /usr/include/c++/4.0.0/bits/stl_tree.h:570: instantiated from
> ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree()
> [with _Key = const Hypertable::SerializedKey, _Val = std::pair<const
> Hypertable::SerializedKey, uint32_t>, _KeyOfValue =
> std::_Select1st<std::pair<const Hypertable::SerializedKey, uint32_t>
>>, _Compare = std::less<const Hypertable::SerializedKey>, _Alloc =
> Hypertable::CellCacheAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>,
> Hypertable::PageArenaAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>, Hypertable::PageArena<uint8_t,
> Hypertable::CellCachePageAllocator> > >]’
> /usr/include/c++/4.0.0/bits/stl_map.h:92: instantiated from here
> /usr/include/c++/4.0.0/bits/stl_tree.h:351: error: conversion from
> ‘const Hypertable::PageArenaAllocator<std::_Rb_tree_node<std::pair<const
> Hypertable::SerializedKey, uint32_t> >, Hypertable::PageArena<uint8_t,
> Hypertable::CellCachePageAllocator> >’ to non-scalar type
> ‘Hypertable::CellCacheAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>,
> Hypertable::PageArenaAllocator<std::pair<const
> Hypertable::SerializedKey, uint32_t>, Hypertable::PageArena<uint8_t,
> Hypertable::CellCachePageAllocator> > >’ requested
>
> Any idea what the fix is?
>
> -Sanjit
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Hypertable Development" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/hypertable-dev?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Hypertable Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hypertable-dev?hl=en.