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

Matt Elder elder at cs.wisc.edu
Fri Aug 14 14:37:49 PDT 2009


Kevin J. Cummings wrote:
> 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:
>>
>> [...]/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"
> 
> 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.
> 

Hey, this worked.

I added "-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS" to the
assignment of FIXINC_FLAGS in
llvm-gcc-...-source/fixincludes/Makefile.in, then reran configure; make;
make install a la LLVM's README file.

Thanks!
- Matt Elder




More information about the llvm-dev mailing list