can't build LLVM under Cygwin | released MinGW llvm-2.3 image

I used to be able to build LLVM (from source) under Cygwin for llvm-2.2 and previous releases, but can't continue the trend since the release of LLVM 2.3.
I have tried a wide variety of gcc compilers (gcc 3.4.4, 4.1.2, 4.2.4 and 4.3.2) on cygwin, they all fail at the same location:

C:\cygwin\home\czhao\ResearchTools\LLVM\2.3\obj2.3>make
make[1]: Entering directory `/home/czhao/ResearchTools/LLVM/2.3/obj2.3/lib/System'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/czhao/ResearchTools/LLVM/2.3/obj2.3/lib/System'
make[1]: Entering directory `/home/czhao/ResearchTools/LLVM/2.3/obj2.3/lib/Support'
llvm[1]: Compiling APInt.cpp for Release build
/home/czhao/ResearchTools/LLVM/2.3/llvm-2.3/lib/Support/APInt.cpp: In member function 'void llvm::APInt::Profile(llvm::FoldingSetNodeID&) const':
/home/czhao/ResearchTools/LLVM/2.3/llvm-2.3/lib/Support/APInt.cpp:170: error: call of overloaded 'AddInteger(const uint32_t&)' is ambiguous
/home/czhao/ResearchTools/LLVM/2.3/llvm-2.3/include/llvm/ADT/FoldingSet.h:216: note: candidates are: void llvm::FoldingSetNodeID::AddInteger(int)
/home/czhao/ResearchTools/LLVM/2.3/llvm-2.3/include/llvm/ADT/FoldingSet.h:217: note: void llvm::FoldingSetNodeID::AddInteger(unsigned int)
/home/czhao/ResearchTools/LLVM/2.3/llvm-2.3/include/llvm/ADT/FoldingSet.h:218: note: void llvm::FoldingSetNodeID::AddInteger(int64_t)
/home/czhao/ResearchTools/LLVM/2.3/llvm-2.3/include/llvm/ADT/FoldingSet.h:219: note: void llvm::FoldingSetNodeID::AddInteger(uint64_t)
make[1]: *** [/home/czhao/ResearchTools/LLVM/2.3/obj2.3/lib/Support/Release/APInt.o] Error 1
make[1]: Leaving directory `/home/czhao/ResearchTools/LLVM/2.3/obj2.3/lib/Support'
make: *** [all] Error 1

C:\cygwin\home\czhao\ResearchTools\LLVM\2.3\obj2.3>

The GettingStarted page mentions that gcc 3.4.4 is used for the X86/Cygwin/MinGW build. Is this still true? or there is/are special flags/options I am missing?

Try this:

http://article.gmane.org/gmane.comp.compilers.llvm.devel/14823/match=uint32_t+cygwin+llvm

I might be wrong, but I think the latest version of Cygwin got this
fixed upstream.

The archives on GMANE are a very good source of information for
cygwin/mingw build.

Hope this helps,
Julien

Julien Lerouge wrote:

I might be wrong, but I think the latest version of Cygwin got this
fixed upstream.

I don't think cygwin is at fault; it's defining uint32_t as a 32-bit
unsigned type.

How about this patch (attached) which works for me on cygwin?

Jay.

ambiguous (419 Bytes)