I'm trying to install llvm on my windows development box and hit a problem I'm using cygwin cygwin% gcc --version gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) I downloaded both the top of tree via svn I ran ./configure make make[1]: Entering directory `/cygdrive/c/llvm/lib/Support' llvm[1]: Compiling APFloat.cpp for Debug build llvm[1]: Compiling APInt.cpp for Debug build APInt.cpp: In member function `void llvm::APInt::Profile(llvm::FoldingSetNodeID&) const': APInt.cpp:170: error: call of overloaded `AddInteger(const uint32_t&)' is ambiguous /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:216: note: candidates are: void llvm::FoldingSetNodeID::AddInteger(int) /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:217: note: void llvm::FoldingSetNodeID::AddInteger(unsigned int) /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:218: note: void llvm::FoldingSetNodeID::AddInteger(int64_t) /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:219: note: void llvm::FoldingSetNodeID::AddInteger(uint64_t) make[1]: *** [/cygdrive/c/llvm/lib/Support/Debug/APInt.o] Error 1 make[1]: Leaving directory `/cygdrive/c/llvm/lib/Support' make: *** [all] Error 1 cygwin% I also tried the 2.3 release and got the same error. I must have done something wrong - some care to enlighten me? Hopefully this has not been asked many times already. If it is well known, where should I have looked for the answer? Norm
Hi, On Fri, Aug 15, 2008 at 6:48 PM, Rubin, Norman <Norman.Rubin at amd.com> wrote:> I'm trying to install llvm on my windows development box and hit a > problem > I'm using cygwin > cygwin% gcc --version > gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) > > I downloaded both the top of tree via svn > I ran ./configure > make > > make[1]: Entering directory `/cygdrive/c/llvm/lib/Support' > llvm[1]: Compiling APFloat.cpp for Debug build > llvm[1]: Compiling APInt.cpp for Debug build > APInt.cpp: In member function `void > llvm::APInt::Profile(llvm::FoldingSetNodeID&) const': > APInt.cpp:170: error: call of overloaded `AddInteger(const uint32_t&)' > is ambiguous > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:216: note: candidates > are: void llvm::FoldingSetNodeID::AddInteger(int) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:217: note: void > llvm::FoldingSetNodeID::AddInteger(unsigned int) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:218: note: void > llvm::FoldingSetNodeID::AddInteger(int64_t) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:219: note: void > llvm::FoldingSetNodeID::AddInteger(uint64_t) > make[1]: *** [/cygdrive/c/llvm/lib/Support/Debug/APInt.o] Error 1 > make[1]: Leaving directory `/cygdrive/c/llvm/lib/Support' > make: *** [all] Error 1 > cygwin% > > I also tried the 2.3 release and got the same error. > I must have done something wrong - some care to enlighten me? > Hopefully this has not been asked many times already. If it is well > known, where should I have looked for the answer? > > Norm >it's a cygwin problem, they finally fixed it upstream a couple of months ago here's the (trivial) diff of the file you have to edit http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/include/stdint.h.diff?r1=1.9&r2=1.10&cvsroot=src regards
Rubin, Norman wrote:> I'm trying to install llvm on my windows development box and hit a > problem > I'm using cygwin > cygwin% gcc --version > gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) > > I downloaded both the top of tree via svn > I ran ./configure > make > > make[1]: Entering directory `/cygdrive/c/llvm/lib/Support' > llvm[1]: Compiling APFloat.cpp for Debug build > llvm[1]: Compiling APInt.cpp for Debug build > APInt.cpp: In member function `void > llvm::APInt::Profile(llvm::FoldingSetNodeID&) const': > APInt.cpp:170: error: call of overloaded `AddInteger(const uint32_t&)' > is ambiguous > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:216: note: candidates > are: void llvm::FoldingSetNodeID::AddInteger(int) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:217: note: void > llvm::FoldingSetNodeID::AddInteger(unsigned int) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:218: note: void > llvm::FoldingSetNodeID::AddInteger(int64_t) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:219: note: void > llvm::FoldingSetNodeID::AddInteger(uint64_t) > make[1]: *** [/cygdrive/c/llvm/lib/Support/Debug/APInt.o] Error 1 > make[1]: Leaving directory `/cygdrive/c/llvm/lib/Support' > make: *** [all] Error 1 > cygwin% > > I also tried the 2.3 release and got the same error. > I must have done something wrong - some care to enlighten me? > Hopefully this has not been asked many times already. If it is well > known, where should I have looked for the answer? > > Norm >I encountered this issue as well on Cygwin. The problem is Cygwin defines int32_t and uint32_t as longs instead of ints. A quick hack to get LLVM building is to edit /usr/include/stdint.h and change typedef long int32_t to typedef int int32_t, and the same for uint32_t. The proper fix would be to update the source to eliminate the ambiguities which occour when int32_t is defined like this. I did intend to do this and send in a patch but haven't got around it yet. Richard
Thanks a lot, this was exactly the problem -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Richard Osborne Sent: Friday, August 15, 2008 1:34 PM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] install question Rubin, Norman wrote:> I'm trying to install llvm on my windows development box and hit a > problem > I'm using cygwin > cygwin% gcc --version > gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) > > I downloaded both the top of tree via svn > I ran ./configure > make > > make[1]: Entering directory `/cygdrive/c/llvm/lib/Support' > llvm[1]: Compiling APFloat.cpp for Debug build > llvm[1]: Compiling APInt.cpp for Debug build > APInt.cpp: In member function `void > llvm::APInt::Profile(llvm::FoldingSetNodeID&) const': > APInt.cpp:170: error: call of overloaded `AddInteger(const uint32_t&)' > is ambiguous > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:216: note: candidates > are: void llvm::FoldingSetNodeID::AddInteger(int) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:217: note: void > llvm::FoldingSetNodeID::AddInteger(unsigned int) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:218: note: void > llvm::FoldingSetNodeID::AddInteger(int64_t) > /cygdrive/c/llvm/include/llvm/ADT/FoldingSet.h:219: note: void > llvm::FoldingSetNodeID::AddInteger(uint64_t) > make[1]: *** [/cygdrive/c/llvm/lib/Support/Debug/APInt.o] Error 1 > make[1]: Leaving directory `/cygdrive/c/llvm/lib/Support' > make: *** [all] Error 1 > cygwin% > > I also tried the 2.3 release and got the same error. > I must have done something wrong - some care to enlighten me? > Hopefully this has not been asked many times already. If it is well > known, where should I have looked for the answer? > > Norm >I encountered this issue as well on Cygwin. The problem is Cygwin defines int32_t and uint32_t as longs instead of ints. A quick hack to get LLVM building is to edit /usr/include/stdint.h and change typedef long int32_t to typedef int int32_t, and the same for uint32_t. The proper fix would be to update the source to eliminate the ambiguities which occour when int32_t is defined like this. I did intend to do this and send in a patch but haven't got around it yet. Richard _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev