Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

LLVM-GCC fails to build on MingW (non bootstrap). #3940

Closed Quuxplusone closed 6 years ago

Quuxplusone commented 15 years ago
Bugzilla Link PR3552
Status RESOLVED FIXED
Importance P release blocker
Reported by Julien Lerouge (jlerouge@apple.com)
Reported on 2009-02-11 13:20:36 -0800
Last modified on 2018-11-07 00:22:05 -0800
Version unspecified
Hardware PC All
CC anton@korobeynikov.info, dpatel@apple.com, llvm-bugs@lists.llvm.org, llvm@sunfishcode.online, tonic@nondot.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
LLVM-GCC doesn't build on MingW, starting with revision 61207, doing a non-
bootstrap build.

* rev 61207 introduces the following error:

make[4]: Entering directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
61207/gcc-build/i686-pc-mingw32/libstdc++-v3/include'
if [ ! -d "./i686-pc-mingw32/bits/stdc++.h.gch" ]; then \
  mkdir -p ./i686-pc-mingw32/bits/stdc++.h.gch; \
fi; \
/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61207/gcc-build/./gcc/xgcc -
shared-libgcc -B/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61207/gcc-
build/./gcc -nostdinc++ -L/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
61207/gcc
-build/i686-pc-mingw32/libstdc++-v3/src -L/c/cygwin/home/jlerouge/buildbot/llvm-
test-fixed-61207/gcc-build/i686-pc-mingw32/libstdc++-v3/src/.libs -
L/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61207/gcc-build/i686-pc-mingw32/winsup/
mingw -L/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61207/gcc-build/i686-
pc-mingw32/winsup/w32api/lib -isystem /c/cygwin/home/jlerouge/buildbot/llvm-
test-fixed-gcc4.2-src/winsup/mingw/include -isystem
/c/cygwin/home/jlerouge/buildb
ot/llvm-test-fixed-gcc4.2-src/winsup/w32api/include -
Bc:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61207/i686-pc-mingw32/bin/ -
Bc:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61207/i686-pc-mingw32/lib/ -
isystem c:/cygwin/home/jler
ouge/buildbot/llvm-test-fixed-61207/i686-pc-mingw32/include -isystem
c:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61207/i686-pc-mingw32/sys-
include -Winvalid-pch -Wno-deprecated -x c++-header -g -O2  -
I/c/cygwin/home/jlerouge/buildb
ot/llvm-test-fixed-61207/gcc-build/i686-pc-mingw32/libstdc++-v3/include/i686-pc-
mingw32 -I/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61207/gcc-build/i686-
pc-mingw32/libstdc++-v3/include -I/c/cygwin/home/jlerouge/buildbot/llvm-test
-fixed-gcc4.2-src/libstdc++-v3/libsupc++ -O0 -g
/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-gcc4.2-src/libstdc++-
v3/include/precompiled/stdc++.h -o i686-pc-mingw32/bits/stdc++.h.gch/O0g.gch
make[4]: *** [i686-pc-mingw32/bits/stdc++.h.gch/O0g.gch] Error 1
make[4]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
61207/gcc-build/i686-pc-mingw32/libstdc++-v3/include'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
61207/gcc-build/i686-pc-mingw32/libstdc++-v3'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
61207/gcc-build/i686-pc-mingw32/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
61207/gcc-build'

SVN log:
------------------------------------------------------------------------
r61207 | dpatel | 2008-12-18 11:18:20 -0800 (Thu, 18 Dec 2008) | 3 lines
Changed paths:
   M /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp

Reuse DIType slot used for foward declaration for real definition.

------------------------------------------------------------------------

* And then, rev 61215 introduces another error, earlier in the build process:

/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61215/gcc-build/./gcc/xgcc -
B/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61215/gcc-build/./gcc/ -
L/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61215/gcc-build/i686-pc-mingw32/win
sup/mingw -L/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61215/gcc-
build/i686-pc-mingw32/winsup/w32api/lib -isystem
/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-gcc4.2-
src/winsup/mingw/include -isystem /c/cygwin/home/jlerouge/bu
ildbot/llvm-test-fixed-gcc4.2-src/winsup/w32api/include -
Bc:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61215/i686-pc-mingw32/bin/ -
Bc:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61215/i686-pc-mingw32/lib/ -
isystem c:/cygwin/home/
jlerouge/buildbot/llvm-test-fixed-61215/i686-pc-mingw32/include -isystem
c:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-61215/i686-pc-mingw32/sys-
include -c -DHAVE_CONFIG_H -O2 -g -O2  -I. -I../../../../llvm-test-fixed-gcc4.2-
src/libi
berty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-
compat ../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c -o pex-
win32.o
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c: In function
'argv_to_cmdline':
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c:365: warning:
request for implicit conversion from 'void *' to 'char *' not permitted in C++
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c: In function
'find_executable':
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c:440: warning:
request for implicit conversion from 'void *' to 'char *' not permitted in C++
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c: In function
'win32_spawn':
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c:566: warning:
request for implicit conversion from 'void *' to 'char **' not permitted in C++
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c:573: warning:
request for implicit conversion from 'void *' to 'char *' not permitted in C++
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c: At top level:
../../../../llvm-test-fixed-gcc4.2-src/libiberty/pex-win32.c:900: internal
compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[2]: *** [pex-win32.o] Error 1
make[2]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
61215/gcc-build/i686-pc-mingw32/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
61215/gcc-build'
make: *** [all] Error 2

SVN log:
------------------------------------------------------------------------
r61215 | djg | 2008-12-18 14:03:42 -0800 (Thu, 18 Dec 2008) | 3 lines
Changed paths:
   M /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp

When emitting instructions that define EFLAGS and the EFLAGS value isn't
used, mark the defs as dead.

------------------------------------------------------------------------

I believe those two problems are still there in the current 2.5 branch (as of
rev 64291).
Quuxplusone commented 15 years ago

These are both blockers for the 2.5 release.

Quuxplusone commented 15 years ago

Will check

Quuxplusone commented 15 years ago
Can someone test if r64316 from trunk fixes the second
issue -- the regression introduced by r61215?
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090209/073612.html
Quuxplusone commented 15 years ago

Testing right now... thanks.

Quuxplusone commented 15 years ago

... still building, I had to apply the patch here also to build LLVM: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090209/073573.html

Although there seems to be something weird going on with llvm-config, the one generated on my MingW was empty at first. Removing it and rebuilding fixed the pbm though (I'll investigate later).

Quuxplusone commented 15 years ago
Ok, r64316 is indeed fixing the pex-win32 error, but I am now hitting a new
assertion later on in the build:

/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-64316/gcc-build/./gcc/xgcc -
B/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-64316/gcc-build/./gcc/ -
L/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-64316/gcc-build/i686-pc-mingw32/win
sup/mingw -L/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-64316/gcc-
build/i686-pc-mingw32/winsup/w32api/lib -isystem
/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-gcc4.2-
src/winsup/mingw/include -isystem /c/cygwin/home/jlerouge/bu
ildbot/llvm-test-fixed-gcc4.2-src/winsup/w32api/include -
Bc:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-64316/i686-pc-mingw32/bin/ -
Bc:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-64316/i686-pc-mingw32/lib/ -
isystem c:/cygwin/home/
jlerouge/buildbot/llvm-test-fixed-64316/i686-pc-mingw32/include -isystem
c:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-64316/i686-pc-mingw32/sys-
include  -O2 -I../../../llvm-test-fixed-gcc4.2-src/gcc/../winsup/w32api/include
-O2 -g -
O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-
prototypes -Wold-style-definition  -isystem ./include   -g  -DIN_LIBGCC2 -
D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../../llvm-test-fixed-gcc4.2-src/gcc -
I../../../llvm-
test-fixed-gcc4.2-src/gcc/. -I../../../llvm-test-fixed-gcc4.2-
src/gcc/../include -I../../../llvm-test-fixed-gcc4.2-src/gcc/../libcpp/include
-I../../../llvm-test-fixed-gcc4.2-src/gcc/../libdecnumber -I../libdecnumber -
Ic:/cygwin/home/j
lerouge/buildbot/llvm-test-fixed-64316/llvm-build/include -
I/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-src/include -DL_mulsc3 -c
../../../llvm-test-fixed-gcc4.2-src/gcc/libgcc2.c -o libgcc/./_mulsc3.o
Assertion failed: StackTop > 0 && "Cannot pop empty stack!", file
c:/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
src/lib/Target/X86/X86FloatingPoint.cpp, line 553

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
../../../llvm-test-fixed-gcc4.2-src/gcc/libgcc2.c:1914: internal compiler
error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[3]: *** [libgcc/./_mulsc3.o] Error 1
make[3]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
64316/gcc-build/gcc'
make[2]: *** [libgcc.a] Error 2
make[2]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
64316/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/c/cygwin/home/jlerouge/buildbot/llvm-test-fixed-
64316/gcc-build'
make: *** [all] Error 2
++ FailedExit
Quuxplusone commented 15 years ago

My last try was on the trunk, I will try again on the 2.5 branch to see how far it goes, with Dan's fix.

Quuxplusone commented 15 years ago

Building on the 2.5 branch went through (minor glitch because my version of make does not support order-only dependencies, but that's an easy upgrade). Dan's fix is the only patch required to get llvm-gcc on MingW !

Any idea about what's causing the assertion on the trunk ?

Quuxplusone commented 15 years ago
Ok the trunk is working now (it wasn't as of rev 64365). I think Evan fixed if
with this one:

------------------------------------------------------------------------
r64374 | evancheng | 2009-02-12 02:32:17 -0800 (Thu, 12 Feb 2009) | 2 lines
Changed paths:
   M /llvm/trunk/lib/CodeGen/VirtRegMap.cpp
   A /llvm/trunk/test/CodeGen/X86/2009-02-12-SpillerBug.ll

It's (currently) not safe to keep certain physical registers live across basic
blocks, e.g. x86 fp stack registers.
------------------------------------------------------------------------

To summarize:
- trunk is good now (I checked in the Alarm thing and the googletest fix).
- 2.5 branch is fixed if Dan's patch (r64316) is applied and googletest is
disabled.

Tanya, what do you want to do for googletest in 2.5 ? Can you merge Dan's fix ?

Thanks,
Julien
Quuxplusone commented 15 years ago
(In reply to comment #9)
> - 2.5 branch is fixed if Dan's patch (r64316) is applied and googletest is
> disabled.
I'm currently testing mingw32 build with Dan's patch integrated. Also, gtest
was completely removed :)

Will post the results as soon as my tests will over
Quuxplusone commented 15 years ago

I've merged 64316 into the branch. I've also merged in Mike's changes for googletest and also the changes Julien made.

I believe that is all that is needed for this bug.

I'll need a final verification and then it can be closed.

Quuxplusone commented 15 years ago

Ok, I am re-building everything right now. Thanks.

Quuxplusone commented 15 years ago

Yep, the build went through. Thanks !