I've blown a couple of weekends trying to build under MinGW. I can build the llvm tools with only a couple of minor hassles, but can't seem to make any headway with the C Front End Most errors I run into involve not being able to find header files. The most frustrating part is that the error messages report that the file can't be found, and then proceed to give a path to where the file actually is located. In the example below, the header "config/i386/xm-mingw32.h" cannot be found. BUT the include path, specified by "-I../../src/gcc/", leads right to the desired header. I can work-around this particular error by copying files out of the src directory into the corresponding places in the build directory. I'm left believing that something is fundamentally wront with my setup. Has anyone had any recent success building the CFE on MinGW? Thanks. $ xgcc -B/home/llvm-1.7/cfrontend/build/gcc -B/home/llvm-1.7/cfrontend/install/i686-pc-mingw32/bin/ -B/home/llvm-1.7/ cfrontend/install/i686-pc-mingw32/lib/ -isystem /home/llvm-1.7/cfrontend/install/i686-pc-mingw32/include -isystem /ho me/llvm-1.7/cfrontend/install/i686-pc-mingw32/sys-include -O2 -I../../src/gcc/../winsup/w32api/include -DIN_GCC -DDEF AULT_TARGET_MACHINE=\"i686-pc-mingw32\" -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./ include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I -I../../src -I../../src/gcc/ -I../../src/gcc/../include -DL_m uldi3 -c ../../src/gcc/libgcc2.c -o libgcc/./_muldi3.o In file included from ../../src/gcc/libgcc2.c:40: ./tconfig.h:5:37: config/i386/xm-mingw32.h: No such file or directory In file included from ../../src/gcc/libgcc2.c:41: ../../src/gcc/tsystem.h:75:19: stdio.h: No such file or directory ../../src/gcc/tsystem.h:78:23: sys/types.h: No such file or directory ../../src/gcc/tsystem.h:81:19: errno.h: No such file or directory ../../src/gcc/tsystem.h:88:20: string.h: No such file or directory ../../src/gcc/tsystem.h:89:20: stdlib.h: No such file or directory ../../src/gcc/tsystem.h:90:20: unistd.h: No such file or directory In file included from C:/msys/1.0/home/llvm-1.7/cfrontend/build/gcc/include/limits.h:122, from C:/msys/1.0/home/llvm-1.7/cfrontend/build/gcc/include/syslimits.h:7, from C:/msys/1.0/home/llvm-1.7/cfrontend/build/gcc/include/limits.h:11, from ../../src/gcc/tsystem.h:93, from ../../src/gcc/libgcc2.c:41: ./include/limits.h:122:61: no include path in which to search for limits.h In file included from ../../src/gcc/libgcc2.c:41: ../../src/gcc/tsystem.h:96:18: time.h: No such file or directory In file included from ../../src/gcc/libgcc2.c:43: ./tm.h:4:31: config/i386/i386.h: No such file or directory ./tm.h:5:31: config/i386/unix.h: No such file or directory ./tm.h:6:30: config/i386/bsd.h: No such file or directory ./tm.h:7:30: config/i386/gas.h: No such file or directory ./tm.h:8:29: config/dbxcoff.h: No such file or directory ./tm.h:9:34: config/i386/cygming.h: No such file or directory ./tm.h:10:34: config/i386/mingw32.h: No such file or directory ./tm.h:11:23: defaults.h: No such file or directory In file included from ../../src/gcc/libgcc2.c:44: ../../src/gcc/llvm-out.h:69: error: syntax error before '*' token ../../src/gcc/llvm-out.h:69: warning: function declaration isn't a prototype ../../src/gcc/libgcc2.c: In function `__mulhi3': ../../src/gcc/libgcc2.c:502: error: `BITS_PER_UNIT' undeclared (first use in this function) ../../src/gcc/libgcc2.c:502: error: (Each undeclared identifier is reported only once ../../src/gcc/libgcc2.c:502: error: for each function it appears in.)
Greg Pettyjohn <gregp at ccs.neu.edu> writes:> I've blown a couple of weekends trying to build under MinGW. > > I can build the llvm tools with only a couple of minor hassles, but can't > seem to make any headway with the C Front End > > Most errors I run into involve not being able to find header files. > The most frustrating part is that the error messages report that the file > can't be found, and then proceed to give a path to where the file actually > is located.This sounds like the problems people face when building a regular FSF gcc release under MinGW. There was some discussion about this topic recently on MinGW user's mailing list. Some workarounds were found, using absolute paths on the config scripts, IIRC. [snip] -- Oscar
I haven't seen this before, but it is vaguely reminiscent of a permissions problem. Permissions can be weird under cygwin/mingw. You have to ensure both the windows and the unix permissions allow the files to be read. In this environment, sometimes "file not found" can actually mean "directory not readable". Reid. On Sat, 2006-04-22 at 13:38 -0400, Greg Pettyjohn wrote:> I've blown a couple of weekends trying to build under MinGW. > > I can build the llvm tools with only a couple of minor hassles, but can't > seem to make any headway with the C Front End > > Most errors I run into involve not being able to find header files. > The most frustrating part is that the error messages report that the file > can't be found, and then proceed to give a path to where the file actually > is located. > > In the example below, the header "config/i386/xm-mingw32.h" cannot be > found. BUT the include path, specified by "-I../../src/gcc/", leads right > to the desired header. > > I can work-around this particular error by copying files out of the src > directory into the corresponding places in the build directory. > > I'm left believing that something is fundamentally wront with my setup. > > Has anyone had any recent success building the CFE on MinGW? > > Thanks. > > $ xgcc -B/home/llvm-1.7/cfrontend/build/gcc > -B/home/llvm-1.7/cfrontend/install/i686-pc-mingw32/bin/ -B/home/llvm-1.7/ > cfrontend/install/i686-pc-mingw32/lib/ -isystem > /home/llvm-1.7/cfrontend/install/i686-pc-mingw32/include -isystem /ho > me/llvm-1.7/cfrontend/install/i686-pc-mingw32/sys-include -O2 > -I../../src/gcc/../winsup/w32api/include -DIN_GCC -DDEF > AULT_TARGET_MACHINE=\"i686-pc-mingw32\" -W -Wall -Wwrite-strings > -Wstrict-prototypes -Wmissing-prototypes -isystem ./ > include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I -I../../src > -I../../src/gcc/ -I../../src/gcc/../include -DL_m > uldi3 -c ../../src/gcc/libgcc2.c -o libgcc/./_muldi3.o > In file included from ../../src/gcc/libgcc2.c:40: > ./tconfig.h:5:37: config/i386/xm-mingw32.h: No such file or directory > In file included from ../../src/gcc/libgcc2.c:41: > ../../src/gcc/tsystem.h:75:19: stdio.h: No such file or directory > ../../src/gcc/tsystem.h:78:23: sys/types.h: No such file or directory > ../../src/gcc/tsystem.h:81:19: errno.h: No such file or directory > ../../src/gcc/tsystem.h:88:20: string.h: No such file or directory > ../../src/gcc/tsystem.h:89:20: stdlib.h: No such file or directory > ../../src/gcc/tsystem.h:90:20: unistd.h: No such file or directory > In file included from > C:/msys/1.0/home/llvm-1.7/cfrontend/build/gcc/include/limits.h:122, > from > C:/msys/1.0/home/llvm-1.7/cfrontend/build/gcc/include/syslimits.h:7, > from > C:/msys/1.0/home/llvm-1.7/cfrontend/build/gcc/include/limits.h:11, > from ../../src/gcc/tsystem.h:93, > from ../../src/gcc/libgcc2.c:41: > ./include/limits.h:122:61: no include path in which to search for limits.h > In file included from ../../src/gcc/libgcc2.c:41: > ../../src/gcc/tsystem.h:96:18: time.h: No such file or directory > In file included from ../../src/gcc/libgcc2.c:43: > ./tm.h:4:31: config/i386/i386.h: No such file or directory > ./tm.h:5:31: config/i386/unix.h: No such file or directory > ./tm.h:6:30: config/i386/bsd.h: No such file or directory > ./tm.h:7:30: config/i386/gas.h: No such file or directory > ./tm.h:8:29: config/dbxcoff.h: No such file or directory > ./tm.h:9:34: config/i386/cygming.h: No such file or directory > ./tm.h:10:34: config/i386/mingw32.h: No such file or directory > ./tm.h:11:23: defaults.h: No such file or directory > In file included from ../../src/gcc/libgcc2.c:44: > ../../src/gcc/llvm-out.h:69: error: syntax error before '*' token > ../../src/gcc/llvm-out.h:69: warning: function declaration isn't a > prototype > ../../src/gcc/libgcc2.c: In function `__mulhi3': > > ../../src/gcc/libgcc2.c:502: error: `BITS_PER_UNIT' undeclared (first use > in this function) > ../../src/gcc/libgcc2.c:502: error: (Each undeclared identifier is > reported only once > ../../src/gcc/libgcc2.c:502: error: for each function it appears in.) > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060422/3b92350d/attachment.sig>
Is the MinGW user's list on the web? Can you give me a link to the thread? (What's IIRC?) Thanks. On Sat, 22 Apr 2006, Oscar Fuentes wrote:> Greg Pettyjohn <gregp at ccs.neu.edu> writes: > > > I've blown a couple of weekends trying to build under MinGW. > > > > I can build the llvm tools with only a couple of minor hassles, but can't > > seem to make any headway with the C Front End > > > > Most errors I run into involve not being able to find header files. > > The most frustrating part is that the error messages report that the file > > can't be found, and then proceed to give a path to where the file actually > > is located. > > This sounds like the problems people face when building a regular FSF > gcc release under MinGW. There was some discussion about this topic > recently on MinGW user's mailing list. Some workarounds were found, > using absolute paths on the config scripts, IIRC. > > [snip] > > -- > Oscar > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >