* Problems compiling trivial C program.
@ 2003-02-07 13:33 Christopher January
2003-02-07 14:12 ` Max Bowsher
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Christopher January @ 2003-02-07 13:33 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 2786 bytes --]
I'm having trouble compiling this test program:
void f(){}
using the command line:
gcc test.c -c -o test.o
using 1.3.19 or latest Cygwin snapshot (2003-Feb-07) (same error with
both) and gcc-3.2-3.
The error I see is:
16 bit MS-DOS Subsystem
/usr/src/cygwin-cvs/obj
The NTVDM CPU has encountered an illegal instruction.
CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the
application.
Close | Ignore
AFAICT the command that is failing is:
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/as.exe,
P:\ccj00\cygwin\usr\i686-pc-cygwin\bin\as.exe --traditional-format -o
test.o /cygdrive/c/DOCUME~1/ccj00/LOCALS~1/Temp/cc50BUPU.s
See the following strace portion:
39542 4773296 [main] gcc 1428 spawn_guts: 1428 = spawn_guts
(/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/as.exe,
P:\ccj00\cygwin\usr\i686-pc-cygwin\bin\as.exe --traditional-format -o
test.o /cygdrive/c/DOCUME~1/ccj00/LOCALS~1/Temp/cc50BUPU.s)
710 4774006 [main] gcc 1428! fhandler_base::close: closing
'/usr/src/cygwin-cvs/obj/strace.log' handle 0xD0
520 4774526 [main] gcc 1428! spawn_guts: spawned windows pid 1740
4070800 8655535 [sig] gcc 1780 wait_sig: awake
652 8656187 [sig] gcc 1780 wait_sig: processing signal 0
1287 8657474 [sig] gcc 1780 pinfo::init: execed process windows pid 1952,
cygwin pid 1620
889 8658363 [sig] gcc 1780 wait_sig: looping
3887914 8662440 [sig] gcc 1428! wait_sig: awake
616 8663056 [sig] gcc 1428! wait_sig: processing signal 0
1420 8664476 [sig] gcc 1428! pinfo::init: execed process windows pid
1952, cygwin pid 1620
939 8665415 [sig] gcc 1428! wait_sig: looping
The dialog box appears at this point.
procps shows the offending command running with the command line:
ccj00 1864 0.7 0.6 405536 1592 tty0 S 13:20 0:00 gcc test.c
-c -o
however ps shows it running with the command line:
1864 480 480 1864 con 22083 13:20:49
/usr/i686-pc-cygwin/bin/as
(The above output is from a different run to the strace)
The new windows process doesn't seem to reach the Cygwin initialisation
stage.
I have tried reinstalling the gcc package. I also tried setting the TMP
and TEMP environment variables to /tmp.
None of the above solved the problem.
The command:
gcc test.c -o test
also shows the same dialog box as above and then fails with the following
error:
$ gcc test.c -o test
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld:
installat
ion problem, cannot exec
`/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-p
c-cygwin/bin/ld': Invalid argument
collect2: ld returned 255 exit status
Cygcheck output and strace attached.
I don't have many debugging facilities available to me here at college,
but I can try to provide more information if necessary.
Chris
[-- Attachment #2: strace.log.gz --]
[-- Type: application/x-gunzip, Size: 48636 bytes --]
[-- Attachment #3: cygcheck_output --]
[-- Type: application/octet-stream, Size: 15509 bytes --]
Cygwin Win95/NT Configuration Diagnostics
Current System Time: Fri Feb 07 13:11:08 2003
Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 3
Path: .
P:\ccj00\cygwin\usr\local\bin
P:\ccj00\cygwin\bin
P:\ccj00\cygwin\bin
c:\WINNT
c:\WINNT\system32
c:\WINNT\system32\wbem
c:\Program Files\A386
c:\Program Files\MiKTeX\texmf\miktex\bin
c:\Program Files\Support Tools
c:\Program Files\perl\bin
c:\Program Files\putty
c:\Program Files\Microsoft Visual Studio\Common\msdev98\BIN
c:\Program Files\Microsoft Visual Studio\VC98\BIN
c:\Program Files\Microsoft Visual Studio\Common\TOOLS\WINNT
c:\Program Files\Microsoft Visual Studio\Common\TOOLS
c:\Program Files\Active TCL\Bin
c:\Program Files\VTK\Bin
\\win.doc.ic.ac.uk\sysvol\win.doc.ic.ac.uk\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\Machine\Scripts\Startup
c:\Program Files\SFU\common
c:\Program Files\python21
c:\Program Files\wget
c:\Program Files\wget\
SysDir: C:\WINNT\System32
WinDir: C:\WINNT
HOME = `\\fs-ug\ccj00'
MAKE_MODE = `unix'
PWD = `/etc/setup'
USER = `ccj00'
ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
APPDATA = `C:\Documents and Settings\ccj00\Application Data'
CLASSPATH = `.;C:\Progra~1\JUnit3~1.7\junit.jar'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
COMPUTERNAME = `VOXEL29'
COMSPEC = `C:\WINNT\system32\cmd.exe'
HOMEDRIVE = `H:'
HOMEPATH = `\'
HOMESHARE = `\\fs-ug\ccj00'
INCLUDE = `%INCLUDE%;C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE;C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE;C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE'
LIB = `%LIB%;C:\Program Files\Microsoft Visual Studio\VC98\LIB;C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB'
LOGONSERVER = `\\PTARMIGAN'
MANPATH = `:/usr/ssl/man'
MSDEVDIR = `C:\Program Files\Microsoft Visual Studio\Common\msdev98'
MSVCDIR = `C:\Program Files\Microsoft Visual Studio\VC98'
NUMBER_OF_PROCESSORS = `1'
OLDPWD = `//fs-ug/ccj00'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
OS = `Windows_NT'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.py;.pyw;.pyc;.pys'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 4 Stepping 2, AuthenticAMD'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0402'
PROGRAMFILES = `C:\Program Files'
PROMPT = `$P$G'
PS1 = `\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
SFUDIR = `C:\Progra~1\SFU\'
SHLVL = `1'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
TEMP = `c:\DOCUME~1\ccj00\LOCALS~1\Temp'
TERM = `cygwin'
TMP = `c:\DOCUME~1\ccj00\LOCALS~1\Temp'
USERDNSDOMAIN = `win.doc.ic.ac.uk'
USERDOMAIN = `WIN'
USERNAME = `ccj00'
USERPROFILE = `C:\Documents and Settings\ccj00'
VSCOMMONDIR = `C:\Program Files\Microsoft Visual Studio\Common'
WINDIR = `C:\WINNT'
XILINX = `C:\Progra~1\Xilinx'
_ = `/usr/bin/cygcheck'
Use `-r' to scan registry
a: fd N/A N/A
b: fd N/A N/A
c: hd NTFS 9954Mb 66% CP CS UN PA FC
e: cd N/A N/A
h: net NTFS 277208Mb 83% CP CS PA ccj00
p: net NTFS 204652Mb 84% CP CS PA bitbucket
P:\ccj00\cygwin / user binmode
P:\ccj00\cygwin/bin /usr/bin user binmode
P:\ccj00\cygwin/lib /usr/lib user binmode
. /cygdrive user binmode,cygdrive
Found: P:\ccj00\cygwin\bin\bash.exe
Found: P:\ccj00\cygwin\bin\cat.exe
Found: c:\Program Files\SFU\common\cat.exe
Warning: P:\ccj00\cygwin\bin\cat.exe hides c:\Program Files\SFU\common\cat.exe
Found: P:\ccj00\cygwin\bin\cpp.exe
Found: P:\ccj00\cygwin\bin\find.exe
Found: c:\Program Files\SFU\common\find.exe
Warning: P:\ccj00\cygwin\bin\find.exe hides c:\Program Files\SFU\common\find.exe
Found: P:\ccj00\cygwin\bin\gcc.exe
Found: P:\ccj00\cygwin\bin\gdb.exe
Found: P:\ccj00\cygwin\bin\ld.exe
Found: P:\ccj00\cygwin\bin\ls.exe
Found: c:\Program Files\SFU\common\ls.exe
Warning: P:\ccj00\cygwin\bin\ls.exe hides c:\Program Files\SFU\common\ls.exe
Found: P:\ccj00\cygwin\bin\make.exe
Found: P:\ccj00\cygwin\bin\sh.exe
Found: c:\Program Files\SFU\common\sh.exe
Warning: P:\ccj00\cygwin\bin\sh.exe hides c:\Program Files\SFU\common\sh.exe
493k 2002/11/19 P:\ccj00\cygwin\bin\cygcurl-2.dll - os=4.0 img=1.0 sys=4.0
"cygcurl-2.dll" v0.0 ts=2002/11/19 14:38
136k 2002/10/17 P:\ccj00\cygwin\bin\cygexpat-0.dll - os=4.0 img=1.0 sys=4.0
"cygexpat-0.dll" v0.0 ts=2002/10/17 16:21
19k 2002/02/20 P:\ccj00\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
"cyggdbm.dll" v0.0 ts=2002/2/20 3:05
58k 2002/05/07 P:\ccj00\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
"cygbz2-1.dll" v0.0 ts=2002/5/7 7:33
6k 2002/06/24 P:\ccj00\cygwin\bin\cygcharset-1.dll - os=4.0 img=1.0 sys=4.0
"cygcharset-1.dll" v0.0 ts=2002/6/24 19:23
490k 2002/09/21 P:\ccj00\cygwin\bin\cygguile-12.dll - os=4.0 img=1.0 sys=4.0
"cygguile-12.dll" v0.0 ts=2002/9/21 11:01
63k 2002/09/21 P:\ccj00\cygwin\bin\cygguile-srfi-srfi-13-14-v-1-1.dll - os=4.0 img=1.0 sys=4.0
"cygguile-srfi-srfi-13-14-v-1-1.dll" v0.0 ts=2002/9/21 11:01
24k 2002/09/21 P:\ccj00\cygwin\bin\cygguile-srfi-srfi-4-v-1-1.dll - os=4.0 img=1.0 sys=4.0
"cygguile-srfi-srfi-4-v-1-1.dll" v0.0 ts=2002/9/21 11:01
14k 2002/09/21 P:\ccj00\cygwin\bin\cygguilereadline-v-12-12.dll - os=4.0 img=1.0 sys=4.0
"cygguilereadline-v-12-12.dll" v0.0 ts=2002/9/21 11:01
929k 2002/06/24 P:\ccj00\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
"cygiconv-2.dll" v0.0 ts=2002/6/24 19:24
22k 2001/12/13 P:\ccj00\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0
"cygintl-1.dll" v0.0 ts=2001/12/13 9:28
28k 2002/09/20 P:\ccj00\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0
"cygintl-2.dll" v0.0 ts=2002/9/20 4:13
59k 2002/09/20 P:\ccj00\cygwin\bin\cygkpathsea-3-3-7.dll - os=4.0 img=1.0 sys=4.0
"cygkpathsea-3-3-7.dll" v0.0 ts=2002/9/20 15:54
32k 2003/01/04 P:\ccj00\cygwin\bin\cygltdl-3.dll - os=4.0 img=1.0 sys=4.0
"cygltdl-3.dll" v0.0 ts=2003/1/4 7:47
45k 2001/04/25 P:\ccj00\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
"cygform5.dll" v0.0 ts=2001/4/25 6:28
26k 2001/04/25 P:\ccj00\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
"cygmenu5.dll" v0.0 ts=2001/4/25 6:27
156k 2001/04/25 P:\ccj00\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
"cygncurses++5.dll" v0.0 ts=2001/4/25 6:29
226k 2001/04/25 P:\ccj00\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
"cygncurses5.dll" v0.0 ts=2001/4/25 6:17
15k 2001/04/25 P:\ccj00\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
"cygpanel5.dll" v0.0 ts=2001/4/25 6:27
35k 2002/01/09 P:\ccj00\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
"cygform6.dll" v0.0 ts=2002/1/9 6:03
20k 2002/01/09 P:\ccj00\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
"cygmenu6.dll" v0.0 ts=2002/1/9 6:03
175k 2002/01/09 P:\ccj00\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
"cygncurses++6.dll" v0.0 ts=2002/1/9 6:03
202k 2002/01/09 P:\ccj00\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
"cygncurses6.dll" v0.0 ts=2002/1/9 6:03
12k 2002/01/09 P:\ccj00\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
"cygpanel6.dll" v0.0 ts=2002/1/9 6:03
179k 2002/07/22 P:\ccj00\cygwin\bin\cygpng12.dll - os=4.0 img=1.0 sys=4.0
"cygpng12.dll" v0.0 ts=2002/7/22 17:03
17k 2001/06/28 P:\ccj00\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
"cyghistory4.dll" v0.0 ts=2001/1/7 4:34
108k 2001/06/28 P:\ccj00\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
"cygreadline4.dll" v0.0 ts=2001/1/7 4:34
20k 2002/10/10 P:\ccj00\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
"cyghistory5.dll" v0.0 ts=2002/10/10 18:28
127k 2002/10/10 P:\ccj00\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
"cygreadline5.dll" v0.0 ts=2002/10/10 18:28
2689k 2002/11/16 P:\ccj00\cygwin\bin\cygxerces-c21.dll - os=4.0 img=1.0 sys=4.0
"cygxerces-c21.dll" v0.0 ts=2002/11/16 4:07
633k 2002/07/22 P:\ccj00\cygwin\bin\cygxml2-2.dll - os=4.0 img=1.0 sys=4.0
"cygxml2-2.dll" v0.0 ts=2002/7/22 7:29
50k 2002/03/17 P:\ccj00\cygwin\bin\cygexslt-0.dll - os=4.0 img=1.0 sys=4.0
"cygexslt-0.dll" v0.0 ts=2002/3/17 6:24
152k 2002/03/17 P:\ccj00\cygwin\bin\cygxslt-1.dll - os=4.0 img=1.0 sys=4.0
"cygxslt-1.dll" v0.0 ts=2002/3/17 6:19
15k 2002/03/17 P:\ccj00\cygwin\bin\cygxsltbreakpoint-1.dll - os=4.0 img=1.0 sys=4.0
"cygxsltbreakpoint-1.dll" v0.0 ts=2002/3/17 6:24
847k 2003/01/09 P:\ccj00\cygwin\bin\cygcrypto-0.9.7.dll - os=4.0 img=1.0 sys=4.0
"cygcrypto-0.9.7.dll" v0.0 ts=2003/1/9 20:41
177k 2003/01/09 P:\ccj00\cygwin\bin\cygssl-0.9.7.dll - os=4.0 img=1.0 sys=4.0
"cygssl-0.9.7.dll" v0.0 ts=2003/1/9 20:41
644k 2002/12/08 P:\ccj00\cygwin\bin\cygcrypto.dll - os=4.0 img=1.0 sys=4.0
"cygcrypto.dll" v0.0 ts=2002/12/8 19:57
165k 2002/12/08 P:\ccj00\cygwin\bin\cygssl.dll - os=4.0 img=1.0 sys=4.0
"cygssl.dll" v0.0 ts=2002/12/8 19:57
40k 2001/11/21 P:\ccj00\cygwin\bin\cygpcre.dll - os=4.0 img=1.0 sys=4.0
"cygpcre.dll" v0.0 ts=2001/11/21 22:15
39k 2001/11/21 P:\ccj00\cygwin\bin\cygpcreposix.dll - os=4.0 img=1.0 sys=4.0
"cygpcreposix.dll" v0.0 ts=2001/11/21 22:15
50k 2002/03/12 P:\ccj00\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
"cygz.dll" v0.0 ts=2002/3/12 4:38
885k 2003/01/24 P:\ccj00\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
"cygwin1.dll" v0.0 ts=2003/1/24 2:31
Cygwin DLL version info:
DLL version: 1.3.19
DLL epoch: 19
DLL bad signal mask: 19005
DLL old termios: 5
DLL malloc env: 28
API major: 0
API minor: 71
Shared data: 3
DLL identifier: cygwin1
Mount registry: 2
Cygnus registry name: Cygnus Solutions
Cygwin registry name: Cygwin
Program options name: Program Options
Cygwin mount registry name: mounts v2
Cygdrive flags: cygdrive flags
Cygdrive prefix: cygdrive prefix
Cygdrive default prefix:
Build date: Thu Jan 23 21:31:48 EST 2003
CVS tag: cygwin-1-3-19-1
Shared id: cygwin1S3
Cygwin Package Information
Last downloaded files to: P:\ccj00\cygwin-setup
Last downloaded files from: http://mirror.averse.net/cygwin
Package Version
ELFIO 1.0.0-1
_update-info-dir 00130-1
ash 20020731-1
astyle 1.15.3-3
autoconf 2.54-1
autoconf-devel 2.57-1
autoconf-stable 2.13-4
automake 1.7.1-1
automake-devel 1.7.2-1
automake-stable 1.4p5-5
base-files 1.1-1
base-passwd 1.0-1
bash 2.05b-8
binutils 20021117-1
bison 1.875-1
byacc 1.9-1
bzip2 1.0.2-2
ccache 1.9-1
cmake 1.6.3-1
compface 1.4-5
crypt 1.0-1
ctags 5.2-1
curl 7.10.2-1
curl-devel 7.10.2-1
cvs 1.11.0-1
cygwin 1.3.19-1
dejagnu 20021217-2
diff 1.0-1
diffutils 2.8.1-1
doxygen 1.2.18-1
dpkg 1.10.4-2
expat 1.95.5-1
expect 20030128-1
file 3.37-1
fileutils 4.1-1
findutils 4.1.7-4
flex 2.5.4-2
gawk 3.1.1-5
gcc 3.2-3
gcc-mingw 20020817-5
gcc2 2.95.3-10
gdb 20030128-1
gdbm 1.8.0-4
gettext 0.11.5-1
gettext-devel 0.11.5-1
gperf 2.7.2-1
grep 2.5-1
guile 1.6.0-1
guile-devel 1.6.0-1
gzip 1.3.3-4
indent 2.2.8-1
less 378-1
libbz2_1 1.0.2-2
libcharset1 1.8-2
libguile12 1.6.0-1
libiconv 1.8-2
libiconv2 1.8-2
libintl1 0.10.40-1
libintl2 0.11.5-1
libkpathsea3 20020911-1
libltdl3 20030103-1
libncurses5 5.2-1
libncurses6 5.2-8
libpng12 1.2.4-2
libreadline4 4.1-2
libreadline5 4.3-2
libtool 20020705-1
libtool-devel 20030103-1
libtool-stable 1.4.3-1
libxerces-c21 2.1.0-1
libxml2 2.4.23-1
libxslt 1.0.13-1
login 1.7-1
m4 1.4-1
make 3.79.1-7
mingw-runtime 2.3-1
mktemp 1.4-1
nasm 0.98.35-1
ncurses 5.2-8
openssl 0.9.7-1
openssl-devel 0.9.7-1
openssl096 0.9.6h-1
pcre 3.7-1
perl 5.6.1-2
pkgconfig 0.14.0-1
procps 010801-2
rcs 5.7-3
readline 4.3-2
sed 4.0.5-1
sh-utils 2.0.15-3
swig 1.3.16-1
tar 1.13.25-1
tcltk 20030128-3
termcap 20020930-1
terminfo 5.2-3
tetex-devel 20020911-1
texinfo 4.2-4
textutils 2.0.21-1
vim 6.1-2
w32api 2.1-1
which 1.5-1
xerces-c-devel 2.1.0-1
xerces-c-doc 2.1.0-1
zlib 1.1.4-1
Use -h to see help about each section
[-- Attachment #4: Type: text/plain, Size: 214 bytes --]
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program.
2003-02-07 13:33 Problems compiling trivial C program Christopher January
@ 2003-02-07 14:12 ` Max Bowsher
2003-02-07 15:10 ` Christopher Faylor
2003-02-10 15:11 ` Dario Alcocer
2 siblings, 0 replies; 11+ messages in thread
From: Max Bowsher @ 2003-02-07 14:12 UTC (permalink / raw)
To: Christopher January, cygwin
Christopher January wrote:
>> I'm having trouble compiling this test program:
>>
>> void f(){}
>>
>> using the command line:
>> gcc test.c -c -o test.o
>>
>> using 1.3.19 or latest Cygwin snapshot (2003-Feb-07) (same error with
>> both) and gcc-3.2-3.
>>
>> The error I see is:
>>
>> 16 bit MS-DOS Subsystem
^^^^^^^^^^^^^
Sounds like gcc is corrupted, or Cygwin gcc is not the gcc that is being
run.
Max.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program.
2003-02-07 13:33 Problems compiling trivial C program Christopher January
2003-02-07 14:12 ` Max Bowsher
@ 2003-02-07 15:10 ` Christopher Faylor
2003-02-09 22:46 ` Chris January
2003-02-10 15:11 ` Dario Alcocer
2 siblings, 1 reply; 11+ messages in thread
From: Christopher Faylor @ 2003-02-07 15:10 UTC (permalink / raw)
To: cygwin
On Fri, Feb 07, 2003 at 01:33:40PM -0000, Christopher January wrote:
>I'm having trouble compiling this test program:
>
>void f(){}
>
>using the command line:
>gcc test.c -c -o test.o
>
>using 1.3.19 or latest Cygwin snapshot (2003-Feb-07) (same error with
>both) and gcc-3.2-3.
>
>The error I see is:
>
>16 bit MS-DOS Subsystem
>/usr/src/cygwin-cvs/obj
>The NTVDM CPU has encountered an illegal instruction.
>CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the
>application.
>Close | Ignore
>
>AFAICT the command that is failing is:
>/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/as.exe,
>P:\ccj00\cygwin\usr\i686-pc-cygwin\bin\as.exe --traditional-format -o
>test.o /cygdrive/c/DOCUME~1/ccj00/LOCALS~1/Temp/cc50BUPU.s
>See the following strace portion:
>39542 4773296 [main] gcc 1428 spawn_guts: 1428 = spawn_guts
>(/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/as.exe,
^^^^^^
Sounds like a corrupted symlink.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: Problems compiling trivial C program.
2003-02-07 15:10 ` Christopher Faylor
@ 2003-02-09 22:46 ` Chris January
2003-02-09 23:36 ` Christopher Faylor
2003-02-10 17:47 ` Brian Keener
0 siblings, 2 replies; 11+ messages in thread
From: Chris January @ 2003-02-09 22:46 UTC (permalink / raw)
To: cygwin
> >I'm having trouble compiling this test program:
> >
> >void f(){}
> >
> >using the command line:
> >gcc test.c -c -o test.o
> >
> >using 1.3.19 or latest Cygwin snapshot (2003-Feb-07) (same error with
> >both) and gcc-3.2-3.
> >
> >The error I see is:
> >
> >16 bit MS-DOS Subsystem
> >/usr/src/cygwin-cvs/obj
> >The NTVDM CPU has encountered an illegal instruction.
> >CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the
> >application.
> >Close | Ignore
> >
> >AFAICT the command that is failing is:
> >/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bi
> n/as.exe,
> >P:\ccj00\cygwin\usr\i686-pc-cygwin\bin\as.exe --traditional-format -o
> >test.o /cygdrive/c/DOCUME~1/ccj00/LOCALS~1/Temp/cc50BUPU.s
> >See the following strace portion:
> >39542 4773296 [main] gcc 1428 spawn_guts: 1428 = spawn_guts
> >(/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/b
> in/as.exe,
>
> ^^^^^^
>
> Sounds like a corrupted symlink.
Apologies if mails on this are sporadic, but I can only test this at
college. Would reinstalling gcc solve the corrupted symlink problem as I
have already tried that and I still get the same error. A process is
actually being spawned (the as.exe process) so it doesn't sound like the
symlinks are corrupted.
Do you (Chris) or anyone else have any good tips I can use to debug this? I
can't compile the Cygwin DLL on the college machines (because of this
problem) so I can't build a debug version. Also the processes that are
crashing don't seem to reach the Cygwin DLL initialisation stage anyway. I
can supply any further information you need to debug this, but I need to
know what would be helpful.
Chris
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program.
2003-02-09 22:46 ` Chris January
@ 2003-02-09 23:36 ` Christopher Faylor
2003-02-10 17:47 ` Brian Keener
1 sibling, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2003-02-09 23:36 UTC (permalink / raw)
To: cygwin
On Sun, Feb 09, 2003 at 10:46:25PM -0000, Chris January wrote:
>> >I'm having trouble compiling this test program:
>> >
>> >void f(){}
>> >
>> >using the command line:
>> >gcc test.c -c -o test.o
>> >
>> >using 1.3.19 or latest Cygwin snapshot (2003-Feb-07) (same error with
>> >both) and gcc-3.2-3.
>> >
>> >The error I see is:
>> >
>> >16 bit MS-DOS Subsystem
>> >/usr/src/cygwin-cvs/obj
>> >The NTVDM CPU has encountered an illegal instruction.
>> >CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the
>> >application.
>> >Close | Ignore
>> >
>> >AFAICT the command that is failing is:
>> >/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bi
>> n/as.exe,
>> >P:\ccj00\cygwin\usr\i686-pc-cygwin\bin\as.exe --traditional-format -o
>> >test.o /cygdrive/c/DOCUME~1/ccj00/LOCALS~1/Temp/cc50BUPU.s
>> >See the following strace portion:
>> >39542 4773296 [main] gcc 1428 spawn_guts: 1428 = spawn_guts
>> >(/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/b
>> in/as.exe,
>>
>> ^^^^^^
>>
>> Sounds like a corrupted symlink.
>Apologies if mails on this are sporadic, but I can only test this at
>college. Would reinstalling gcc solve the corrupted symlink problem as I
>have already tried that and I still get the same error. A process is
>actually being spawned (the as.exe process) so it doesn't sound like the
>symlinks are corrupted.
Why would you say that? Of course a process is being spawned. You're
getting an error as a result. The theory is that the symlink is not
being interpreted as a symlink or it is pointing to the wrong thing.
I don't know why.
>Do you (Chris) or anyone else have any good tips I can use to debug this?
ls -l /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/as.exe
should result in something like:
lrwxrwxrwx 1 foo bar 26 Nov 19 01:57 /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/as.exe -> /usr/bin/as.exe
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program.
2003-02-07 13:33 Problems compiling trivial C program Christopher January
2003-02-07 14:12 ` Max Bowsher
2003-02-07 15:10 ` Christopher Faylor
@ 2003-02-10 15:11 ` Dario Alcocer
2 siblings, 0 replies; 11+ messages in thread
From: Dario Alcocer @ 2003-02-10 15:11 UTC (permalink / raw)
To: cygwin
On Fri, Feb 07, 2003 at 01:33:40PM -0000, Christopher January wrote:
> I'm having trouble compiling this test program:
>
> void f(){}
>
> using the command line:
> gcc test.c -c -o test.o
>
> using 1.3.19 or latest Cygwin snapshot (2003-Feb-07) (same error with
> both) and gcc-3.2-3.
>
> The error I see is:
>
> 16 bit MS-DOS Subsystem
> /usr/src/cygwin-cvs/obj
> The NTVDM CPU has encountered an illegal instruction.
> CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the
> application.
> Close | Ignore
I've seen these errors myself in the past, all associated with
running configure and/or gcc. For some reason, NT is trying to
invoke the NT Virtual DOS Machine (NTVDM) when it runs gcc.exe.
The problem is that gcc.exe should be identified as a Win32 console
application, and therefore doesn't need NTVDM to run.
I wonder if there's some sort of memory corruption going on that
results in gcc.exe being identified as a 16-bit mode DOS program,
like maybe the NE stub in the PE file being scribbled by an errant
pointer. Maybe something in the NE stub in the actual disk file
for gcc.exe has some bits that inadvertently set of NTVDM.
Anyway, you can try the following hack that might allow you to run
the compiler (that is, as long as you don't try to run any DOS apps
under NT):
http://www.rtems.com/rtems/maillistArchives/rtems-users/2001/june/msg00182.html
There's additional information in this MSDN KnowledgeBase article:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q196453
--
Dario Alcocer -- Sr. Software Developer, Helix Digital Inc.
alcocer@helixdigital.com -- http://www.helixdigital.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program.
2003-02-09 22:46 ` Chris January
2003-02-09 23:36 ` Christopher Faylor
@ 2003-02-10 17:47 ` Brian Keener
2003-02-10 17:56 ` Max Bowsher
1 sibling, 1 reply; 11+ messages in thread
From: Brian Keener @ 2003-02-10 17:47 UTC (permalink / raw)
To: cygwin
> >16 bit MS-DOS Subsystem
> >/usr/src/cygwin-cvs/obj
> >The NTVDM CPU has encountered an illegal instruction.
> >CS:0000 IP:0077 OP:f0 37 05 0e 02 Choose 'Close' to terminate the
> >application.
> >Close | Ignore
> >
> >AFAICT the command that is failing is:
> >/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bi
> n/as.exe,
> >P:\ccj00\cygwin\usr\i686-pc-cygwin\bin\as.exe --traditional-format -o
> >test.o /cygdrive/c/DOCUME~1/ccj00/LOCALS~1/Temp/cc50BUPU.s
> >See the following strace portion:
> >39542 4773296 [main] gcc 1428 spawn_guts: 1428 = spawn_guts
> >(/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/b
> in/as.exe,
>
I believe this is related/similar to two messages I posted on January 30 in
cygwin-apps. As Christopher Faylor and Max Bowsher pointed out to me then and
as has been pointed out here as well - this is a result of corrupt symlinks.
On January 30 I noticed that I had several symlinks I had created or that
should normally exist on my Win2k system (IE /etc/hosts, /etc/services and so
on) that were no longer symlinks - they showed as plain files instead of
symlinks even though the data contained in them was still a symlink. See my
message in cygwin-apps:
What is killing my links
http://cygwin.com/ml/cygwin-apps/2003-01/msg00341.html
I do not know what killed these links (all I have really done with my cygwin in
a while is update packages, but who knows what windows might have done. I also
discovered I was having problems compiling setup (same errors about the NTVDM
as above. Based on the responses from Chris and Max I started reinstalling
ash, gcc, gcc-mingw, binutils and so on and slowly started to improve the
situation and get my symlinks back. See my message in cygwin-apps:
Serious Error Compiling Setup
http://cygwin.com/ml/cygwin-apps/2003-01/msg00342.html
Then for whatever reason, I cannot remember if Max or Chris suggested it or I
found something on the list archive about it - but I found that the read only
checkbox on my links on my w2k system was no longer checked. Updating the
properties on the symlinks via windows properties and checking the box for
read-only (or using the attrib command) turned them back into symlinks as they
should be. I then searched for all the symlinks that I thought should be there
and rechecked the Read-only flag and things were back to normal. Now I think I
saw this in the archive because there it was referred to as the system flag and
I could only find a readonly but it worked.
I now know how to fix the symlink problem but in my case the big question is
what turned off the read-only flag in windows or in cygwin in the first place.
I have no idea.
bk
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program.
2003-02-10 17:47 ` Brian Keener
@ 2003-02-10 17:56 ` Max Bowsher
2003-02-10 22:15 ` Brian Keener
0 siblings, 1 reply; 11+ messages in thread
From: Max Bowsher @ 2003-02-10 17:56 UTC (permalink / raw)
To: bkeener, cygwin
Brian Keener wrote:
> Then for whatever reason, I cannot remember if Max or Chris suggested
> it or I found something on the list archive about it - but I found
> that the read only checkbox on my links on my w2k system was no
> longer checked. Updating the properties on the symlinks via windows
> properties and checking the box for read-only (or using the attrib
> command) turned them back into symlinks as they should be. I then
> searched for all the symlinks that I thought should be there and
> rechecked the Read-only flag and things were back to normal. Now I
> think I saw this in the archive because there it was referred to as
> the system flag and I could only find a readonly but it worked.
Clarification:
From the User's Guide:
[Talking about the CYGWIN environment variable]
(no)winsymlinks - if set, Cygwin creates symlinks as Windows shortcuts with
a special header and the R/O attribute set. If not set, Cygwin creates
symlinks as plain files with a magic number, a path and the system attribute
set. Defaults to set.
NB: setup creates the magic-number/system-attribute always. (Except in
postinstall scripts, when the installed ln -s is invoked, which honours the
CYGWIN setting).
Max.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program.
2003-02-10 17:56 ` Max Bowsher
@ 2003-02-10 22:15 ` Brian Keener
2003-02-10 22:36 ` Igor Pechtchanski
0 siblings, 1 reply; 11+ messages in thread
From: Brian Keener @ 2003-02-10 22:15 UTC (permalink / raw)
To: cygwin
Max Bowsher wrote:
> (no)winsymlinks - if set, Cygwin creates symlinks as Windows shortcuts with
> a special header and the R/O attribute set. If not set, Cygwin creates
> symlinks as plain files with a magic number, a path and the system attribute
> set. Defaults to set.
I've read the CYGWIN environment settings before but sure don't remember seeing
this one. Learned something new. ;-) Now what happens if we change this in mid
stream - also see below.
> NB: setup creates the magic-number/system-attribute always.
Three questions here -
1) call me stupid - what is NB.
2) Is this correct for setup - I see this default on a new install but
shouldn't it handle based on CYGWIN environment if updating .... But .... then
what happens if I change the setting - see question above and Question 3.
3) Can both methods work simultaneously. If setup does it one way and CYGWIN
Environment default is the other - will I have broken symlinks.
bk
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program.
2003-02-10 22:15 ` Brian Keener
@ 2003-02-10 22:36 ` Igor Pechtchanski
0 siblings, 0 replies; 11+ messages in thread
From: Igor Pechtchanski @ 2003-02-10 22:36 UTC (permalink / raw)
To: Brian Keener; +Cc: cygwin
On Mon, 10 Feb 2003, Brian Keener wrote:
> Max Bowsher wrote:
> > (no)winsymlinks - if set, Cygwin creates symlinks as Windows shortcuts with
> > a special header and the R/O attribute set. If not set, Cygwin creates
> > symlinks as plain files with a magic number, a path and the system attribute
> > set. Defaults to set.
>
> I've read the CYGWIN environment settings before but sure don't remember seeing
> this one. Learned something new. ;-) Now what happens if we change this in mid
> stream - also see below.
The usual answer: try and see.
> > NB: setup creates the magic-number/system-attribute always.
>
> Three questions here -
> 1) call me stupid - what is NB.
"Nota Bene" - "important note" (Latin). [Er, should I really call you
stupid? ;-)]
> 2) Is this correct for setup - I see this default on a new install but
> shouldn't it handle based on CYGWIN environment if updating .... But .... then
> what happens if I change the setting - see question above and Question 3.
Yes it is. Setup has built-in code that creates symlinks, which doesn't
depend on the CYGWIN variable. Besides, CYGWIN may not be set globally.
> 3) Can both methods work simultaneously. If setup does it one way and CYGWIN
> Environment default is the other - will I have broken symlinks.
You shouldn't. They usually coexist peacefully. Unless Windows (or a
Windows administrator with restless fingers) starts going around changing
attributes.
> bk
Hope this helps,
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
-- /usr/games/fortune
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Problems compiling trivial C program
@ 2003-02-07 15:06 Keen Wayne A Contr AFRL/MNGG
0 siblings, 0 replies; 11+ messages in thread
From: Keen Wayne A Contr AFRL/MNGG @ 2003-02-07 15:06 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
You might want to do either a:
which gcc
and
gcc -v
to see what gcc you are using and where it is coming from...
Wayne Keen
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2003-02-10 22:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-07 13:33 Problems compiling trivial C program Christopher January
2003-02-07 14:12 ` Max Bowsher
2003-02-07 15:10 ` Christopher Faylor
2003-02-09 22:46 ` Chris January
2003-02-09 23:36 ` Christopher Faylor
2003-02-10 17:47 ` Brian Keener
2003-02-10 17:56 ` Max Bowsher
2003-02-10 22:15 ` Brian Keener
2003-02-10 22:36 ` Igor Pechtchanski
2003-02-10 15:11 ` Dario Alcocer
2003-02-07 15:06 Keen Wayne A Contr AFRL/MNGG
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).