X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Message-ID: <53FA3238.8010106@gmx.de> Date: Sun, 24 Aug 2014 20:43:04 +0200 From: Juan Manuel Guerrero User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Emacs pretest 24.3.93 References: <83egwim872 DOT fsf AT gnu DOT org> <53EF1E40 DOT 6050004 AT gmx DOT de> <83k368ekyk DOT fsf AT gnu DOT org> <53EFAF05 DOT 2010005 AT gmx DOT de> <834mxcdyde DOT fsf AT gnu DOT org> <53F0FB1E DOT 8070706 AT gmx DOT de> <83d2brmx4x DOT fsf AT gnu DOT org> <53F90C05 DOT 3070503 AT gmx DOT de> <83y4uekjvg DOT fsf AT gnu DOT org> In-Reply-To: <83y4uekjvg.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:yjXs7fa1VHML7GVfN61TfpgPUeQ1vkr/ivhtX4v15rwWJyg57yR gGfqMnURXsBA4PuK4/teid06lQMFXsBV4/XkmfauB0OvHth37Tc2ch731KfELfjhn8DxpJI hl/slOtuG2KApFwfn627j5cGYq6PBOWenVrUgUXX0Xy8O5VqNNrS3bvCCsWYU+3mLaq3JYt SPjXU/vKnt9I1LZnBgjew== X-UI-Out-Filterresults: notjunk:1; Reply-To: djgpp AT delorie DOT com Am 24.08.2014 17:06, schrieb Eli Zaretskii: [snip] > - If the sources are configured without --no-debug and -O2 flag then the > build fails with the following error message: > [snip] > ./temacs -batch -l loadup dump > Cannot open load file: Value too large (EOVERFLOW), loadup.el > openp: (fstat call) fn = d:/emacs-24.3.93-debug-O2-490/lisp/loadup.el fd = 7 err = 40 <-- I have added this printf() line in openp. > Makefile:192: recipe for target '../lisp/leim/leim-list.el' failed > make.exe[1]: *** [../lisp/leim/leim-list.el] Error -1 > make.exe[1]: Leaving directory 'd:/emacs-24.3.93-debug-O2-490/src' > Makefile:105: recipe for target 'src' failed > make.exe: *** [src] Error 2 > > As can be seen, this time temacs.exe is successfully build but it did > not work. The reason for the failure is that fstat sets errno = EOVERFLOW. > fstat is called in openp() of lread.c at line 1621. > Tomorrow I will compile a debug version of libc.a and check why fstat > behavior is different on WinXP/Win98SE and on MSDOS. > Yes, it is IMO very important to understand why. The bug is related to the checking of the availability of 0x71NN functions. fstat calls fstat_assist and this function calls __filelength. This function together with a lot of other LFN functions have been known to be broken in the sense that they did either not set the carry flag before calling the function or they did not check that the content of the AX register is different from 0x7100 after calling the 0x71NN function to verify that the LFN driver does really support the called 0x71NN function. The issue has already been fixed in repository and if I use a libc.a version compiled from repository sources then this bug does not appear at all. This issue has already been reported some years ago but unfortunately I had forgotten about it. See: http://www.delorie.com/archives/browse.cgi?p=djgpp/2011/08/30/18:59:04 The bottom line of this is that djdev204 cannot be used to compile software that shall be used on plain DOS together with DOSLFN. Although the latest DOSLFN version sets the carry flag to solve this well known DJGPP specific bug it cannot solve for the missing check of AX != 0x7100 to determinate if the required function is really supported by the driver. Because WinXP and Win98SE (DOS box in the GUI) support all functions the bug never appears. As soon as I use plain DOS either as MSDOS 6.22 or as DOS 7.1 from Win98SE and I load the LFN driver all programs that call LFN functions not supported by the driver make the program file. Usually with: Value too large (EOVERFLOW). >> 3) On MSDOS 6.22 with DOSLFN 0.41c using gcc334, bnu224br2 and djdev204. >> It is not possible to compile the sources at all. Compiling without >> --no-debug and with -O0 or -O2 flag aborts the compilation with the >> following error message: >> [snip] >> C:/DJGPP-2.04/BIN/make.exe all-am >> make.exe[2]: Entering directory 'd:/emacs-24.3.93-debug-O2-344/lib' >> gcc -I. -Id:/emacs-24.3.93-debug-O2-344/lib -I../src -Id:/emacs-24.3.93-debug-O2-344/src -g -O2 -MT c-ctype.o -MD -MP -MF deps/c-ctype.Tpo -c -o c-ctype.o c-ctype.c >> cc1.exe: c-ctype.c: Value too large (EOVERFLOW) >> Makefile:1562: recipe for target 'c-ctype.o' failed >> make.exe[2]: *** [c-ctype.o] Error 1 >> make.exe[2]: Leaving directory 'd:/emacs-24.3.93-debug-O2-344/lib' >> Makefile:1463: recipe for target 'all' failed >> make.exe[1]: *** [all] Error 2 >> make.exe[1]: Leaving directory 'd:/emacs-24.3.93-debug-O2-344/lib' >> Makefile:86: recipe for target 'lib' failed >> make.exe: *** [lib] Error 2 > FWIW, I use GCC is 3.4.4 and Binutils 2.19. > >> The bottom line is that debugging emacs becomes really difficult due to the COFF >> debug format issues. > The problem with going to DWARF-2 debug info is that last time I tried > the dumped Emacs crashed at startup. If you try it now and it works > for you, or of you (or someone else) finds and fixes the problem that > causes the crash, I have no problems supporting the DWARF-2 build. > Otherwise, we are stuck with COFF. No, it does not work with DWARF-2 so we have to keep with COFF debug support. Regards, Juan M. Guerrero