delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/30/13:35:21

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <2C08D4EECBDED41184BB00D0B747334202FB434A@exchanger.cacheflow.com>
From: "Karr, David" <david DOT karr AT cacheflow DOT com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: RE: Small prog linked with MS "cl.exe" gets "Invalid Argument" in
Cyg wn, but runs in DOS
Date: Mon, 30 Apr 2001 10:23:49 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)

Another tidbit of information.  I tried changing the line in the Makefile
that runs the executable to instead run "strace -o strace.out <executable>".
That gives me an error from "strace" saying "error creating process", with
an errno value of "87", which from "errno.h" indicates "Attempting to exec a
shared library".

-----Original Message-----
From: Karr, David [mailto:david DOT karr AT cacheflow DOT com]
Sent: Monday, April 30, 2001 10:00 AM
To: 'cygwin AT cygwin DOT com'
Subject: RE: Small prog linked with MS "cl.exe" gets "Invalid Argument"
in Cyg wn, but runs in DOS


Small update.  I'm not sure what it means yet.  I've also found that if I
run the exact same command line directly from bash, it works fine.  However,
if the command line is run from "make", it gets the "Invalid Argument"
error.  The "SHELL" variable in "make" is "sh.exe".  I also tried running
"sh.exe" from my Bash shell and running the command line, and it still works
fine.

-----Original Message-----
From: Karr, David [mailto:david DOT karr AT cacheflow DOT com]
Sent: Monday, April 30, 2001 8:59 AM
To: 'cygwin AT cygwin DOT com'
Subject: Small prog linked with MS "cl.exe" gets "Invalid Argument" in
Cyg wn, but runs in DOS


I would appreciate some help understanding (and solving) a problem with a
small C program.  It is being linked with MS "cl.exe", while in the Cygwin
environment.  When I run it in Cygwin, it immediately fails with "Invalid
Argument" BEFORE it gets to "main".  I'm reasonably certain it's before
"main" because I have a printf call at the top of "main".  When I run this
executable in DOS, outside of "bash", it runs fine.

I tried running it with a file I/O monitor running, and it doesn't show
anything interesting, just the executable file being opened, a search for a
PIF file, and then closing the executable file.

What sort of things could I do to diagnose this?  I'm an experienced C/C++
and Java programmer, but all of my C/C++ work has been on Unix.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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