[LLVMdev] Build errors: llvm-gcc 4.3-2.5, x86-64.

Kevin J. Cummings cummings at kjchome.homeip.net
Thu Aug 13 17:15:14 PDT 2009


On 08/13/2009 07:35 PM, Matt Elder wrote:
>  From an x86-64 machine, I'm trying to compile llvm and llvm-gcc. I'm 
> using the LLVM 2.5 release, and the associated llvm-gcc tarball. llvm 
> compiles fine; ours is compiled to a Debugging version. llvm-gcc, 
> though, is angry. I get the following error (with path prefixes 
> shortened for convenience) when compiling llvm-gcc:
> 
>> In file included from [...]/llvm/include/llvm/ADT/SmallPtrSet.h:20,
>>                  from [...]/llvm/include/llvm/ADT/SmallSet.h:18,
>>                  from [...]/llvm/include/llvm/ADT/SetVector.h:23,
>>                  from ../../llvm-gcc-src/gcc/llvm-internal.h:38,
>>                  from ../../llvm-gcc-src/gcc/llvm-backend.cpp:23:
>> [...]/llvm/include/llvm/Support/DataTypes.h:38:3: error: #error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
>> [...]/llvm/include/llvm/Support/DataTypes.h:42:3: error: #error "Must #define __STDC_CONSTANT_MACROS before #including Support/DataTypes.h"
> 
> I've fiddled with make options a bit, and I'm not even sure how to get a 
>   -D__STDC_LIMIT_MACROS option through the build system. (I don't think 
> it's the right way to fix this problem, I just thought that build might 
> fail informatively.) I've searched the last year or so of LLVM-dev 
> archives to no avail, and the web hasn't been particularly helpful.
> 
> Does this issue ring a bell with anybody? Any ideas what I should try next?

IIRC, when I built LLVM-GCC on F11.i586 I ran into the same problem.  I
think I solved it by DEFINEing those names in the command line.  So long
as gcc (or whatever you are using to build with) sees those symbols as
DEFINEs, it will build.

> Thanks,
> - Matt Elder
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


-- 
Kevin J. Cummings
kjchome at rcn.com
cummings at kjchome.homeip.net
cummings at kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)



More information about the llvm-dev mailing list