public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Wouter van Doorn <wouter@vandoorn.tv>
To: cygwin@cygwin.com
Subject: Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd
Date: Mon, 26 Jun 2017 19:01:00 -0000	[thread overview]
Message-ID: <CANZ2p_ecq4LXNtWtShednD3n8efLkKOPujeiR9VtvboOsLOimA@mail.gmail.com> (raw)
In-Reply-To: <CANZ2p_ckjzWEp0uPoJ8MAXh=0B6ZhWQVt9v_NmsFP-fpoX-sEg@mail.gmail.com>

Hello Cygwin-helpers,

Many thanks to all who have responded. It was good not to sit here
alone behind my keyboard tearing my hair out.

I'll outline what has heppened next especially for the benefit of
those readers who find themselves with this same problem. It would be
nasty to leave them in the lurch if I now only said 'thanks - it's
fine now'.

But things have now taken a strange/miraculous turn for the better. It
started with a suggestion from Achim about the general crappiness of
my PATH (fair), with a very specific request concerning the path by
Houder soon after. That was to recompile/link and re-run after setting
the PATH to just /usr/bin and nothing more.

To my relief, the resulting executable worked. Not just under the
command prompt, but also under mintty this time.

From there, it seemed an easy task to find what the path component was
that caused the whole mess, but... it wasn't. Because now that it once
worked as expected, I was NEVER able to get it to go wrong again. I
re-instated the troublesome path, removed and rebuilt the executable,
and it is now still fine. Did the same after a shutdown/restart. No
change - everything is now as it should have been from the start.

So the message to those with the same problem is: try recompiling with
the PATH set to /usr/bin. After that, you may, just like me,
experience some sort of magic that means the fault disappears.

I'd rather know what was wrong, and what really happened to make the
error go away, but I can live with how it is. If developers want me to
run specific tests, I'll be very happy to do so. Otherwise, I'd say we
should consider this closed (but not forgotten).

Thanks again to all who chipped in - it was really apreciated.
Wouter

On 21 June 2017 at 22:10, Wouter van Doorn <wouter@vandoorn.tv> wrote:
> Hi,
>
> Having installed Cygwin with no errors I could see, I went on to
> compile and run "hello world" - as you do. I could make it go from a
> windows command prompt after modifying the system path to include
> cygwin\bin, so - so far so good.
>
> From the cygwin terminal, however, the same executable refuses to play
> ball. No text is shown; the command prompt returns instantly.
>
> I have tried looking in the mailing list archive, and the answer may
> well be there (in which case I apologise). But the searches I have
> tried either returned nothing, or an incredible amount of information
> that was not apparently relevant to my problem.
>
> Maybe the attached strace output tells somebody something; to me its
> only helpful thing is that it shows that the cygwin1.dll is found and
> loaded, which eliminates the most likely potential problem that I
> could see. Dependency Walker only mutters about 64-bit and 32-bit
> libraries being mixed, but as the program runs under the Windows
> command prompt, I am discounting that as a reason for the failure.
>
> All the standard pre-compiled utilities I tried run as expected from
> the cygwin terminal.
>
> I'd be very grateful for a pointer!
> Wouter van Doorn

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  parent reply	other threads:[~2017-06-26 19:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 21:10 Wouter van Doorn
2017-06-21 21:49 ` René Berber
2017-06-22 13:13   ` Wouter van Doorn
2017-06-22 13:57     ` cyg Simple
2017-06-22 15:57       ` Wouter van Doorn
2017-06-26 14:16         ` cyg Simple
2017-06-26 18:51           ` Wouter van Doorn
2017-06-22 14:09     ` René Berber
2017-06-22 16:01       ` Wouter van Doorn
2017-06-22 16:19         ` René Berber
2017-06-22 19:11           ` Wouter van Doorn
2017-06-22 17:46         ` Soegtrop, Michael
2017-06-23  0:50         ` Andrey Repin
2017-06-23 19:30           ` Wouter van Doorn
2017-06-22 22:33     ` Thomas Wolff
2017-06-25  6:16       ` Wouter van Doorn
2017-06-25  6:23         ` René Berber
2017-06-25  6:32           ` Wouter van Doorn
2017-06-25 16:04             ` Brian Inglis
2017-06-25  8:33 ` Achim Gratz
2017-06-25  8:50   ` Houder
2017-06-26 19:01 ` Wouter van Doorn [this message]
2017-06-27  7:26   ` Wouter van Doorn
2017-06-27  8:14     ` Soegtrop, Michael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANZ2p_ecq4LXNtWtShednD3n8efLkKOPujeiR9VtvboOsLOimA@mail.gmail.com \
    --to=wouter@vandoorn.tv \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).