X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi) [via djgpp AT delorie DOT com]" Subject: Random compile errors under WIndows (32 bit Windows Vista and Windows 10) To: djgpp AT delorie DOT com Message-ID: <5611566C.4020507@iki.fi> Date: Sun, 4 Oct 2015 19:40:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com I have earlier noticed random stray compile errors when building DJGPP port of gcc under Windows Vista Business. Running make again compiled some file without problems. Such errors where extremely rare for DJGPP CVS from CVS (also 2.04 before bumping version to 2.05). I usually did not get them at all for 2.04 or 2.05. The situation was noticeably worse for 2.03p2. Building GCC was still possible but I had to restart build often enough. I have 64-bit Windows 10 (earlier Windows 7) on desktop computer and dual boot with Linux (currently Fedora 22 x86_64). So there no DJGPP testing possible in this Windows installation for understandable reasons. Today downloaded 32 bit Windows 10 Enterprise 90 days trial from Microsoft and installed it in VirtualBox VM under Linux. I needed slightly more steps to get DJGPP working rather than on Windows Vista (for VIsta only registry hack was needed to workaround 32MB DMPI memory limit) Trying to build gcc-5.2.0 on this Windows 10 installation (DJGPP v2.05 only) showed that I'm getting stray compiler errors much more often (once per several minutes) These errors look like: gpp -c -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -Ic-family -I/gcc-5.20/gcc -I/gcc-5.20/gcc/c-family -I/gcc-5.20/gcc/../include -I/gcc-5.20/gcc/../libcpp/include -I/gcc-5.20/gcc/../libdecnumber -I/gcc-5.20/gcc/../libdecnumber/dpd -I../libdecnumber -I/gcc-5.20/gcc/../libbacktrace -I/dev/env/DJDIR/include -o c-family/c-gimplify.o -MT c-family/c-gimplify.o -MMD -MP -MF c-family/.deps/c-gimplify.TPo /gcc-5.20/gcc/c-family/c-gimplify.c In file included from /gcc-5.20/gcc/flags.h:24:0, from /gcc-5.20/gcc/c-family/c-common.h:36, from /gcc-5.20/gcc/c-family/c-gimplify.c:41: ./options.h:10:0: error: unterminated #if #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS) ^ ./options.h:3:0: error: unterminated #ifndef #ifndef OPTIONS_H ^ Makefile:1066: recipe for target 'c-family/c-gimplify.o' failed make.exe[3]: *** [c-family/c-gimplify.o] Error 1 make.exe[3]: Leaving directory 'c:/build.gcc/gcc' Makefile:4376: recipe for target 'all-stage1-gcc' failed make.exe[2]: *** [all-stage1-gcc] Error 2 make.exe[2]: Leaving directory 'c:/build.gcc' Makefile:17534: recipe for target 'stage1-bubble' failed make.exe[1]: *** [stage1-bubble] Error 2 make.exe[1]: Leaving directory 'c:/build.gcc' Makefile:17838: recipe for target 'bootstrap' failed make.exe: *** [bootstrap] Error 2 Same error do not repeat when I try to run 'sh ./djmake.sh bootstrap' again. Most likely explanation is that reading file (opened in binary mode) is unreliable and one randomly gets corrupted data. Total data size is correct as libcpp compares data size with one from response of stat() and reports an error in case of size discrepancy (we needed to handle DOS end of file mark ^Z specially for that reason) It could be a bug in NTVDM. It could also be some problem on our side. More testing is needed. Such test could repeatedly read some set of files into memory and calculate MD5 sum or something similar to detect random corruptions. It would be possible to investigate further and see what is getting corrupted How to get DJGPP programs running on Windows 10 32 bit (please comment if one has possibility to check on different edition) Steps needed to get DJGPP apps running on 32 bit WIndows 10 enterprise trial version. It may be different in Win 10 Home or WIn 10 Pro. I just do not know. 1) Dialog asking confirmation for installing NTVDM appears when trying to run DJGPP program first time: You need to allow it to be run any DJGPP executable (it was when I tried to run unzip32.exe) 2) 32 MB DPMI memory limit is still present. Use old hack from Windows Vista epoch to got around it: Add registry entry DpmiLimit with large enough value to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WOW. No need to restart Windows. It's active immediately. I used value 0x7FFFFFFF and it is accepted and works 3) Command prompt configuration: mark check box "Use legacy console" active. Otherwise ls.exe, bash.exe, less.exe and other similar programs will not work and Windows will report NTVDM error Andris