Build fails for svn r46191. make[2]: Entering directory `/home/edwin/llvm-svn/llvm/utils/TableGen' llvm[2]: Compiling FileParser.cpp for Release build In file included from /home/edwin/llvm-svn/llvm/include/llvm/ADT/APFloat.h:105, from /home/edwin/llvm-svn/llvm/include/llvm/ADT/StringExtras.h:19, from /home/edwin/llvm-svn/llvm/utils/TableGen/FileParser.y:17: /home/edwin/llvm-svn/llvm/include/llvm/ADT/APInt.h:216: error: expected ‘,’ or ‘...’ before numeric constant make[2]: *** [/home/edwin/llvm-svn/llvm/utils/TableGen/Release/FileParser.o] Error 1 make[2]: Leaving directory `/home/edwin/llvm-svn/llvm/utils/TableGen' make[1]: *** [TableGen/.makeall] Error 2 make[1]: Leaving directory `/home/edwin/llvm-svn/llvm/utils' make: *** [all] Error 1 That line contains: /// Profile - Used to insert APInt objects, or objects that contain APInt /// objects, into FoldingSets. void Profile(FoldingSetNodeID& ID) const;
Environment: $ g++ -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --disable-libmudflap --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.2.3 20080114 (prerelease) (Debian 4.2.2-7) $ uname -a Linux lightspeed2 2.6.24-rc8-g8b2d1833-dirty #4 Sat Jan 19 13:33:53 EET 2008 x86_64 GNU/Linux
This looks like a potential macro conflict in preprocessed source for FileParser.cpp. I have committed r46193 which provides a hack to hopefully fix this problem ('ID' is renamed to 'id'): http://llvm.org/viewvc/llvm-project?rev=46193&view=rev Edwin: Can you confirm that this fixes the problem? Also, what would be helpful is if you could attach the preprocessed source for FileParser.cpp. Having a name conflict on something like the word 'ID' seems like badness to me, making believe that the root cause of this problem is elsewhere.
Created attachment 1344 [details] preprocessed source, before updating from SVN This is the preprocessed source, I see no conflicts on ID...
(In reply to comment #3) > Created an attachment (id=1344) [details] > preprocessed source, before updating from SVN > > This is the preprocessed source, I see no conflicts on ID... > Ehrm, I was wrong, ID got expanded to 278.
Thanks. It looks like ID is an enum value in the generated output of bison. Does the build work for you now?
(In reply to comment #5) > Thanks. It looks like ID is an enum value in the generated output of bison. > Does the build work for you now? > Yes, utils/TableGen builds now. The rest is still compiling, but I suppose those will be ok too. Thanks.