From: Erik T. <eh....@gm...> - 2010-12-28 00:06:02
|
2010/12/27 John E. / TDM <td...@td...> > On 12/26/2010 6:08 PM, Erik Toussaint wrote: > >> I would like to build GCC from source, using MinGW/MSYS on Windows. I have >> tried many times, but without success. I'll describe the most recent method >> I used below, and would be very grateful if anyone could tell me what it is >> that I'm doing wrong. >> > *snip* > > This fails during the 'make' stage, with the following error: >> >> E:\Temp\mingw\msys\1.0\mingw\bin\ld.exe: cannot find dllcrt2.o: No such >> file or >> directory >> > > You've omitted a piece of information that's very important in the > diagnosis: the command that produced the error, which is right before the > error itself. > > Sorry about that. I had to do a new build attempt, because I hadn't saved the output of the previous try. Here's the last command before the error: cp -p -f libgcc.map libgcc.map.def && if [ ! -d ./shlib ]; then mkdir ./shlib; e lse true; fi && /e/temp/gcc/build/./gcc/xgcc -B/e/temp/gcc/build/./gcc/ -L/e/tem p/gcc/build/i686-pc-mingw32/winsup/mingw -L/e/temp/gcc/build/i686-pc-mingw32/win sup/w32api/lib -isystem /e/temp/gcc/src/winsup/mingw/include -isystem /e/temp/gc c/src/winsup/w32api/include -B/mingw/i686-pc-mingw32/bin/ -B/mingw/i686-pc-mingw 32/lib/ -isystem /mingw/i686-pc-mingw32/include -isystem /mingw/i686-pc-mingw32/ sys-include -O2 -I../../src/gcc/../winsup/w32api/include -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wol d-style-definition -isystem ./include -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D_ _GCC_FLOAT_NOT_NEEDED -shared -nodefaultlibs libgcc.map.def -Wl,--out-implib,./ shlib/libgcc_s.a.tmp -o ./shlib/libgcc_s_sjlj-1.dll.tmp -g -O2 -B./ _chkstk_s.o _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmp di2_s.o _clear_cache_s.o _enable_execute_stack_s.o _trampoline_s.o __main_s.o _a bsvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mul vsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s .o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _p opcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powi df2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s. o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _f ixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi _s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s .o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o gthr-win 32_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s. o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o extendsftf2_s.o exten ddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o tf-signs _s.o unwind-dw2_s.o unwind-dw2-fde_s.o unwind-sjlj_s.o gthr-gnat_s.o unwind-c_s. o emutls_s.o -lmingw32 -lmingwex -lmoldname -lmsvcrt -luser32 -lkernel32 -ladvap i32 -lshell32 && if [ -f ./shlib/libgcc_s_sjlj-1.dll ]; then mv -f ./shlib/libgc c_s_sjlj-1.dll ./shlib/libgcc_s_sjlj-1.dll.backup; else true; fi && mv ./shlib/l ibgcc_s_sjlj-1.dll.tmp ./shlib/libgcc_s_sjlj-1.dll && mv ./shlib/libgcc_s.a.tmp ./shlib/libgcc_s.a e:\temp\mingw\msys\1.0\mingw\bin\ld.exe: cannot find dllcrt2.o: No such file or directory collect2: ld returned 1 exit status make[3]: *** [libgcc_s.dll] Error 1 make[3]: Leaving directory `/e/temp/gcc/build/i686-pc-mingw32/libgcc' make[2]: *** [all-stage1-target-libgcc] Error 2 make[2]: Leaving directory `/e/temp/gcc/build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/e/temp/gcc/build' make: *** [all] Error 2 EPIC FAIL > Without seeing the command, my best guess is that the search path ld should > be using to resolve that object file isn't being translated to the actual > Windows directory path -- I vaguely recall that happening to me before. > > These days, I make a point of building GCC in "identity" mounts, where the > Unixy path ("/mingw") directly corresponds to the underlying Windows path > ("C:\mingw"). This shouldn't be strictly necessary, but I suspect there are > some gotchas that can be avoided that way. To change your /mingw to an > identity mount, move E:\Temp\mingw\msys\1.0\mingw to E:\mingw, and edit your > E:\Temp\mingw\msys\1.0\etc\fstab accordingly. > > I'll have to give that a try. I'm just a bit puzzled that the method from that second link I mentioned doesn't work for me. That person doesn't mention any settings like this, but quite possibly his MinGW/MSYS system is set up different from mine from the start. I'll have to try to contact him to get more info. > Hope that helps, > John E. / TDM > Thanks for your input. |