[LLVMdev] Error building with Mingw on Win7
Kenneth Boyd
zaimoni at zaimoni.com
Tue Jun 22 14:29:09 PDT 2010
On 6/22/2010 2:47 PM, J. Garrett Morris wrote:
> Hello everyone,
>
> I've run across a problem building LLVM 2.7 with Mingw on Win7. When
> I try make VERBOSE=1, it churns away happily for a while and then
> produces:
>
> /c/Perl/bin/perl /c/Programs32/llvm-2.7/utils/GenLibDeps.pl -flat /c/Programs
> 32/llvm-2.7/obj/Release/lib "/mingw/bin/nm"> /c/Programs32/llvm-2.7/obj/tools/
> llvm-config/LibDeps.txt.tmp
> 'c:' is not recognized as an internal or external command, operable
> program or batch file.
> nm failed at c:/Programs32/llvm-2.7/utils/GenLibDeps.pl line 232.
>
Which Perl are you using?
* The stock LLVM/configure build process requires the binary Perl
distribution from the MingW project, which uses sh as the command shell.
* Windows-native Perls use cmd.exe (on Win7, at least) so will fail,
with this exact error message, without counter-measures. (I'll have to
repull SVN to see what the current required patches are; they're not
that difficult.)
Note that if you build Perl from official source with MingW, with
default options, you'll end up with cmd.exe as the command shell.
> However, I can't manage to reproduce the failure by hand:
>
> /mingw/bin/nm c:/Programs32/llvm-2.7/obj/Release/lib/libLLVMARMAsmParser.a |
> sed -e 's/^[ 0]* U //' | sort | uniq
>
> produces sensible looking output, and
>
I presume that command line was in sh. It'll die in cmd.exe with the
error message you see. (It doesn't help that it's very likely it'll
find Win7 sort rather than the POSIX-y MingW sort in cmd.exe .)
Kenneth
More information about the llvm-dev
mailing list