facebook/xhp — Issue #29: compile error on osx Lion
Author: tenorviol
Created: 2011-10-26 05:37:08+00:00
State: open

I am having trouble compiling on osx Lion. The version of gcc is 4.2.1. The error looks like the rope interface has changed:

76-14-49-209:xhp chris$ make
make -C /Users/chris/dev/xhp/xhp libxhp.a
g++ -c -fPIC -g -Wall -O3 -minline-all-stringops -o code_rope.o code_rope.cpp
/usr/include/c++/4.2.1/ext/ropeimpl.h: In static member function ‘static typename __gnu_cxx::rope<_CharT, _Alloc>::_RopeRep* __gnu_cxx::rope<_CharT, _Alloc>::_S_substring(__gnu_cxx::_Rope_RopeRep<_CharT, _Alloc>*, size_t, size_t) [with _CharT = char, _Alloc = __gnu_cxx::__pool_alloc]’:
/usr/include/c++/4.2.1/ext/rope:1868: instantiated from ‘void __gnu_cxx::rope<_CharT, _Alloc>::pop_back() [with _CharT = char, _Alloc = __gnu_cxx::__pool_alloc]’
code_rope.cpp:58: instantiated from here
/usr/include/c++/4.2.1/ext/ropeimpl.h:819: error: ‘_Data_allocate’ is not a member of ‘__gnu_cxx::__pool_alloc’
/usr/include/c++/4.2.1/ext/ropeimpl.h: In static member function ‘static typename __gnu_cxx::rope<_CharT, _Alloc>::_RopeLeaf* __gnu_cxx::rope<_CharT, _Alloc>::_S_leaf_concat_char_iter(__gnu_cxx::_Rope_RopeLeaf<_CharT, _Alloc>*, const _CharT*, size_t) [with _CharT = char, _Alloc = __gnu_cxx::__pool_alloc]’:
/usr/include/c++/4.2.1/ext/ropeimpl.h:675: instantiated from ‘static typename __gnu_cxx::rope<_CharT, _Alloc>::_RopeRep* __gnu_cxx::rope<_CharT, _Alloc>::_S_concat(__gnu_cxx::_Rope_RopeRep<_CharT, _Alloc>*, __gnu_cxx::_Rope_RopeRep<_CharT, _Alloc>*) [with _CharT = char, _Alloc = __gnu_cxx::__pool_alloc]’
/usr/include/c++/4.2.1/ext/rope:2763: instantiated from ‘__gnu_cxx::rope<_CharT, _Alloc> __gnu_cxx::operator+(const __gnu_cxx::rope<_CharT, _Alloc>&, const __gnu_cxx::rope<_CharT, _Alloc>&) [with _CharT = char, _Alloc = __gnu_cxx::__pool_alloc]’
code_rope.cpp:50: instantiated from here
/usr/include/c++/4.2.1/ext/ropeimpl.h:436: error: ‘_Data_allocate’ is not a member of ‘__gnu_cxx::__pool_alloc’
make[1]: *** [code_rope.o] Error 1
make: *** [/Users/chris/dev/xhp/xhp/libxhp.a] Error 2