Problems Compiling v6.00.01, with BreakableToken

So I’m trying to compile root v6.00.01 on Mac OS X 10.8.5, and failing. I started out with the tarball, root_v6.00.01.source.tar.gz , unpacked it, and ran configure. My computer decided that I had sufficient libraries for it to give me this:

Enabled support for asimage, astiff, bonjour, builtin_afterimage, builtin_freetype, builtin_llvm, libcxx, cocoa, explicitlink, fink, fftw3, gviz, gdml, genvector, gsl_shared, http, krb5, ldap, mathmore, memstat, minuit2, mysql, odbc, pgsql, python, roofit, rpath, shared, soversion, sqlite, ssl, table, tmva, unuran, vc, vdt, xml.
From the installation directory, I ran cmake (which seemed just fine), followed by make. Everything went along splendidly for a while, until it got to BreakableToken, at which point it spit out a long string of errors and refused to finish the build.

[code][ 95%] Building CXX object tools/clang/lib/Format/CMakeFiles/clangFormat.dir/BreakableToken.cpp.o
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/BreakableToken.cpp:18:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/BreakableToken.h:21:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/TokenAnnotator.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/UnwrappedLineParser.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/FormatToken.h:20:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Format/Format.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Tooling/Refactoring.h:23:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Tooling/Tooling.h:33:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Basic/Diagnostic.h:28:
/usr/bin/…/lib/c++/v1/list:212:9: error: field has incomplete type ‘clang::format::UnwrappedLineNode’
_Tp _value;
^
/usr/bin/…/lib/c++/v1/type_traits:1889:54: note: in instantiation of template class
’std::__1::__list_node<clang::format::UnwrappedLineNode, void *>’ requested here
decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()…)), true_type())
^
/usr/bin/…/lib/c++/v1/type_traits:1890:1: note: while substituting deduced template arguments into function template
’__is_constructible_test’ [with _Tp = std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode,
void *>>, _Args = ]
__is_constructible_test(_Tp&&, _Args&& …);
^
/usr/bin/…/lib/c++/v1/type_traits:1949:14: note: in instantiation of template class ‘std::__1::__is_constructible<false,
std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode, void *>>,
std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode, void *>> &&>’ requested here
: public __is_constructible<is_scalar<_Tp>::value || is_reference<_Tp>::value,
^
/usr/bin/…/lib/c++/v1/type_traits:1975:14: note: in instantiation of template class
’std::__1::__is_constructible_void_check<false,
std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode, void *>>,
std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode, void *>> &&>’ requested here
: public __is_constructible_void_check<__contains_void<_Tp, _Args…>::value
^
/usr/bin/…/lib/c++/v1/type_traits:2455:34: note: in instantiation of template class
’std::__1::is_constructible<std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode, void *>>,
std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode, void *>> &&>’ requested here
: __is_nothrow_constructible<is_constructible<_Tp, _Args…>::value, _Tp, _Args…>
^
/usr/bin/…/lib/c++/v1/type_traits:2590:14: note: (skipping 1 context in backtrace; use -ftemplate-backtrace-limit=0 to see
all)
: public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
^
/usr/bin/…/lib/c++/v1/memory:2219:20: note: in instantiation of template class
’std::__1::is_nothrow_move_constructible<std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode,
void *>>>’ requested here
is_nothrow_move_constructible<_T2>::value)
^
/usr/bin/…/lib/c++/v1/__config:253:34: note: expanded from macro ‘NOEXCEPT

define NOEXCEPT(x) noexcept(x)

                             ^

/usr/bin/…/lib/c++/v1/memory:2386:15: note: in instantiation of template class
’std::__1::__libcpp_compressed_pair_imp<unsigned long,
std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode, void *>>, 2>’ requested here
: private __libcpp_compressed_pair_imp<_T1, _T2>
^
/usr/bin/…/lib/c++/v1/list:513:52: note: in instantiation of template class ‘std::__1::__compressed_pair<unsigned long,
std::__1::allocator<std::__1::__list_node<clang::format::UnwrappedLineNode, void *>>>’ requested here
__compressed_pair<size_type, __node_allocator> _size_alloc;
^
/usr/bin/…/lib/c++/v1/list:770:15: note: in instantiation of template class
’std::__1::__list_imp<clang::format::UnwrappedLineNode, std::__1::allocatorclang::format::UnwrappedLineNode>‘
requested here
: private __list_imp<_Tp, _Alloc>
^
/Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/UnwrappedLineParser.h:40:32: note: in
instantiation of template class ‘std::__1::list<clang::format::UnwrappedLineNode,
std::__1::allocatorclang::format::UnwrappedLineNode>’ requested here
std::list Tokens;
^
/Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/UnwrappedLineParser.h:27:8: note: forward
declaration of ‘clang::format::UnwrappedLineNode’
struct UnwrappedLineNode;
^
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/BreakableToken.cpp:18:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/BreakableToken.h:21:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/TokenAnnotator.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/UnwrappedLineParser.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/FormatToken.h:20:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Format/Format.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Tooling/Refactoring.h:23:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Tooling/Tooling.h:33:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Basic/Diagnostic.h:28:
/usr/bin/…/lib/c++/v1/list:203:19: error: static_cast from ‘std::__1::__list_node_base<clang::format::UnwrappedLineNode,
void *> *’ to ‘pointer’ (aka ‘std::__1::__list_node<clang::format::UnwrappedLineNode, void *> *’) is not allowed
: _prev(static_cast(this)),
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/…/lib/c++/v1/list:529:5: note: in instantiation of member function
’std::__1::__list_node_base<clang::format::UnwrappedLineNode, void *>::__list_node_base’ requested here
__list_imp()
^
/usr/bin/…/lib/c++/v1/list:795:5: note: in instantiation of member function
’std::__1::__list_imp<clang::format::UnwrappedLineNode, std::__1::allocatorclang::format::UnwrappedLineNode
>::__list_imp’ requested here
list()
^
/Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/UnwrappedLineParser.h:199:23: note: in
instantiation of member function ‘std::__1::list<clang::format::UnwrappedLineNode,
std::__1::allocatorclang::format::UnwrappedLineNode >::list’ requested here
inline UnwrappedLine::UnwrappedLine()
^
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/BreakableToken.cpp:18:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/BreakableToken.h:21:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/TokenAnnotator.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/UnwrappedLineParser.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/FormatToken.h:20:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Format/Format.h:19:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Tooling/Refactoring.h:23:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Tooling/Tooling.h:33:
In file included from /Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/include/clang/Basic/Diagnostic.h:28:
/usr/bin/…/lib/c++/v1/list:204:19: error: static_cast from ‘std::__1::__list_node_base<clang::format::UnwrappedLineNode,
void *> *’ to ‘pointer’ (aka ‘std::__1::__list_node<clang::format::UnwrappedLineNode, void *> *’) is not allowed
_next(static_cast(this))
^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/…/lib/c++/v1/list:678:30: error: static_cast from ‘__node_base *’ (aka ‘__list_node_base<value_type,
__void_pointer> *’) to ‘__node_pointer’ (aka ‘std::__1::__list_node<clang::format::UnwrappedLineNode, void *> *’) is
not allowed
__node_pointer __l = static_cast<__node_pointer>(&_end);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/…/lib/c++/v1/list:664:5: note: in instantiation of member function
’std::__1::__list_imp<clang::format::UnwrappedLineNode, std::__1::allocatorclang::format::UnwrappedLineNode
>::clear’ requested here
clear();
^
/usr/bin/…/lib/c++/v1/list:769:23: note: in instantiation of member function
’std::__1::__list_imp<clang::format::UnwrappedLineNode, std::__1::allocatorclang::format::UnwrappedLineNode
>::~__list_imp’ requested here
class _LIBCPP_VISIBLE list
^
/usr/bin/…/lib/c++/v1/list:570:31: error: static_cast from ‘const __node_base *’ (aka ‘const __list_node_base<value_type,
__void_pointer> *’) to ‘__node_const_pointer’ (aka ‘const std::__1::__list_node<clang::format::UnwrappedLineNode,
void *> *’) is not allowed
return const_iterator(static_cast<__node_const_pointer>(&_end));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/…/lib/c++/v1/list:868:59: note: in instantiation of member function
’std::__1::__list_imp<clang::format::UnwrappedLineNode, std::__1::allocatorclang::format::UnwrappedLineNode >::end’
requested here
const_iterator end() const _NOEXCEPT {return base::end();}
^
/Users/spiffyzha/Desktop/root/interpreter/llvm/src/tools/clang/lib/Format/TokenAnnotator.h:54:71: note: in instantiation of
member function ‘std::__1::list<clang::format::UnwrappedLineNode,
std::__1::allocatorclang::format::UnwrappedLineNode >::end’ requested here
E = Line.Tokens.end();
^
5 errors generated.
make[5]: *** [tools/clang/lib/Format/CMakeFiles/clangFormat.dir/BreakableToken.cpp.o] Error 1
make[4]: *** [tools/clang/lib/Format/CMakeFiles/clangFormat.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [LLVM/src/LLVM-stamp/LLVM-build] Error 2
make[1]: *** [CMakeFiles/LLVM.dir/all] Error 2
make: *** [all] Error 2
[/code]
Any help would be hugely appreciated. I’m sort-of out of ideas here.

So I fixed the problem I was having with BreakableToken, but I still can’t get ROOT v6 to compile. It now simply fails on something else.

If anyone’s interested, the problem was that I’d recently upgraded to XCode 5.1.1, but I didn’t download a new set of command line tools. So, before I downloaded the new command line tools, I got this:

$ clang --version Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) Target: x86_64-apple-darwin12.5.0 Thread model: posix
…which was sad, because I definitely had a newer version of clang installed with my new version of xcode.

After downloading a brand new set of command line tools from XCode though, I get this:

$ clang --version Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin12.5.0 Thread model: posix

So, I guess it’s not that surprising that stuff might break if it gets confused about which version of clang it should be using.

But it still doesn’t work–it just gets a bit further now. It complains about “symbol(s) not found for architecture x86_64” while it’s linking rootcling_tmp, and then it dies (full output attached below).

So I checked: from within the cmake output, it tells me this:

-- Found a Mac OS X System 10.8
-- Found a 64bit system
-- Found LLVM compiler collection
-- ROOT Platform: macosx
-- ROOT Architecture: macosx64
-- Build Type: RelWithDebInfo
-- Compiler Flags:  -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -std=c++11 -stdlib=libc++ 

I do indeed have a 64 bit system, so it makes sense that it would want to use macosx64 as its architecture. Should I be able to select something similar for the ROOT Platform?
output.txt (150 KB)

So I found this thread ([url]Seg fault while compiling ROOT6 in which one of the intermediate problems is identical (like, literally, it happens in the exact same place and everything) to what I have right now. The eventual solution there was to use MacPorts (I think?) after modifying/deleting the .rootrc file. I’m really really hesitant to touch MacPorts though, because it will break all of my Python libraries the second anything gets upgraded, and I’m not savvy enough to get them going again quickly. But in any case, I deleted the old .rootrc file that was leftover from v5, as well as all the files ever that were installed or built by v6, and attempted a clean build straight from the tarball.

It seems to have worked. Yay!