bad interaction with /usr/bin/make

Corinna Vinschen
Sat Feb 28 14:19:00 GMT 2015

On Feb 28 01:06, Denis Excoffier wrote:
> Hi,
> This is a standard makefile, except that hello.c
> is taken from a special directory:
> % cat Makefile
> all : hello
> hello : hello.o
> 	gcc -o $@ $+
> hello.o : /usr/mydata/hello.c
> 	gcc -o $@ -c $<
> clean :
> 	-rm -f hello hello.exe hello.o
> %
> The file hello.c contains exactly what you expect
> that it should contain and the ./hello runs OK.
> Now, suppose that you mount (through /etc/fstab) some
> drive under some subfolder of /usr/mydata, eg
> R:/svnRepository /usr/mydata/svn ntfs cygexec,noacl
> You can try the Makefile, it still works (as expected).
> Now you come home and the R: drive does not exist
> any more. Believe it or not (but you can try), the
> Makefile does not work any more and produces:
> make: *** INTERNAL: readdir: No such file or directory.  Stop.

I guess make doesn't expect ENOENT from readdir as it's not a
documented error code.  This is probably an artefact from the mount
point handling.  It kind of injects the mount point into the parent
directory and then, since the drive is unavailable, an OS call returns
STATUS_OBJECT_NAME_NOT_FOUND, which is propagated up the chain.

I add that to my TODO list for after 1.7.35.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Cygwin mailing list