Chatsiri Ratana
2012-Apr-08 15:19 UTC
[LLVMdev] LLVM show error preprocessor "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
Hello All, I build source code of Ocelot[http://code.google.com/p/gpuocelot/]. It using LLVM dependency of Ocelot. llvm-config get cppflags represent as below in order to build with Ocelot. ./llvm-config --cppflags -I/home/chatsiri/workspacecpp/llvm/include -I/home/chatsiri/workspacecpp/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS Why DataType.h line 49 through error as #error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" g++ -o .release_build/ocelot/ir/implementation/ExternalFunctionSet.os -c -O2 -Wall -Werror -std=c++0x "-I/home/chatsiri/workspacecpp/llvm/include -I/home/chatsiri/workspacecpp/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" -fPIC -I. -I/home/chatsiri/workspacecpp/boost-truck -I.release_build/:/home/chatsiri/workspacecpp/glew-1.7.0/include -I:/home/chatsiri/workspacecpp/glew-1.7.0/include -I/home/chatsiri/workspacecpp/glew-1.7.0/include -I/home/chatsiri/workspacecpp/llvm/include -I.release_build -I. ocelot/ir/implementation/ExternalFunctionSet.cpp In file included from /home/chatsiri/workspacecpp/llvm/include/llvm/Support/type_traits.h:20, from /home/chatsiri/workspacecpp/llvm/include/llvm/ADT/StringRef.h:13, from /home/chatsiri/workspacecpp/llvm/include/llvm/PassRegistry.h:20, from /home/chatsiri/workspacecpp/llvm/include/llvm/PassSupport.h:25, from /home/chatsiri/workspacecpp/llvm/include/llvm/Pass.h:372, from /home/chatsiri/workspacecpp/llvm/include/llvm/PassManager.h:20, from ocelot/ir/implementation/ExternalFunctionSet.cpp:26: /home/chatsiri/workspacecpp/llvm/include/llvm/Support/DataTypes.h:49: error: #error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" /home/chatsiri/workspacecpp/llvm/include/llvm/Support/DataTypes.h:53: error: #error "Must #define __STDC_CONSTANT_MACROS before " "#including Support/DataTypes.h" scons: *** [.release_build/ocelot/ir/implementation/ExternalFunctionSet.os] Error 1 Build failed Best Regards, Chatsiri Rattana -- :-------------------------------------------------------- http://about.me/chatsiri.ratana -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120408/34e66607/attachment.html>
Peter Collingbourne
2012-Apr-09 01:12 UTC
[LLVMdev] LLVM show error preprocessor "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
On Sun, Apr 08, 2012 at 10:19:40PM +0700, Chatsiri Ratana wrote:> Hello All, > > I build source code of Ocelot[http://code.google.com/p/gpuocelot/]. It > using LLVM dependency of Ocelot. llvm-config get cppflags represent as > below in order to build with Ocelot. > > ./llvm-config --cppflags > -I/home/chatsiri/workspacecpp/llvm/include > -I/home/chatsiri/workspacecpp/llvm/include -D_DEBUG -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > > Why DataType.h line 49 through error as #error "Must #define > __STDC_LIMIT_MACROS before #including Support/DataTypes.h" > > g++ -o .release_build/ocelot/ir/implementation/ExternalFunctionSet.os -c > -O2 -Wall -Werror -std=c++0x "-I/home/chatsiri/workspacecpp/llvm/include > -I/home/chatsiri/workspacecpp/llvm/include -D_DEBUG -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"I suspect it is because this part of your command line is in quotation marks. If you remove the quotation marks you should be fine. Thanks, -- Peter
Seemingly Similar Threads
- [LLVMdev] Compile-rt throw error undeclared identifier 'O_CLOEXEC'
- [LLVMdev] Compile-rt throw error undeclared identifier 'O_CLOEXEC'
- [LLVMdev] Compile-rt throw error undeclared identifier 'O_CLOEXEC'
- Libvirt source code cannot built with libnettle.
- [LLVMdev] Predication on SIMD architectures and LLVM