Re: side effects after installing gcc-3.4.4.999

2010-10-26 Thread Larry Hall (Cygwin)

On 10/19/2010 11:47 AM, Afflictedd2 wrote:

Akakima wrote:


After updating gcc in my cygwin installation, i discovered
that i cannot run gcc.exe from the native winxp console (cmd.exe).

gcc.exe has been replaced by gcc-3.exe.

Of course, this works fine under bash and ash, but it does not work
anymore
under cmd.exe.

since i prefer to work under cmd.exe. i tried to fix this problem by:
adding .LNK to PATHEXT
and adding /usr/bin/alternatives to the PATH

and now if i type gcc, cmd finds gcc-3.exe and launch it.
But, this is not perfect. gcc (or someone else) wait until i press
enter to continue.

Anybody knows a better solution ?


I've got a simple solution  that I am not sure if it has been mentioned here.
take the link g++, and rename it g++.bak
and make a copy of the g++ you want to use g++-3 or 4
and rename it g++

No more access denied problem.


Better solutions than what you found are:

 o Invoke g++-3, gcc-3, g++-4, or gcc-4 directly.  These are executables
   and work fine from the command prompt.
 o Create g++.bat and gcc.bat that call your preferred executable.

These are better options than the one you found because they protect the
integrity and structure of the package.  Upgrades will not have leftover
.bak files from earlier versions and so on.  Also, your approach interferes
with the use of 'alternatives' to select the compiler version you want.  This
is made convenient by 2 scripts, set-gcc-default-3.sh and set-gcc-default-4.sh.
This mechanism is the reason that gcc, g++, gcj, and gnat are symbolic links
now rather than executables.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
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



Re: side effects after installing gcc-3.4.4.999

2010-10-19 Thread Afflictedd2

I've got a simple solution  that I am not sure if it has been mentioned here.
take the link g++, and rename it g++.bak
and make a copy of the g++ you want to use g++-3 or 4 
and rename it g++

No more access denied problem.

Ted


Akakima wrote:
 
 After updating gcc in my cygwin installation, i discovered
 that i cannot run gcc.exe from the native winxp console (cmd.exe).
 
 gcc.exe has been replaced by gcc-3.exe.
 
 Of course, this works fine under bash and ash, but it does not work 
 anymore
 under cmd.exe.
 
 since i prefer to work under cmd.exe. i tried to fix this problem by:
 adding .LNK to PATHEXT
 and adding /usr/bin/alternatives to the PATH
 
 and now if i type gcc, cmd finds gcc-3.exe and launch it.
 But, this is not perfect. gcc (or someone else) wait until i press
 enter to continue.
 
 Anybody knows a better solution ?
 
 I would prefer not to be forced to use bash.
 
 
 
 
 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:   http://cygwin.com/problems.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/
 
 
 

-- 
View this message in context: 
http://old.nabble.com/side-effects-after-installing-gcc-3.4.4.999-tp22282325p30001579.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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



Re: side effects after installing gcc-3.4.4.999

2009-06-04 Thread enovack

I have not seen this mentioned in this list. Please forgive me if I just
missed it somewhere. 

I'm having a similar issue with trying to get the GNU g++ and gcc compiler's
to work with Eclipse and Netbeans. Both report that the file is not valid or
not found when compiling a C or C++ file.

I have just downloaded the latest production release of Cygwin and installed
the complete dev environment. I'm running 64 bit Vista SP2. I have the
cygwin\bin path added to my DOS path.

Has anyone gotten the latest Cygwin to work with Netbeans or Eclipse? 

I was able to get older version of Cygwin to work with both Netbeans and
Eclipse in the past just by setting up the DOS path to include
C:\cygwin\bin. Now I see that the gcc.exe and g++.exe are links, which I now
assume are not working properly in a DOS environment. Which of course is
needed by both Eclipse and Netbeans.

Best,
Eileen


Dave Korn-6 wrote:
 
 Akakima wrote:
 
 But, i have installed 1.7 yesterday evening.
 
 I created shortcuts to dir.exe, ls.exe, uname.exe and users.exe to see
 if gcc was the only program impacted.
 
 No change. After the program has done his job, cmd is waiting for input,
 without displaying its prompt.
 
 So i think now cmd.exe is causing the behaviour. 
 
   Thank you for testing this for us.  When I have spare time, I'll try
 some
 experiments in 1.7 and see if I can pin down what's going wrong, but it
 may or
 may not lead to anything; I don't want to raise false hopes.
 
 cheers,
   DaveK
 
 
 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:   http://cygwin.com/problems.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/
 
 
 

-- 
View this message in context: 
http://www.nabble.com/side-effects-after-installing-gcc-3.4.4.999-tp22282325p23870621.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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



Re: side effects after installing gcc-3.4.4.999

2009-06-04 Thread Dave Korn
enovack wrote:

 I'm having a similar issue with trying to get the GNU g++ and gcc compiler's
 to work with Eclipse and Netbeans. Both report that the file is not valid or
 not found when compiling a C or C++ file.
 
 I have just downloaded the latest production release of Cygwin and installed
 the complete dev environment. I'm running 64 bit Vista SP2. I have the
 cygwin\bin path added to my DOS path.
 
 Has anyone gotten the latest Cygwin to work with Netbeans or Eclipse? 
 
 I was able to get older version of Cygwin to work with both Netbeans and
 Eclipse in the past just by setting up the DOS path to include
 C:\cygwin\bin. Now I see that the gcc.exe and g++.exe are links, which I now
 assume are not working properly in a DOS environment. Which of course is
 needed by both Eclipse and Netbeans.

  I don't use either of those, but you should be able to configure them to
just directly invoked gcc-3.exe or gcc-4.exe, thereby bypassing the link
altogether, shouldn't you?

cheers,
  DaveK


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



Re: side effects after installing gcc-3.4.4.999

2009-06-04 Thread enovack

Actually, I thought of that just after I hit send on my last post. :-(

I then tried doing just that on Netbeans 6.5.1, and that fixed the issue.

On Eclipse it did not. Or at least not yet. I have not been able to
configure Eclipse 3.4 CDT plug-in to recognize the complete Cygwin
environment. I did get it to actually build the app, but it has issues
running and debugging. 

So, still experimenting.

It's just a pain since this used to work on my old laptop, which had a
previous version of cygwin installed.

Best,
Eileen


Dave Korn-6 wrote:
 
 enovack wrote:
 
 I'm having a similar issue with trying to get the GNU g++ and gcc
 compiler's
 to work with Eclipse and Netbeans. Both report that the file is not valid
 or
 not found when compiling a C or C++ file.
 
 I have just downloaded the latest production release of Cygwin and
 installed
 the complete dev environment. I'm running 64 bit Vista SP2. I have the
 cygwin\bin path added to my DOS path.
 
 Has anyone gotten the latest Cygwin to work with Netbeans or Eclipse? 
 
 I was able to get older version of Cygwin to work with both Netbeans and
 Eclipse in the past just by setting up the DOS path to include
 C:\cygwin\bin. Now I see that the gcc.exe and g++.exe are links, which I
 now
 assume are not working properly in a DOS environment. Which of course is
 needed by both Eclipse and Netbeans.
 
   I don't use either of those, but you should be able to configure them to
 just directly invoked gcc-3.exe or gcc-4.exe, thereby bypassing the link
 altogether, shouldn't you?
 
 cheers,
   DaveK
 
 
 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:   http://cygwin.com/problems.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/
 
 
 

-- 
View this message in context: 
http://www.nabble.com/side-effects-after-installing-gcc-3.4.4.999-tp22282325p23871582.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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



Re: side effects after installing gcc-3.4.4.999

2009-06-04 Thread Dave Korn
enovack wrote:

 It's just a pain since this used to work on my old laptop, which had a
 previous version of cygwin installed.

  Sorry about that.  Primarily the goal of cygwin is to provide a linux-like
environment and linux-like behaviour, and from that point of view the ability
to switch the system default compiler was something that was a deficiency
while it was missing.  We don't go out of our way to break other usages such
as an external win32 app trying to launch a cygwin app from a non-cygwin
environment, but we can't always make everything compatible with win32 at the
expense of linux compatability.  I am surprised you're having problems though,
as with /bin in the windows PATH and invoking the particular compiler by name
it should all just work.  (Yeah... famous last words!)

  It might also be possible to use cygstart as a wrapper to launch the plain
gcc shortcut and even take advantage of the alternatives wrapper from
within your applications, although I can't promise.

 Best,
 Eileen
 
 
 Dave Korn-6 wrote:

  Hey!  I just got .so versioned! :-)

cheers,
  DaveK


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



Re: side effects after installing gcc-3.4.4.999

2009-06-04 Thread enovack

Thanks for the quick response Dave.

I understand about the primary use of Cygwin.  I also like to use it to test
code through the GNU compiler in addition to the Visual C one. Since I also
use Eclipse for Java, it's convenient to use it for C++ as well for this
type of testing.

I'll look to see if the Eclipse CDT folks have an answer.

Best,
Eileen


Dave Korn-6 wrote:
 
 enovack wrote:
 
 It's just a pain since this used to work on my old laptop, which had a
 previous version of cygwin installed.
 
   Sorry about that.  Primarily the goal of cygwin is to provide a
 linux-like
 environment and linux-like behaviour, and from that point of view the
 ability
 to switch the system default compiler was something that was a deficiency
 while it was missing.  We don't go out of our way to break other usages
 such
 as an external win32 app trying to launch a cygwin app from a non-cygwin
 environment, but we can't always make everything compatible with win32 at
 the
 expense of linux compatability.  I am surprised you're having problems
 though,
 as with /bin in the windows PATH and invoking the particular compiler by
 name
 it should all just work.  (Yeah... famous last words!)
 
   It might also be possible to use cygstart as a wrapper to launch the
 plain
 gcc shortcut and even take advantage of the alternatives wrapper from
 within your applications, although I can't promise.
 
 Best,
 Eileen
 
 
 Dave Korn-6 wrote:
 
   Hey!  I just got .so versioned! :-)
 
 cheers,
   DaveK
 
 
 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:   http://cygwin.com/problems.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/
 
 
 

-- 
View this message in context: 
http://www.nabble.com/side-effects-after-installing-gcc-3.4.4.999-tp22282325p23873433.html
Sent from the Cygwin list mailing list archive at Nabble.com.


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



Re: side effects after installing gcc-3.4.4.999

2009-06-04 Thread Greg Chicares
On 2009-06-04 16:05Z, Dave Korn wrote:
 enovack wrote:
[using gcc in eclipse; problem not solved by invoking 'gcc-3.exe']
 It's just a pain since this used to work on my old laptop, which had a
 previous version of cygwin installed.
 
   Sorry about that.  Primarily the goal of cygwin is to provide a linux-like
 environment and linux-like behaviour, and from that point of view the ability
 to switch the system default compiler was something that was a deficiency
 while it was missing.  We don't go out of our way to break other usages such
 as an external win32 app trying to launch a cygwin app from a non-cygwin
 environment, but we can't always make everything compatible with win32 at the
 expense of linux compatability.

Is there any reason not to recommend MinGW in this case,
since the OP's later followup says she just wants another
compiler in addition to the Visual C one?

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



Re: side effects after installing gcc-3.4.4.999

2009-03-03 Thread Owen Rees

--On Monday, March 02, 2009 19:08:58 + Dave Korn wrote:


Ah, look, it's not that the
prompt is getting lost: it's just that GCC's output comes out after the
prompt for some reason.


That looks as if gcc launches a child process then exits without waiting 
for it. The command processor issues its prompt before the gcc child 
process writes its message.


--
Owen Rees; speaking personally, and not on behalf of HP.

Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN

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



Re: side effects after installing gcc-3.4.4.999

2009-03-03 Thread Akakima

Dave Korn wrote:
Then again, it may be a sign that we're missing a flush somewhere in 
the
Cygwin DLL.  Are you trying with 1.5 or 1.7?  If you haven't tried 
1.7 yet,


using 1.5.
But, i have installed 1.7 yesterday evening.

I created shortcuts to dir.exe, ls.exe, uname.exe and users.exe to see 
if gcc

was the only program impacted.

No change. After the program has done his job, cmd is waiting for 
input, without

displaying its prompt.

So i think now cmd.exe is causing the behaviour. And the behaviour 
does not

manifest if the program sends nothing to the console. For example,
if you compile something and there is no error and no warning, then
everything is ok.

 In the meantime, I suggest that you don't worry too much about it. 
The
compiler works, every command you enter is executed, and the only 
thing wrong
is that the prompt goes missing somehow.  That hopefully won't break 
any of

your scripts or batch files.


Right.

Thanks.



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



Re: side effects after installing gcc-3.4.4.999

2009-03-03 Thread Dave Korn
Akakima wrote:

 But, i have installed 1.7 yesterday evening.
 
 I created shortcuts to dir.exe, ls.exe, uname.exe and users.exe to see
 if gcc was the only program impacted.
 
 No change. After the program has done his job, cmd is waiting for input,
 without displaying its prompt.
 
 So i think now cmd.exe is causing the behaviour. 

  Thank you for testing this for us.  When I have spare time, I'll try some
experiments in 1.7 and see if I can pin down what's going wrong, but it may or
may not lead to anything; I don't want to raise false hopes.

cheers,
  DaveK


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



Re: side effects after installing gcc-3.4.4.999

2009-03-02 Thread Akakima


Greg Chicares gchica...@sbcglobal.net 

If gcc version 3.x is what you want, why not just downgrade
from 3.4.4-999 to gcc-3.4.4-3? AIUI, the only difference
between the two is something you don't want:



That's what i did (downgraded).
Still, i wanted to make someone aware of the fact that the update was
the cause of a change in behaviour.


Alternatively, you might prefer to use mingw.org's native gcc.


I use both cygwin and mingw.
cygwin have more programs and a better unix support.
mingw has no dependance on a dedicated dll.




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



Re: side effects after installing gcc-3.4.4.999

2009-03-02 Thread Charles Wilson
Akakima wrote:

 cygwin have more programs and a better unix support.

...which you refuse to use.  I don't think you're going to get a whole
lot of sympathy for your problem -- and I'm sure Dave is not going to
respin gcc-3.4.4-999 to fix it.

--
Chuck

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



Re: side effects after installing gcc-3.4.4.999

2009-03-02 Thread Akakima

Dave Korn wrote:



 Nope, of course not.  Use gcc-3.exe instead.


Dave, English is not my native language (I guess you know that!)
So i want to add that i am not critisizing
but just stating what i want and what i found. :-)

Why of course ?. You said in a previous post that the update would 
go

without change in behaviour. I do not want to use gcc-3.exe.
I have many .bat/.cmd files calling gcc and i do not want to modify 
them.

I still want to be able to call gcc.



and now if i type gcc, cmd finds gcc-3.exe and launch it.

 That didn't work when I tried it:

C:\cygwin\etc\alternativesgcc
Access is denied.


Sorry, i dont know why. I assure you it works on my computer.
The are many entries in the WIndows registry to support shortcuts.
May be one of these entries is not ok on your machine.



C:\cygwin\etc\alternativesgcc.lnk
Access is denied.

C:\cygwin\etc\alternatives


But, this is not perfect. gcc (or someone else) wait until i press
enter to continue.


 GCC doesn't do that sort of thing.  What actual command do you 
type, and
what symptom do you get?  What program is running if you check with 
ps -a in
another window while this possible wait-to-press-enter is occurring? 
Does GCC

go ahead and generate a compiled output after you press enter?


the two commands:
 gcc
 gcc --version
ask for an enter.

The command: gcc file.c
does generate a.exe without asking for an enter.
I dont know why but will do some more checks.



 The problem arises because you insist on two things: 1) you want to 
use
cmd.exe, 2) you want to start a program without typing the name it's 
actually
called.  Since cmd.exe doesn't understand links, your two 
requirements are
mutually contradictory.  The best solution is to downgrade, or to 
copy

gcc-3.exe to gcc.exe and get rid of the link stuff altogether.



Yes i want to use cmd.exe. This is ok i think.
And i want to type gcc not ggc-3. (lots of .bat files with gcc.exe 
refs)


cmd.exe does understand links. I just reinstalled the update.
Now, if i type (under cmd.exe):

 E:\cygwinE:\cygwin\etc\alternatives\gcc.lnk
 E:\cygwingcc-3: no input files
   --- waiting for an enter here. Enter does gives me the next line.
 E:\cygwin

Compiling works without asking for an enter:

 E:\cygwintype a.c
 int main( ){return 0;}
 E:\cygwinE:\cygwin\etc\alternatives\gcc.lnk a.c
 E:\cygwindir a*
 2009-03-02  09:0822 a.c
 2008-08-30  18:03 8 904 a.exe
 E:\cygwin

Adding .LNK to PATHEXT and e:\cygwin\etc\alternatives to PATH
allow me to type gcc from any directory. Windows will try
gcc.bat, gcc.cmd, gcc.exe, gcc.lnk in all the directories in the PATH.

Now, i am not saying this is a bug in cygwin. Again, i just want to 
make someone

aware of the fact this is not without change in behaviour.

After i updated my installation with setup.exe (ran it without 
selecting

anything and got the new gcc's automatically), i was surprise to
see that gcc.exe was not working anymore.

For the moment, i undone the update. Later i will find something else.
(Like copy gcc-3.exe gcc.exe).

And if i want to use both gcc3 and gcc4, i will probably use a couples
of bat files that will switch things around.

Thanks for your attention.




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



Re: side effects after installing gcc-3.4.4.999

2009-03-02 Thread Akakima


Charles Wilson

...which you refuse to use.  I don't think you're going to get a 
whole
lot of sympathy for your problem -- and I'm sure Dave is not going 
to

respin gcc-3.4.4-999 to fix it.

--
Chuck



Ok. I was not asking for gcc being respined.

Thanks anyway.





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



Re: side effects after installing gcc-3.4.4.999

2009-03-02 Thread Dave Korn
Akakima wrote:

 Why of course ?. You said in a previous post that the update would go
 without change in behaviour. 

  Sorry, I guess it was only implied by my post: the behaviour of *Cygwin*
applications hasn't changed.  I can't make guarantees about what DOS or
Windows will do because that's outside my control.  (And I don't think it
would make sense to avoid using Linux features in Cygwin just so that stuff
will work from DOS!)

 I do not want to use gcc-3.exe.
 I have many .bat/.cmd files calling gcc and i do not want to modify them.
 I still want to be able to call gcc.

  Wouldn't a good solution be for your windows path to have an extra directory
in it ahead of Cygwin's /bin directory, where you could put a windows shortcut
to gcc-3.exe and call it gcc?  That should work; by having this directory at
the front of your PATH in DOS (but not in Cygwin) you could easily add
overrides for the names of any Cygwin applications/symlinks that you wanted.

 and now if i type gcc, cmd finds gcc-3.exe and launch it.
  That didn't work when I tried it:

 C:\cygwin\etc\alternativesgcc
 Access is denied.
 
 Sorry, i dont know why. I assure you it works on my computer.
 The are many entries in the WIndows registry to support shortcuts.
 May be one of these entries is not ok on your machine.

  Yes, or it could just be a version difference.  I use win2k on my main system.

 the two commands:
  gcc
  gcc --version
 ask for an enter.
 
 The command: gcc file.c
 does generate a.exe without asking for an enter.
 I dont know why but will do some more checks.

  Something very strange is happening!  GCC doesn't read any input from stdin
in any of those cases, so it's surprising that it behaves differently.

 Yes i want to use cmd.exe. This is ok i think.
 And i want to type gcc not ggc-3. (lots of .bat files with gcc.exe refs)

  It's your own choice, of course, but I'd consider modifying the batch files.
 It might be easier than you think to change them all in one go:

find . -name '*.bat' | xargs sed -i -e 's/gcc.exe/gcc-3.exe/g'

 cmd.exe does understand links. I just reinstalled the update.
 Now, if i type (under cmd.exe):
 
  E:\cygwinE:\cygwin\etc\alternatives\gcc.lnk
  E:\cygwingcc-3: no input files
--- waiting for an enter here. Enter does gives me the next line.
  E:\cygwin

  OK, hang on a moment, I know it might sound silly of me to ask but now I
have to check: you aren't doing something unusual like running cmd.exe in a
rxvt window are you?  Or do you by any chance have CYGWIN=tty set in your
environment variables?  I wonder if it's really waiting for an enter, or if
it's actually waiting for a full command line, and just the prompt hasn't been
flushed to the screen yet.  What happens if you type dir enter or some
other command instead of just pressing enter on its own?

  In your earlier examples, where I said Cygwin doesn't read stdin anyway,
that's still the case.  But there is one difference that might be the reason
here: when you run gcc file.c, gcc launches a number of subprocesses -
preprocessor, compiler, assembler, linker.  With the other two commands, it
runs and exits without launching any other executables; I wonder if somehow
that means that in one case all the output gets flushed and you see the prompt
and know it's finished, in the other case the prompt gets lost in a buffer
somewhere and you don't see it.  Maybe launching subprocesses causes all the
buffers to be flushed through in the first case.

 Now, i am not saying this is a bug in cygwin. Again, i just want to make
 someone aware of the fact this is not without change in behaviour.

  Sorry, yes, we're not always clear about this.  Usage from DOS is a
nice-to-have feature, but can't always be guaranteed to work the same as usage
from within a Cygwin shell.  When I said no change in behaviour, I was only
thinking of within a Cygwin environment; my apologies for not being as clear
as I could have been.

 For the moment, i undone the update. Later i will find something else.
 (Like copy gcc-3.exe gcc.exe).

  I would advise you consider my suggestion of having a
renaming-and-overriding directory full of windows shortcuts at the head of
your PATH.  There are quite a lot of things in /bin that exist primarily as
symlinks to the real application, gcc is just one among many.

 And if i want to use both gcc3 and gcc4, i will probably use a couples
 of bat files that will switch things around.

  That would work nicely with the directory-full-of-shortcuts approach, and
basically you'd then have reimplemented in DOS the switching that I've done
only within the Cygwin environment.

  Hey, I just tried that out to see if it works, and it does, but it also
allows me to see the waits for enter problem occurring!  It's definitely
just the DOS prompt getting lost somehow; any command that you type before
pressing enter does get executed when you do.  Ah, look, it's not that the
prompt is getting lost: it's just that GCC's output comes out after the 

Re: side effects after installing gcc-3.4.4.999

2009-03-02 Thread Akakima


Dave Korn  wrote:

Windows will do because that's outside my control.  (And I don't 
think it
would make sense to avoid using Linux features in Cygwin just so 
that stuff

will work from DOS!)


I agree 99.99 % with you.  :-). the 0.01 is about would you please not 
totally forget
that cygwin is running on a Win32 platform. (no offense here, no joke, 
no disrecpect, ...)


Technicaly it's not DOS, but the WinXP command prompt window. This 
windows
behave like a DOS console but this is not a DOS application. This a 
win32 application
using a rather feature limited subset of the winapi. (sorry if you 
already know this).


 Wouldn't a good solution be for your windows path to have an extra 
directory
in it ahead of Cygwin's /bin directory, where you could put a 
windows shortcut
to gcc-3.exe and call it gcc?  That should work; by having this 
directory at
the front of your PATH in DOS (but not in Cygwin) you could easily 
add
overrides for the names of any Cygwin applications/symlinks that you 
wanted.


Yes, it is a good idea. I already have a set of batch files that fix 
the PATH an other

environments variables depending with what compiler i am working with.
setcygwin.cmd for Cywin
setmingw.cmd for MingW
etc...

This works quite well. Each new instance of the cmd.exe can have its 
own set

of variables.

 Yes, or it could just be a version difference.  I use win2k on my 
main system.


I use WinXP Pro, SP2.

 Something very strange is happening!  GCC doesn't read any input 
from stdin
in any of those cases, so it's surprising that it behaves 
differently.


Ah!


It might be easier than you think to change them all in one go:
find . -name '*.bat' | xargs sed -i -e 's/gcc.exe/gcc-3.exe/g'


Thanks for the tip.



 OK, hang on a moment, I know it might sound silly of me to ask but 
now I
have to check: you aren't doing something unusual like running 
cmd.exe in a
rxvt window are you?  Or do you by any chance have CYGWIN=tty set in 
your


No.  No.

environment variables?  I wonder if it's really waiting for an 
enter, or if
it's actually waiting for a full command line, and just the prompt 
hasn't been
flushed to the screen yet.  What happens if you type dir enter 
or some

other command instead of just pressing enter on its own?


Now you got it. After doing some other test that's what i found.
Effectively if you type a command there, that command is executed.
So this is cmd.exe waiting for input (but the prompt has not
been displayed or has been erased)



 In your earlier examples, where I said Cygwin doesn't read stdin 
anyway,
that's still the case.  But there is one difference that might be 
the reason
here: when you run gcc file.c, gcc launches a number of 
subprocesses -
preprocessor, compiler, assembler, linker.  With the other two 
commands, it
runs and exits without launching any other executables; I wonder if 
somehow
that means that in one case all the output gets flushed and you see 
the prompt
and know it's finished, in the other case the prompt gets lost in a 
buffer
somewhere and you don't see it.  Maybe launching subprocesses causes 
all the

buffers to be flushed through in the first case.


I dont know and i dont know how to test that.
I made some other tests. I created the shortcut from the explorer.
May be cygwin was creating the shortcut in a way that caused that 
behaviour, or may

be it was because cygwin does not use \r (just \n).
Same results.

I also tried to create a shortcut to mingw gcc.exe (which emits \r\n). 
Same results.

And i tried with a small program who does only write to stderr, and
compiled it with VisualC++ v6.0 : Same results.

Conclusion: this is related to the way cmd.exe process and run the 
target

of the shortcut. Shortcuts are normally ran from the explorer. I guess
bash is a little more intelligent.


 I would advise you consider my suggestion of having a
renaming-and-overriding directory full of windows shortcuts at the 
head of
your PATH.  There are quite a lot of things in /bin that exist 
primarily as

symlinks to the real application, gcc is just one among many.


That would be perfect, because with all the good settings, the change 
would
be completly transparent. If cmd.exe was not the culprit. As 
illustrated.


 Hey, I just tried that out to see if it works, and it does, but it 
also
allows me to see the waits for enter problem occurring!  It's 
definitely
just the DOS prompt getting lost somehow; any command that you type 
before
pressing enter does get executed when you do.  Ah, look, it's not 
that the
prompt is getting lost: it's just that GCC's output comes out after 
the prompt

for some reason.  See the example below:



 Is that how it's happening for you?


Yes!. Exactly.
I tried many variants to launch the shortcut. Each time, the results
are the same.

Thanks for taking the time to verify this.  If i find a solution
i will report it here.




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   

Re: side effects after installing gcc-3.4.4.999

2009-03-02 Thread Akakima


Dave Korn  wrote:


Windows will do because that's outside my control.  (And I don't
think it
would make sense to avoid using Linux features in Cygwin just so
that stuff
will work from DOS!)


I agree 99.99 % with you.  :-). the 0.01 is about would you please not
totally forget
that cygwin is running on a Win32 platform. (no offense here, no joke,
no disrecpect, ...)

Technicaly it's not DOS, but the WinXP command prompt window. This
windows
behave like a DOS console but this is not a DOS application. This a
win32 application
using a rather feature limited subset of the winapi. (sorry if you
already know this).


 Wouldn't a good solution be for your windows path to have an extra
directory
in it ahead of Cygwin's /bin directory, where you could put a
windows shortcut
to gcc-3.exe and call it gcc?  That should work; by having this
directory at
the front of your PATH in DOS (but not in Cygwin) you could easily
add
overrides for the names of any Cygwin applications/symlinks that you
wanted.


Yes, it is a good idea. I already have a set of batch files that fix
the PATH an other
environments variables depending with what compiler i am working with.
setcygwin.cmd for Cywin
setmingw.cmd for MingW
etc...

This works quite well. Each new instance of the cmd.exe can have its
own set of variables.


 Yes, or it could just be a version difference.  I use win2k on my
main system.


I use WinXP Pro, SP2.


 Something very strange is happening!  GCC doesn't read any input
from stdin
in any of those cases, so it's surprising that it behaves
differently.


Ah!


It might be easier than you think to change them all in one go:
find . -name '*.bat' | xargs sed -i -e 's/gcc.exe/gcc-3.exe/g'


Thanks for the tip.



 OK, hang on a moment, I know it might sound silly of me to ask but
now I
have to check: you aren't doing something unusual like running
cmd.exe in a
rxvt window are you?  Or do you by any chance have CYGWIN=tty set in
your


No.  No.


environment variables?  I wonder if it's really waiting for an
enter, or if
it's actually waiting for a full command line, and just the prompt
hasn't been
flushed to the screen yet.  What happens if you type dir enter
or some
other command instead of just pressing enter on its own?


Now you got it. After doing some other test that's what i found.
Effectively if you type a command there, that command is executed.
So this is cmd.exe waiting for input (but the prompt has not
been displayed or has been erased)



 In your earlier examples, where I said Cygwin doesn't read stdin
anyway,
that's still the case.  But there is one difference that might be
the reason
here: when you run gcc file.c, gcc launches a number of
subprocesses -
preprocessor, compiler, assembler, linker.  With the other two
commands, it
runs and exits without launching any other executables; I wonder if
somehow
that means that in one case all the output gets flushed and you see
the prompt
and know it's finished, in the other case the prompt gets lost in a
buffer
somewhere and you don't see it.  Maybe launching subprocesses causes
all the
buffers to be flushed through in the first case.


I dont know and i dont know how to test that.

I also made some other tests. I created the shortcut from the
explorer.
May be cygwin was creating the shortcut in a way that caused that
behaviour, or may be it was because cygwin does not use \r (just \n).
Same results.

I also tried to create a shortcut to mingw gcc.exe (which emits \r\n).
Same results.
And i tried with a small program who does only write to stderr, and
compiled it with VisualC++ v6.0 : Same results.

Conclusion: this is related to the way cmd.exe process and run the
target of the shortcut. Shortcuts are normally ran from the explorer.
I guess bash is a little more intelligent.


 I would advise you consider my suggestion of having a
renaming-and-overriding directory full of windows shortcuts at the
head of
your PATH.  There are quite a lot of things in /bin that exist
primarily as
symlinks to the real application, gcc is just one among many.


That would be perfect, because with all the good settings, the change
would be completly transparent. If cmd.exe was not the culprit. As
illustrated.


 Hey, I just tried that out to see if it works, and it does, but it
also
allows me to see the waits for enter problem occurring!  It's
definitely
just the DOS prompt getting lost somehow; any command that you type
before
pressing enter does get executed when you do.  Ah, look, it's not
that the
prompt is getting lost: it's just that GCC's output comes out after
the prompt
for some reason.  See the example below:



 Is that how it's happening for you?


Yes!. Exactly.
I tried many variants to launch the shortcut. Each time, the results
are the same.

Thanks for taking the time to verify this.  If i find a solution
i will report it here.




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

Re: side effects after installing gcc-3.4.4.999

2009-03-02 Thread Dave Korn
Akakima wrote:

 I agree 99.99 % with you.  :-). the 0.01 is about would you please not 
 totally forget that cygwin is running on a Win32 platform. (no offense
 here, no joke, no disrecpect, ...)

  Absolutely, no offence taken, and I'm sorry if my earlier post seemed that I
had done so.  We of course don't want to forget that we're running on win32,
and I don't want to do anything to needlessly break using Cygwin apps directly
from win32, but I even more don't want to do anything to hold back the
completeness and improvement of the POSIX side of things for the sake of the
win32 side.  Fair?  :-)

 Technicaly it's not DOS, but the WinXP command prompt window. This windows 
 behave like a DOS console but this is not a DOS application. This a win32
 application using a rather feature limited subset of the winapi. (sorry if
 you already know this).

  Yes; what I meant by that distinction was that you're running the cmd.exe
shell, which is the modern-day equivalent of DOS, inside a text-mode console
window, as opposed to running a Cygwin shell (which can be run in a text-mode
console window *or* in a GUI terminal like rxvt).  The point is about the
environment from which applications are launched, not the console used.

 Yes, it is a good idea. I already have a set of batch files that fix the 
 PATH an other environments variables depending with what compiler i am
 working with. setcygwin.cmd for Cywin setmingw.cmd for MingW etc...
 
 This works quite well. Each new instance of the cmd.exe can have its own 
 set of variables.

  Writing yourself a few simple scripts/batch files like this is definitely
the way to make your life easier when trying to manage these
potentially-conflicting environments.

 somewhere and you don't see it. Maybe launching subprocesses causes all
 the buffers to be flushed through in the first case.
 
 I dont know and i dont know how to test that.

  Sorry, I was just thinking out loud, that wasn't meant to be useful as an
idea for testing!

 Conclusion: this is related to the way cmd.exe process and run the target
 of the shortcut. Shortcuts are normally ran from the explorer. I guess
 bash is a little more intelligent.

 That would be perfect, because with all the good settings, the change would
 be completly transparent. If cmd.exe was not the culprit. As illustrated.

  Is that how it's happening for you?
 
 Yes!. Exactly.
 I tried many variants to launch the shortcut. Each time, the results
 are the same.
 
 Thanks for taking the time to verify this.  If i find a solution
 i will report it here.

  That would be good, thank you.  It may be that there's nothing you can do.
Then again, it may be a sign that we're missing a flush somewhere in the
Cygwin DLL.  Are you trying with 1.5 or 1.7?  If you haven't tried 1.7 yet,
you can give it a go; follow the instructions in the most recent announcement
posting, and it's simple to try out a parallel installation that doesn't mess
with your current 1.5 setup.

  In the meantime, I suggest that you don't worry too much about it.  The
compiler works, every command you enter is executed, and the only thing wrong
is that the prompt goes missing somehow.  That hopefully won't break any of
your scripts or batch files.

cheers,
  DaveK


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



side effects after installing gcc-3.4.4.999

2009-03-01 Thread Akakima

After updating gcc in my cygwin installation, i discovered
that i cannot run gcc.exe from the native winxp console (cmd.exe).

gcc.exe has been replaced by gcc-3.exe.

Of course, this works fine under bash and ash, but it does not work 
anymore

under cmd.exe.

since i prefer to work under cmd.exe. i tried to fix this problem by:
adding .LNK to PATHEXT
and adding /usr/bin/alternatives to the PATH

and now if i type gcc, cmd finds gcc-3.exe and launch it.
But, this is not perfect. gcc (or someone else) wait until i press
enter to continue.

Anybody knows a better solution ?

I would prefer not to be forced to use bash.




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



Re: side effects after installing gcc-3.4.4.999

2009-03-01 Thread Greg Chicares
On 2009-03-02 05:34Z, Akakima wrote:
 After updating gcc in my cygwin installation, i discovered
 that i cannot run gcc.exe from the native winxp console (cmd.exe).
 
 gcc.exe has been replaced by gcc-3.exe.

If gcc version 3.x is what you want, why not just downgrade
from 3.4.4-999 to gcc-3.4.4-3? AIUI, the only difference
between the two is something you don't want:

http://cygwin.com/ml/cygwin/2009-02/msg00713.html
|   This release is a straight rebuild from source of the existing gcc-3.4.4-3,
| with no source modifications, but with packaging script changes to enable
| 'alternatives' switching between the use of GCC-3 and GCC-4.

Alternatively, you might prefer to use mingw.org's native gcc.

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



Re: side effects after installing gcc-3.4.4.999

2009-03-01 Thread Dave Korn
Akakima wrote:
 After updating gcc in my cygwin installation, i discovered
 that i cannot run gcc.exe from the native winxp console (cmd.exe).
 
 gcc.exe has been replaced by gcc-3.exe.

  And by a link.

 Of course, this works fine under bash and ash, but it does not work anymore
 under cmd.exe.

  Nope, of course not.  Use gcc-3.exe instead.

 since i prefer to work under cmd.exe. i tried to fix this problem by:
 adding .LNK to PATHEXT
 and adding /usr/bin/alternatives to the PATH

  You mean /etc/alternatives, I think.

 and now if i type gcc, cmd finds gcc-3.exe and launch it.

  That didn't work when I tried it:

C:\cygwin\etc\alternativesgcc
Access is denied.

C:\cygwin\etc\alternativesgcc.lnk
Access is denied.

C:\cygwin\etc\alternatives

 But, this is not perfect. gcc (or someone else) wait until i press
 enter to continue.

  GCC doesn't do that sort of thing.  What actual command do you type, and
what symptom do you get?  What program is running if you check with ps -a in
another window while this possible wait-to-press-enter is occurring?  Does GCC
go ahead and generate a compiled output after you press enter?

  The problem arises because you insist on two things: 1) you want to use
cmd.exe, 2) you want to start a program without typing the name it's actually
called.  Since cmd.exe doesn't understand links, your two requirements are
mutually contradictory.  The best solution is to downgrade, or to copy
gcc-3.exe to gcc.exe and get rid of the link stuff altogether.

cheers,
  DaveK


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