Mail Archives: djgpp/2014/08/23/17:44:38
Am 23.08.2014 10:24, schrieb Eli Zaretskii:
>> Date: Sun, 17 Aug 2014 20:57:34 +0200
>> From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
>>
>> Am 16.08.2014 21:32, schrieb Eli Zaretskii:
>> [snip]
>>>> I got this error message:
>>>>
>>>> [snip]
>>>> gcc -c -I../msdos -Demacs -I. -I../lib -O2 font.c
>>>> font.c: In function 'font_unparse_xlfd':
>>>> font.c:1330:9: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
>>> These are warnings, not errors. I guess we need to add a prototype
>>> for snprintf somewhere, to pacify the newer compilers, is that right?
>>>
>>> Thanks for testing Emacs.
>> Yes, you are right. Only a prototype for snprintf is missing. As far I have
>> seen font.c is the only file where snprintf is really used by the port. So it
>> is yours decision if the function declaration should be in font.c or somewhere
>> else.
> Thanks. I ended up adding the prototype to src/config.h.
>
> Any news on the problems you saw with the djdev204 build?
The situation is disappointing. OFYI, all programs used are from the /beta
directory thus they have been compiled using djdev204. GDB cannot be
used to debug this issue because of the use of COFF debug format.
1) On WinXP SP3 using gcc490, bnu224br2 and djdev204.
- If the sources are configured with and without --no-debug and -O2 flag
then the emacs program is build and works flawlessly.
In no case GDB can be used to step through the code. This is no surprise
due to the broken COFF debug format support by the latest compiler.
- If the sources are configured with --no-debug and -O0 flag then the emacs
program is build and works flawlessly.
In no case GDB can be used to step through the code. This is no surprise
due to the broken COFF debug format support by the latest compiler.
- If the sources are configured without --no-debug and -O0 flag then the
build process aborts with the following error message:
gcc -Demacs -I. -I../lib -O0 -gcoff \
-o temacs vm-limit.o dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o window.o charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o term.o terminal.o xfaces.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o lread.o syntax.o unexcoff.o bytecode.o process.o gnutls.o callproc.o region-cache.o sound.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o profiler.o decompress.o dosfns.o msdos.o w16select.o termcap.o tparam.o lastfile.o gmalloc.o ralloc.o ../lib/libgnu.a -lm
sysdep.o: In function `emacs_backtrace':
sysdep.c:2115: undefined reference to `backtrace'
sysdep.c:2121: undefined reference to `backtrace_symbols_fd'
ld: sysdep.o: bad reloc address 0x20 in section `.eh_frame'
ld: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile:232: recipe for target 'temacs.exe' failed
make.exe[1]: *** [temacs.exe] Error 1
make.exe[1]: Leaving directory 'i:/e/emacs-24.3.93-debug-O0/src'
Makefile:105: recipe for target 'src' failed
make.exe: *** [src] Error 2
Replacing binutils with previous versions either do not solve the issue
or they trigger different assembler issues because the assembler version
is so old that it does not meet the requirements impossed by the compiler.
2) On MSDOS 6.22 with DOSLFN 0.41c using gcc490, bnu224br2 and djdev204.
- If the sources are configured without --no-debug and -O0 flag then the
build fails with the following error message:
[snip]
gcc -Demacs -I. -I../lib -O0 -gcoff \
-o temacs vm-limit.o dispnew.o frame.o scroll.o xdisp.o menu.o xmenu.o window.o charset.o coding.o category.o ccl.o character.o chartab.o bidi.o cm.o term.o terminal.o xfaces.o emacs.o keyboard.o macros.o keymap.o sysdep.o buffer.o filelock.o insdel.o marker.o minibuf.o fileio.o dired.o cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o alloc.o data.o doc.o editfns.o callint.o eval.o floatfns.o fns.o font.o print.o lread.o syntax.o unexcoff.o bytecode.o process.o gnutls.o callproc.o region-cache.o sound.o atimer.o doprnt.o intervals.o textprop.o composite.o xml.o profiler.o decompress.o dosfns.o msdos.o w16select.o termcap.o tparam.o lastfile.o gmalloc.o ralloc.o ../lib/libgnu.a -lm
sysdep.o: In function `emacs_backtrace':
sysdep.c:2115: undefined reference to `backtrace'
sysdep.c:2121: undefined reference to `backtrace_symbols_fd'
ld: sysdep.o: bad reloc address 0x20 in section `.eh_frame'
ld: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile:232: recipe for target 'temacs.exe' failed
make.exe[1]: *** [temacs.exe] Error 1
make.exe[1]: Leaving directory 'd:/emacs-24.3.93-debug-O0-490/src'
Makefile:105: recipe for target 'src' failed
make.exe: *** [src] Error 2
- 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.
Probably we are seen differences in the file system used by Windows and pure MSDOS.
Something similar has already been observed for a port of lua some time
ago.
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
Increasing the cc1.exe stack from 1MB to 2MB did not solve the problem.
The bottom line is that debugging emacs becomes really difficult due to the COFF
debug format issues. I have found this using 2 virtual machines, one running
WinXP the other one running MSDOS and a _lot_ of printf until I found the code
line producing the problem.
Regards,
Juan M. Guerrero
- Raw text -