Problem compiling LLVM under Cygwin/Mingw

Hello,

I'm starting to play with LLVM today and I've trouble compiling it. I'm working under Windows Vista, with the gcc from Cygwin:

gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

Is LLVM supposed to work with this version of GCC (probably using the -mno-cygwin option to get a Mingw-like behavior)?

The LLVM source tree is from the current SVN trunk.

Compilation fails at SelectionDAG.cpp:

llvm[3]: Compiling SelectionDAG.cpp for Debug build
SelectionDAG.cpp: In function `void AddNodeIDNode(llvm::FoldingSetNodeID&, llvm::SDNode*)':
SelectionDAG.cpp:344: error: call of overloaded `AddInteger(llvm::MVT::ValueType)' is ambiguous
/home/afrisch/llvm/llvm/include/llvm/ADT/FoldingSet.h:150: note: candidates are: void llvm::FoldingSetImpl::NodeID::AddInteger(int)
/home/afrisch/llvm/llvm/include/llvm/ADT/FoldingSet.h:151: note: void llvm::FoldingSetImpl::NodeID::AddInteger(unsigned int)
/home/afrisch/llvm/llvm/include/llvm/ADT/FoldingSet.h:152: note: void llvm::FoldingSetImpl::NodeID::AddInteger(uint64_t)
...

Before that, I get some warnings:

...
llvm[3]: Compiling PredicateSimplifier.cpp for Debug build
PredicateSimplifier.cpp: In member function `bool <unnamed>::VRPSolver::below(llvm::Instruction*)':
PredicateSimplifier.cpp:1417: warning: control reaches end of non-void function
PredicateSimplifier.cpp: In member function `bool <unnamed>::DomTreeDFS::dominates(llvm::Instruction*, llvm::Instruction*)':
PredicateSimplifier.cpp:247: warning: control reaches end of non-void function
...
llvm[3]: Linking Debug Loadable Module LLVMHello.dll
mklib: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries

Cheers,

Alain

In any case, it seems that GCC 3.4.4 may be in hot water even if you did get it to compile:

http://llvm.org/docs/GettingStarted.html#brokengcc

Christopher Lamb wrote:

In any case, it seems that GCC 3.4.4 may be in hot water even if you did get it to compile:

http://llvm.org/docs/GettingStarted.html#brokengcc

This page mentions a problem with GCC 3.4.4 under x86-64 / amd64. Since I'm using a 32-bit version of Windows, I guess this should be ok.

-- Alain