[LLVMdev] Fail when building llvm2.9 using MinGW64

陈晓宇 xychen0921 at gmail.com
Mon May 16 03:39:30 PDT 2011


I can successfully build llvm 2.9 with MinGW64 now, by adding
"LDFLAGS=-Wl,--stack,16777216" to configuration. LLVM "getting started" has
the following tip but I was not aware of it.

12. To compile SPU backend, you need to add "LDFLAGS=-Wl,--stack,16777216" to
configure.

Thanks for your help, Takumi !


在 2011年5月16日 下午5:46,NAKAMURA Takumi <geek4civic at gmail.com>写道:

> Chen, see http://llvm.org/docs/GettingStarted.html#pf_12
>
> ...Takumi
>
> ps. Excuse me, PE+ (aka pep) means "Executable file format for WIndows
> x64".
>
> 2011/5/16 陈晓宇 <xychen0921 at gmail.com>:
> > The stack trace:
> >
> > Starting program:
> > C:\MinGW\msys\1.0\home\xchen\llvm-obj\lib\Target\CellSPU/../..
> > /../Debug/bin/tblgen.exe -I
> ../../../../llvm2.9/llvm-2.9/lib/Target/CellSPU
> > -I .
> > ./../../../llvm2.9/llvm-2.9/include -I
> > ../../../../llvm2.9/llvm-2.9/lib/Target -
> > gen-dag-isel -o tmp
> ../../../../llvm2.9/llvm-2.9/lib/Target/CellSPU/SPU.td
> > [New Thread 3852.0x1074]
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x000000000049025a in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:249
> > 249     static void FactorNodes(OwningPtr<Matcher> &MatcherPtr) {
> > (gdb) bt
> > #0  0x000000000049025a in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:249
> > #1  0x00000000004902ff in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > #2  0x00000000004902ff in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > #3  0x00000000004902ff in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > #4  0x00000000004902ff in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > #5  0x00000000004902ff in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > #6  0x00000000004902ff in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > #7  0x00000000004902ff in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > ... ...
> > ... ...
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > #1061 0x00000000004902ff in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:257
> > #1062 0x0000000000490395 in FactorNodes (MatcherPtr=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:267
> > #1063 0x000000000049172a in llvm::OptimizeMatcher (TheMatcher=0x689a5f0,
> >     CGP=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelMatch
> > erOpt.cpp:512
> > #1064 0x0000000000480e3a in llvm::DAGISelEmitter::run (this=0x22f760,
> > OS=...)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/DAGISelEmitt
> > er.cpp:155
> > #1065 0x0000000000526188 in main (argc=11, argv=0x322520)
> >     at
> > C:/MinGW/msys/1.0/home/xchen/llvm2.9/llvm-2.9/utils/TableGen/TableGen.cpp
> > :318
> > Thanks.
> > 在 2011年5月16日 下午2:45,陈晓宇 <xychen0921 at gmail.com>写道:
> >>
> >> Thanks for the response!
> >> I have tried using --build, the build failed and windows reported tblgen
> >> execution error, see attachment.
> >> I am not sure what you mean by PE+ executable, is that 64 bit
> executable?
> >> On my 64 bit PC, the g++ works well and a simple 64bit hello-world can
> run.
> >> Regards
> >>
> >> 2011/5/16 NAKAMURA Takumi <geek4civic at gmail.com>
> >>>
> >>> Chen,
> >>>
> >>> 2011/5/13 陈晓宇 <xychen0921 at gmail.com>:
> >>> > ../llvm2.9/configure --prefix=/home/AutoESL/llvm-obj
> >>> >                             --host=x86_64-w64-mingw32
> >>> >                             --disable-multilib
> >>>
> >>> Please try with "--build=x86_64-w64-mingw32", not "--host".
> >>>
> >>> If you would still have any troubles, make sure your
> >>> x86_64-w64-g++.exe can generate correct PE+ executable.
> >>>
> >>> And, please post your environments as below (could be gzip-ed if they
> >>> would be bigger);
> >>>
> >>>  - config.log
> >>>  - Makefile.config
> >>>  - the log of "make VERBOSE=1"
> >>>
> >>> Please note, Windows x64 support on llvm-(at least 2.9) would be
> >>> immature.
> >>> Feel free to ask us (on the list) if you got any troubles.
> >>>
> >>> Thank you, ...Takumi
> >>
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110516/23bb2ac2/attachment.html>


More information about the llvm-dev mailing list