For some reason, I need to install llvm 3.1 or llvm 3.0, but I'm getting this error when during make
.
[ 5%] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o
In file included from /home/ubuntu/llvm/utils/TableGen/AsmMatcherEmitter.cpp:103:0:
/home/ubuntu/llvm/include/llvm/ADT/PointerUnion.h: In member function ‘int llvm::PointerUnion3<PT1, PT2, PT3>::is() const’:
/home/ubuntu/llvm/include/llvm/ADT/PointerUnion.h:266:26: error: expected primary-expression before ‘>’ token
return Ty(Val).is<T>();
^
/home/ubuntu/llvm/include/llvm/ADT/PointerUnion.h:266:28: error: expected primary-expression before ‘)’ token
return Ty(Val).is<T>();
^
/home/ubuntu/llvm/include/llvm/ADT/PointerUnion.h: In member function ‘T llvm::PointerUnion3<PT1, PT2, PT3>::get() const’:
/home/ubuntu/llvm/include/llvm/ADT/PointerUnion.h:279:27: error: expected primary-expression before ‘>’ token
return Ty(Val).get<T>();
^'
/home/ubuntu/llvm/include/llvm/ADT/PointerUnion.h:279:29: error: expected primary-expression before ‘)’ token
return Ty(Val).get<T>();
^
I guess there might be a compatibility issue between llvm 3.0 and gcc 7.0.0, so I installed gcc-4.6.3, and use this cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/home/ubuntu/install -DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath,$HOME/gcc463/install -L$HOME/gcc463/install" -G "Unix Makefiles" ../llvm
to configure. But the same error still occurs. Anybody knows why and how to fix it? Thanks!!