[LLVMdev] 2.6 pre-release1 ready for testing

Olivier Meurant meurant.olivier at gmail.com
Thu Sep 3 06:24:53 PDT 2009

Hi Tanya,

I have tried the 2.6 pre-release on the following host :

Windows XP pro SP2 with mingw/msys :

uname -a
MINGW32_NT-5.1 OLIVE 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown

gcc -v
Reading specs from d:/mingw/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld
--with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw
--enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java
--disable-win32-registry --disable-shared --enable-sjlj-exceptions
--enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm
--disable-libgcj-debug --enable-interpreter --enable-hash-synchronization
Thread model: win32
gcc version 3.4.5 (mingw special)

- srcDir != objDir
- The build went fine. (configure and make)
- llvm make check : not possible under mingw (dejagnu...)
- clang make check fails :

Every call to clang binary ends like this :
./Release/bin/clang foo.c
Stack dump:
0.      Program arguments: d:/llvm/llvm-2.6/build/Release/bin/clang-cc.exe
-triple i386-pc-mingw32 -S -disable-free -main-file-name foo.c
--relocation-model static --disable-fp-elim --unwind-tables=0
--mcpu=pentium4 --fmath-errno=1 -fdiagnostics-show-option -o
C:/Temp/cc-000000.s -x c foo.c
77C42A16 (0x0022F958 0x0167C757 0x0022F988 0x0167CBE8), wscanf()+1872
77C3F962 (0x0022F9B0 0x0167C757 0x0167CBE8 0xFFFFFFFF), sprintf()+0049
0046DA0C (0x10202000 0x20101010 0x20202020 0x60404020)
01AED7D4 (0x015B9F80 0x015B8590 0x015B9070 0x0081BC20) <unknown module>
01107940 (0x95340800 0x24048901 0x71ECFBE8 0x0CC483FF)
C7102444 (0x00000000 0x00000000 0x00000000 0x00000000) <unknown module>
clang: error: compiler command failed due to signal 1073741819 (use -v to
see invocation)

A debug build fails on the same problem :
./Debug/bin/clang foo.c
Stack dump:
0.      Program arguments:
d:/llvm/llvm-2.6/build_debug/Debug/bin/clang-cc.exe -triple i386-pc-mingw32
-S -disable-free -main-file-name foo.c --relocation-model static
--disable-fp-elim --unwind-tables=0 --mcpu=pentium4 --fmath-errno=1
-fdiagnostics-show-option -o C:/Temp/cc-000000.s -x c foo.c
77C42A16 (0x0022F948 0x01354530 0x0022F978 0x121CC7A8), wscanf()+1872
77C3F962 (0x0022F9A0 0x01354530 0x013548FD 0xFFFFFFFF), sprintf()+0049
0043EC6D (0x013548FD 0x00000040 0x01354896 0x00000001)
0043F2C5 (0x003D4068 0x121CC1F4 0x0022FAD0 0x01354BC9)
0043F90C (0x121CC1F0 0x0022FB20 0x0022FD00 0x003D4068)
010C2752 (0x0022FC50 0x0022FE10 0x0022FD00 0x003D4068)
00406086 (0x00000013 0x003D3F90 0x003D3028 0x015CF000)
0040124B (0x00000001 0x00000009 0x0022FFF0 0x7C816FE7)
00401298 (0x002420A8 0x0022F1E8 0x7FFD7000 0xC0000005)
7C816FE7 (0x00401280 0x00000000 0x78746341 0x00000020),
RegisterWaitForInputIdle()+0073 bytes(s)
clang: error: compiler command failed due to signal 1073741819 (use -v to
see invocation)

Here is the stack trace, I try to re-build :
(anonymous namespace)::DriverPreprocessorFactory::CreatePreprocessor()
clang::PreprocessorInitOptions const&)
clang::InitializePredefinedMacros(clang::TargetInfo const&,
clang::LangOptions const&, std::vector<char, std::allocator<char> >&)
clang::DefineTypeSize(char const*, unsigned int, char const*, bool,
std::vector<char, std::allocator<char> >&)

The "faulty" call to DefineTypeSize is the 5th. The one which used a "long
long" type.
In the method DefineTypeSize, the call to sprintf is as follow :
sprintf(MacroBuf, "%s=%llu%s", MacroName, MaxVal, ValSuffix);
and should be transformed to :
sprintf(MacroBuf, "%s=%I64u%s", MacroName, MaxVal, ValSuffix);
as mingw toolchain don't support "%llu" marker.

With this correction, clang seems to work on this platform.

I wanted to provide a patch but I'm not able to find something like
"LLVM_ON_MINGW" macro definition. Sorry. :(
Thanks for your work !


On Wed, Sep 2, 2009 at 10:19 PM, Bill Wendling <isanbard at gmail.com> wrote:

> Hi Tanya,
> The sources weren't updated for this pre-release testing. So I had the
> same problems on PPC.
> -bw
> On Sun, Aug 30, 2009 at 10:50 PM, Tanya Lattner<lattner at apple.com> wrote:
> > LLVMers,
> > 2.6 pre-release1 is ready to be tested by the community.
> > http://llvm.org/prereleases/2.6/
> > You will notice that we have quite a few pre-compiled binaries (of both
> > clang and llvm-gcc). We have identified several bugs that will be fixed
> in
> > pre-release2, so please search the bug database before filing a new bug.
> > If you have time, I'd appreciate anyone who can help test the release.
> > To test llvm-gcc:
> > 1) Compile llvm from source and untar the llvm-test in the projects
> > directory (name it llvm-test or test-suite). Choose to use a pre-compiled
> > llvm-gcc or re-compile it yourself.
> > 2) Run make check, report any failures (FAIL or unexpected pass). Note
> that
> > you need to reconfigure llvm with llvm-gcc in your path or with
> > --with-llvmgccdir
> > 3) Run "make TEST=nightly report" and send me the report.nightly.txt
> >
> > To test clang:
> > 1) Compile llvm and clang from source.
> > 2) Run make check for llvm.
> > 3) Run make  -C tools/clang-2.6 test VERBOSE=1 (report any failures or
> > unexpected passes)
> > When reporting your results, please provide details on what platform you
> > compiled on, and how
> > you built LLVM (src == obj, or src != obj), clang, and/or llvm-gcc.
> > Please COMPLETE ALL TESTING BY end of the day on Sept. 5th!
> > Thanks, Tanya Lattner
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> >
> >
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090903/b0b90af6/attachment.html>

More information about the llvm-dev mailing list