[LLVMdev] clang build (Debug+Asserts) fails with Cygwin and Mingw (ASTContext.o: File too big)
David Blaikie
dblaikie at gmail.com
Fri May 2 13:41:37 PDT 2014
Any idea what all those sections are - comdat inline functions?
Does the debug info in COFF do something weird and emit a section per
type or function?
On Fri, May 2, 2014 at 1:11 PM, Liviu Gheorghisan <livghe at gmx.com> wrote:
> Hello,
>
> After switching from a Linux development host to Windows7 with Cygwin, I
> notice the following problem when building clang (trunk, HEAD):
> (also happens with Mingw)
>
> ...
>
> llvm[4]: Compiling ParseInit.cpp for Debug+Asserts build
> as:
> /cygdrive/d/Projects/Cpp/llvm/cfgCygwin/tools/clang/lib/AST/Debug+Asserts/ASTContext.o:
> too many sections (33066)
> /tmp/ccmtDH7w.s: Assembler messages:
> /tmp/ccmtDH7w.s: Fatal error: can't write
> /cygdrive/d/Projects/Cpp/llvm/cfgCygwin/tools/clang/lib/AST/Debug+Asserts/ASTContext.o:
> File too big
> as:
> /cygdrive/d/Projects/Cpp/llvm/cfgCygwin/tools/clang/lib/AST/Debug+Asserts/ASTContext.o:
> too many sections (33066)
> /tmp/ccmtDH7w.s: Fatal error: can't close
> /cygdrive/d/Projects/Cpp/llvm/cfgCygwin/tools/clang/lib/AST/Debug+Asserts/ASTContext.o:
> File too big
> /cygdrive/d/Projects/Cpp/llvm/Makefile.rules:1509: recipe for target
> '/cygdrive/d/Projects/Cpp/llvm/cfgCygwin/tools/clang/lib/AST/Debug+Asserts/ASTContext.o'
> failed
> make[4]: ***
> [/cygdrive/d/Projects/Cpp/llvm/cfgCygwin/tools/clang/lib/AST/Debug+Asserts/ASTContext.o]
> Error 1
> make[4]: Leaving directory
> '/cygdrive/d/Projects/Cpp/llvm/cfgCygwin/tools/clang/lib/AST'
> /cygdrive/d/Projects/Cpp/llvm/Makefile.rules:936: recipe for target
> 'AST/.makeall' failed
> make[3]: *** [AST/.makeall] Error 2
>
> ...
>
>
> The reason for this seems to be that the COFF object format in Windows only
> supports a maximum of 2^15 sections (32768) for obj files.
>
> To work around this issue, Microsoft's compiler cl has a flag called /bigobj
> that allocates 32 bits in order to store the number of sections (instead of
> 16 bits, as this standard specifies:
> http://msdn.microsoft.com/en-us/library/gg463119.aspx )
>
> Also check this for /bigobj:
> http://msdn.microsoft.com/en-us/library/ms173499.aspx
>
> Anybody else having this problem with Mingw/Cygwin? If yes, how did you
> overcome it?
>
> My Cygwin version is this:
> $ uname -a
> CYGWIN_NT-6.1 livghe-i5 1.7.29(0.272/5/3) 2014-04-07 13:46 x86_64 Cygwin
>
> The only option I currently see is to split the mammoth cpp file
> (ASTContext.cpp) in 2 parts, or to get rid of the debug info (not desired).
>
>
> --
> Best Regards,
> -Liviu
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list