[Bug bootstrap/30341] Makefile using mv instead of ln not working on WinXP Cygwin Bash

2018-10-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341

Eric Gallager  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Eric Gallager  ---
(In reply to Eric Gallager from comment #5)
> (In reply to Rob from comment #4)
> > I have found that with very low system load that it _can_ occur using an
> > XTerm window afterall - infrequently.
> > 
> > If your compiling for Cygwin it is best to make the mod to the Makefile.
> 
> ...so... is that still the case with newer versions of GCC?

No reply, guessing things are ok now. Feel free to reopen if necessary.

[Bug bootstrap/30341] Makefile using mv instead of ln not working on WinXP Cygwin Bash

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-07-05
 CC||egallager at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #5 from Eric Gallager  ---
(In reply to Rob from comment #4)
> I have found that with very low system load that it _can_ occur using an
> XTerm window afterall - infrequently.
> 
> If your compiling for Cygwin it is best to make the mod to the Makefile.

...so... is that still the case with newer versions of GCC?

[Bug bootstrap/30341] Makefile using mv instead of ln not working on WinXP Cygwin Bash

2007-05-23 Thread rob1weld at aol dot com


--- Comment #4 from rob1weld at aol dot com  2007-05-24 06:05 ---
I have found that with very low system load that it _can_ occur using an XTerm
window afterall - infrequently.

If your compiling for Cygwin it is best to make the mod to the Makefile.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341



[Bug bootstrap/30341] Makefile using mv instead of ln not working on WinXP Cygwin Bash

2007-05-09 Thread rob1weld at aol dot com


--- Comment #3 from rob1weld at aol dot com  2007-05-10 06:43 ---
I tried an un-modified Makefile on WinXP, running X11 under Cygwin, with Xterm
running bash, compiling with cygwin (whew!) - the problem does NOT occur there.

This problem only seems to occur under a Cygwin MSDOS shell running bash (the
usual / normal way Cygwin provides a running environment for bash).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341



[Bug bootstrap/30341] Makefile using mv instead of ln not working on WinXP Cygwin Bash

2007-05-03 Thread rob1weld at aol dot com


--- Comment #2 from rob1weld at aol dot com  2007-05-03 09:49 ---
Reviewing my old bug reports I noticed a reply may be needed here...


I _do_ build in a directory that is different from the source.

It is my guess that part of the problem is that Cygwin is attempting to make
unix-LIKE commands operate on the WinXP platform - the other part of the
trouble is that WinXP creates a ghost file in 8.3 format that lives for a
moment to facilitate programs that might need 8.3 names. IE: if I access a file
called long_name_file.txt the ghost called long_n~1.txt is also created.

There is an explanation on msn developer (that I would need to google to
re-visit) that explains this better than the above.

In short, the links don't work if you create them and then re-name (or mv)
them immediately. It confuses the OS (no jokes please :) ).


Here is the resulting dorectory structure:

What you (the creators of the source code) might have expected is:

gcc
prev-gcc
etc.


What you end up with is:
gcc


If you look in the gcc directory you then see ugly things like gcc (again)
and prev-gcc. The make process will continue like this and eventually fail.

If you stop it and restart it then you can (sometimes) get things like
gcc/gcc/prev-gcc show up.

If you have lots of other load running at the same time then you might not
create/rename quick enough and the ghost disappears (thus the mv commands
works as expected. You can't expect to get through a whole make and not get
nailed at least once (which is enough to break it).


Searching my HD for a Makefile that uses sleep between mv commands (I
know I had one at one time), I found the ACL2 Rules for Writing Makefiles
in their port to MinGW.
file://C:\ACL2-3.1\mingw\info\make.info\Utilities-in-Makefiles.html (you
probably don't have it and it is quite short, so I will quote it):

---

Node:Utilities in Makefiles, Next:Command Variables, Previous:Makefile Basics,
Up:Makefile Conventions 





Utilities in Makefiles
Write the Makefile commands (and any shell scripts, such as configure) to run
in sh, not in csh. Don't use any special features of ksh or bash. 

The configure script and the Makefile rules for building and installation
should not use any utilities directly except these: 

 cat cmp cp diff echo egrep expr false grep install-info
 ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true

The compression program gzip can be used in the dist rule. 

Stick to the generally supported options for these programs. For example, don't
use mkdir -p, convenient as it may be, because most systems don't support it. 

It is a good idea to avoid creating symbolic links in makefiles, since a few
systems don't support them. 

The Makefile rules for building and installation can also use compilers and
related programs, but should do so via make variables so that the user can
substitute alternatives. Here are some of the programs we mean: 

 ar bison cc flex install ld ldconfig lex
 make makeinfo ranlib texi2dvi yacc

Use the following make variables to run those programs: 

 $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX)
 $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)

When you use ranlib or ldconfig, you should make sure nothing bad happens if
the system does not have the program in question. Arrange to ignore an error
from that command, and print a message before the command to tell the user that
failure of this command does not mean a problem. (The Autoconf AC_PROG_RANLIB
macro can help with this.) 

If you use symbolic links, you should implement a fallback for systems that
don't have symbolic links. 

Additional utilities that can be used via Make variables are: 

 chgrp chmod chown mknod

It is ok to use other utilities in Makefile portions (or scripts) intended only
for particular systems where you know those utilities exist. 

---

Usually GCC makefiles _do_ follow those rules. Not everything that works for
Unix bash works for Cygwin's bash (I do have the most current version).

This only occurs on Cygwin. The makefile that ./configure creates works fine on
the i686-pc-linux-gnu target, with it's bash shell. Strangely the MinGW bash
also does NOT have any trouble - only the _current_ Cygwin bash.

My point is that the method used in the 4.1.1 Makefile (generated by
./configure) works on all these platforms and the NEW 4.2.0 Makefile method
breaks on Cygwin. 

This bug report is an explanation of the problem and how either it can be fixed
by the maintainers _OR_ people (who use Cygwin) can search the bug reports and
make their own repairs; in the event that the maintainers do not desire to
alter the way the makefile is created to accommadate this peculiar problem.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341



[Bug bootstrap/30341] Makefile using mv instead of ln not working on WinXP Cygwin Bash

2007-01-04 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-01-05 05:16 ---
building in the source directory is not well supported.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341