delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/10/20/18:35:43

Date: Mon, 21 Oct 2002 00:34:55 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: The Bat! (v1.61) Personal
X-Priority: 3 (Normal)
Message-ID: <15235049973.20021021003455@softhome.net>
To: djgpp-workers AT delorie DOT com
Subject: GCC 3.2 building with 2.04 trouble on W2K (NTVDM crash)
MIME-Version: 1.0
X-OriginalArrivalTime: 20 Oct 2002 22:33:00.0543 (UTC) FILETIME=[A56350F0:01C27888]
Reply-To: djgpp-workers AT delorie DOT com

Hello,

I get following with 2.04 libc:

[...]
(TARGET_MACHINE='i686-pc-msdosdjgpp'; srcdir=`cd /devel/djgppwip/gnu/gcc-3.2/gcc; pwd`; \
SHELL='c:/devel/djgppwip/bin/sh.exe' ;\
export TARGET_MACHINE srcdir SHELL ; \
c:/devel/djgppwip/bin/sh.exe ./fixinc.sh `pwd`/include c:/devel/djgppwip/include ; \
rm -f include/syslimits.h; \
if [ -f include/limits.h ]; then \
  mv include/limits.h include/syslimits.h; \
else \
  cp /devel/djgppwip/gnu/gcc-3.2/gcc/gsyslimits.h include/syslimits.h; \
fi; \
chmod a+r include/syslimits.h)
Fixing headers into /dev/c/devel/djgppwip/gnu/build.gcc/gcc/include for i686-pc-msdosdjgpp target
Finding directories and links to directories
 Searching c:/devel/djgppwip/include/.
Fixing directory c:/devel/djgppwip/include into /dev/c/devel/djgppwip/gnu/build.gcc/gcc/include
Applying ctrl_quotes_def          to libc/ttyprvt.h
Applying limits_ifndefs           to limits.h
Applying undefine_null            to locale.h
Fixed:  locale.h
Applying sun_malloc               to malloc.h
Applying math_exception           to math.h
Applying math_huge_val_ifndef     to math.h
Fixed:  math.h
Applying gnu_types                to stddef.h
Applying undefine_null            to stddef.h
Fixed:  stddef.h
Applying stdio_stdarg_h           to stdio.h
Fixed:  stdio.h
Applying sysv68_string            to string.h
Applying djgpp_wchar_h            to sys/djtypes.h
Cannot open script file for $SHELL: Permission denied (EACCES)

Applying io_quotes_def            to sys/ioctl.h
Cleaning up unneeded directories:



At this point NTVDM crashes. My gcc, bash, binutils and several GNU
utils (but not everything) are built with 2.04. Is this known
problem on W2K?

I've made tiny script to help myself to debug it:
----
TARGET_MACHINE='i686-pc-msdosdjgpp';
srcdir=`cd /devel/djgppwip/gnu/gcc-3.2/gcc; pwd`;
SHELL='c:/devel/djgppwip/bin/sh.exe';
export TARGET_MACHINE srcdir SHELL;
gdb --args c:/devel/djgppwip/bin/sh.exe ./fixinc.sh c:/devel/djgppwip/gnu/build.gcc/gcc/include c:/devel/djgppwip/include
----
It setups exact environment for fixinc.sh as if called from makefile
on my box. I add set -x to fixinc.sh too and now I've got following
output from GDB _every time_ I do simple 'r':
1) first 'r' stops after few lines executed
2) second 'r' stops after nothing executed
3) second 'r' executes just like invocation from Makefile
and crashes NTVDM at the end (at varying points, to make it worse:
it maybe any command from last find invocation...)
---
sh-2.05b$ ./debug.sh
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-pc-msdosdjgpp"...
(gdb) r
Starting program: c:/devel/djgppwip/bin/sh.exe ./fixinc.sh c:/devel/djgppwip/gnu
/build.gcc/gcc/include c:/devel/djgppwip/include
+ '[' xc:/devel/djgppwip/gnu/build.gcc/gcc/include = x ']'
+ LIB=c:/devel/djgppwip/gnu/build.gcc/gcc/include
+ shift
+ '[' '!' -d c:/devel/djgppwip/gnu/build.gcc/gcc/include ']'
+ cd c:/devel/djgppwip/gnu/build.gcc/gcc/include
+ touch DONE
./fixinc.sh: line 52: cannot duplicate fd 23 to fd 0: Bad file descriptor (EBADF
)
./fixinc.sh: line 52: cannot duplicate fd 24 to fd 1: Bad file descriptor (EBADF
)

Program exited normally.
(gdb) r
Starting program: c:/devel/djgppwip/bin/sh.exe ./fixinc.sh c:/devel/djgppwip/gnu
/build.gcc/gcc/include c:/devel/djgppwip/include

Program exited normally.
(gdb) r
[...]
Fixed:  math.h
Applying gnu_types                to stddef.h
Applying undefine_null            to stddef.h
Fixed:  stddef.h
Applying stdio_stdarg_h           to stdio.h
Fixed:  stdio.h
Applying sysv68_string            to string.h
Applying djgpp_wchar_h            to sys/djtypes.h
Applying io_quotes_def            to sys/ioctl.h
Cannot open script file for $SHELL: Permission denied (EACCES)
+ required=
+ '[' 0 '!=' 0 ']'
++ echo
+ set x
+ shift
+ '[' 0 '!=' 0 ']'
+ test 2 -gt 2
+ cd c:/devel/djgppwip/gnu/build.gcc/gcc/include
+ find . -name '[Dd][Oo][Nn][Ee]' -exec rm -f '{}' ';'
+ test 2 -gt 1
+ echo 'Cleaning up unneeded directories:'
Cleaning up unneeded directories:
+ cd c:/devel/djgppwip/gnu/build.gcc/gcc/include
---

Well, that seems quite interesting, to put it mildly. Any pointers for
debugging?

TIA,
Laurynas


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019