LLVM compilation problem

I am using gcc 3.4.6 to build LLVM, and am encountering overloaded/ambiguous errors in several files…

% gcc –v

Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs

Configured with: …/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux

Thread model: posix

gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)

The errors I am seeing during compiler w/ gmake are all the same (more or less)…

% …/llvm/configure --prefix=$HOME/local --exec-prefix=$HOME/local/$MACHTYPE

% gmake ENABLE_OPTIMIZED=0

llvm/include/llvm/IR/Instruction.h:49: error: call of overloaded `cast(llvm::User*)’ is ambiguous

llvm/include/llvm/IR/Instruction.h:50: error: call of overloaded `cast(const llvm::User*)’ is ambiguous

llvm/include/llvm/IR/InstrTypes.h:80: error: call of overloaded `cast(const llvm::Value*&)’ is ambiguous

llvm/include/llvm/IR/InstrTypes.h:123: error: call of overloaded `cast(const llvm::Value*&)’ is ambiguous

llvm/include/llvm/IR/InstrTypes.h:366: error: call of overloaded `cast(const llvm::Value*&)’ is ambiguous

llvm/include/llvm/IR/InstrTypes.h:617: error: call of overloaded `cast(const llvm::Value*&)’ is ambiguous

llvm/include/llvm/IR/InstrTypes.h:822: error: call of overloaded `cast(const llvm::Value*&)’ is ambiguous

llvm/include/llvm/IR/InstrTypes.h:827: error: call of overloaded `dyn_cast(llvm::Type*&)’ is ambiguous

llvm/include/llvm/Support/Casting.h:249: error: call of overloaded `cast(llvm::Value*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:88: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:99: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:125: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:138: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:150: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:163: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:172: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:194: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:211: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:223: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:227: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:246: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:258: error: call of overloaded `dyn_cast(llvm::yaml::Input::HNode*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:276: error: call of overloaded `dyn_cast(llvm::yaml::Node*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:286: error: call of overloaded `dyn_cast(llvm::yaml::Node*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:296: error: call of overloaded `dyn_cast(llvm::yaml::Node*&)’ is ambiguous

llvm/lib/Support/YAMLTraits.cpp:300: error: call of overloaded `dyn_cast(llvm::yaml::Node*)’ is ambiguous

Advice or guidance would be most helpful. Thank you,

Hi Bryan,

I am using gcc 3.4.6 to build LLVM, and am encountering overloaded/ambiguous
errors in several files…

I can't say anything about your specific errors, but there are
definite plans that LLVM 3.4 will require GCC 4.7.x to compile (since
it'll use C++11 features). Regardless, 3.4 is ancient. Unless you're
in a particularly bizarre time-warp I'd suggest using a more recent
host compiler.

If you *are* in such a time-warp, your best bet is probably just
working backwards through the versions of LLVM until you find one that
compiles. Or reprioritising.

Cheers.

Tim.

I can't say anything about your specific errors, but there are
definite plans that LLVM 3.4 will require GCC 4.7.x to compile (since
it'll use C++11 features).

Sorry, just in case this gives anyone a heart attack, I obviously
meant 3.5 (which will be released in spring 2014, and so subversion
trunk might start needing C++11 Any Time Now).

Tim.