RE: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-27 Thread Soegtrop, Michael
Dear Wouter, > One day on, and it's all reverted. Everything failing again in exactly the > same way > as before. It was too good to be true... You might want to disassemble the good and bad binaries and compare the disassemblies. This should reveal what is going on. You can send me the binari

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-27 Thread Wouter van Doorn
Ho-hum. One day on, and it's all reverted. Everything failing again in exactly the same way as before. It was too good to be true... I'll have to give up on cygwin, still appreciate the attempts at helping me. Wouter -- Problem reports: http://cygwin.com/problems.html FAQ:

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-26 Thread Wouter van Doorn
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

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-26 Thread Wouter van Doorn
Hello again! Thanks for your continued support. Answers to your questions will follow, but I do need to say first that there has been progress, and although the wy of getting there was extremely vague, things now do work properly. I'll say more in a general reply later. So the urgency is gone, bu

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-26 Thread cyg Simple
On 6/22/2017 11:57 AM, Wouter van Doorn wrote: >> >> Is your prompt overwriting the output of the program? >> >> Try: >> >> $ hello | cat >> $ hello | grep ello >> >> etc. > > On 22 June 2017 at 14:57, cyg Simple wrote: > Nice thought, but no, that's not it. The standard utilities behave > normall

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-25 Thread Brian Inglis
On 2017-06-25 00:31, Wouter van Doorn wrote: > There isn't one! The default rule does exactly that (although despite > the -o it creates a hello.exe, but that's fine. It doesn't seem to be fine - is that not what you're complaining about? Given your PATH, we don't know which make might be running,

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-25 Thread Houder
On Sun, 25 Jun 2017 10:33:17, Achim Gratz wrote: > Wouter van Doorn writes: > [=E2=80=A6] > > Your strace shows that you're getting the following exception on loading > one of the Windows DLL or just after an attempt to do that: > > C096: STATUS_PRIVILEGED_INSTRUCTION > Executing an

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-25 Thread Achim Gratz
Wouter van Doorn writes: […] Your strace shows that you're getting the following exception on loading one of the Windows DLL or just after an attempt to do that: C096: STATUS_PRIVILEGED_INSTRUCTION Executing an instruction not allowed in current machine mode. You might want to look

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-24 Thread Wouter van Doorn
Hi René, There isn't one! The default rule does exactly that (although despite the -o it creates a hello.exe, but that's fine. Wouter I'm convinced that the answer must lie hidden in the two differing outputs of procmon, elsewhere in this thread. But I lack the knowledge to go in deeper, and the

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-24 Thread René Berber
On 6/25/2017 1:14 AM, Wouter van Doorn wrote: > The tools are the original ones, as shown below: > User@User-PC ~/c_dir > $ ./hello.exe > > User@User-PC ~/c_dir > $ type make > make is hashed (/usr/bin/make) > > User@User-PC ~/c_dir > $ type gcc > gcc is /usr/bin/gcc Try a simple: $ gcc -o hel

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-24 Thread Wouter van Doorn
Hello Thomas, Thanks for looking. The tools are the original ones, as shown below: User@User-PC ~/c_dir $ ./hello.exe User@User-PC ~/c_dir $ type make make is hashed (/usr/bin/make) User@User-PC ~/c_dir $ type gcc gcc is /usr/bin/gcc User@User-PC ~/c_dir $ type cc cc is /usr/bin/cc If you kn

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-23 Thread Wouter van Doorn
Hi Andrey, That looked really promising, as that whole rebasing stuff was something I'd never heard about. Unfortunately, it did not lead to anything; all my self-compiled tools still do exactly nothing. Apologies about the top-posting; I had missed that rule. Wouter -- Problem reports: ht

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread Andrey Repin
Greetings, Wouter van Doorn! > On 22 June 2017 at 15:08, René Berber wrote: >> On 6/22/2017 8:13 AM, Wouter van Doorn wrote: >> >> [snip] >>> STOP PRESS: in gdb, the output IS there: >>> User-PC-> gdb hello.exe >>> GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1 >> ... >>> Reading symbols from hello.exe...

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread Thomas Wolff
Am 22.06.2017 um 15:13 schrieb Wouter van Doorn: Hi René, Thanks for your attempts at having me dig deeper. So far, I am not striking lucky. Here's the various outputs, that don't say anything obvious to me: User-PC-> echo $PATH /home/User/exe.CYGWIN:/home/User/bin:/usr/local/bin:/usr/bin:/cygdr

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread Wouter van Doorn
Well, it's the same antivirus (comodo) that I earlier had a working system with, and there's also the matter of it running fine under a windows command prompt. Thanks for all your suggestions! On 22 June 2017 at 17:18, René Berber wrote: > On 6/22/2017 10:59 AM, Wouter van Doorn wrote: > >> With

RE: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread Soegtrop, Michael
Dear Wouter, when things get bizarre on Windows, I tend to use Sysinternals/Microsoft ProcMon. It is free and can be downloaded here: https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx ProcMon shows you all Windows system calls with parameters and error results. You should se

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread René Berber
On 6/22/2017 10:59 AM, Wouter van Doorn wrote: > With 'outside', I meant a normal run not involving gdb at all. Sorry > if I was unclear. > > Yes, it's minty, and it's /bin/bash. > > Out of desperation, I have added a sleep for two seconds both before > and after the printf statement. The sleep

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread Wouter van Doorn
With 'outside', I meant a normal run not involving gdb at all. Sorry if I was unclear. Yes, it's minty, and it's /bin/bash. Out of desperation, I have added a sleep for two seconds both before and after the printf statement. The sleep does not happen either! The prompt is immediately back, so it'

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread Wouter van Doorn
Nice thought, but no, that's not it. The standard utilities behave normally, only the things I compile myself stay schtumm. On 22 June 2017 at 14:57, cyg Simple wrote: >> >> STOP PRESS: in gdb, the output IS there: >> User-PC-> gdb hello.exe >> GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1 >> Copyright

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread René Berber
On 6/22/2017 8:13 AM, Wouter van Doorn wrote: [snip] > STOP PRESS: in gdb, the output IS there: > User-PC-> gdb hello.exe > GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1 ... > Reading symbols from hello.exe...done. > (gdb) run > Starting program: /home/User/c_dir/hello.exe > [New Thread 6868.0x5b0] > [Ne

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread cyg Simple
> > STOP PRESS: in gdb, the output IS there: > User-PC-> gdb hello.exe > GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1 > Copyright (C) 2015 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and re

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-22 Thread Wouter van Doorn
Hi René, Thanks for your attempts at having me dig deeper. So far, I am not striking lucky. Here's the various outputs, that don't say anything obvious to me: User-PC-> echo $PATH /home/User/exe.CYGWIN:/home/User/bin:/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/

Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd

2017-06-21 Thread René Berber
On 6/21/2017 4:10 PM, Wouter van Doorn wrote: > 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 t