This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems compiling grep and friends


Siegfried Heintze wrote:

> make[1]: Entering directory `/usr/src/grep-2.5.1a-4/po'
> if test -r ".././mkinstalldirs"; then \
>           .././mkinstalldirs //usr/local/share; \
>         else \
>           /bin/sh ../mkinstalldirs //usr/local/share; \
>         fi
> mkdir //usr
> mkdir: cannot create directory `//usr': No such host or network path
> mkdir //usr/local
> mkdir: cannot create directory `//usr/local': No such host or network path
> mkdir //usr/local/share
> mkdir: cannot create directory `//usr/local/share': No such host or network
> path

This is arguably a bug in the Makefile:

        if test -r "$(MKINSTALLDIRS)"; then \
          $(MKINSTALLDIRS) $(DESTDIR)/$(datadir); \
        else \
          $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir); \
        fi

Here the author seemed to be relying on the fact that on many *nix
systems, //foo/bar is equivalent to /foo/bar in the case where DESTDIR
is not set.  However this is not true on Cygwin as the double-slash
signals a UNC path, and the POSIX standards allow for this.  So as a
workaround, try "make install DESTDIR=/" which would result in
"///foo/bar" which is the POSIX-sanctioned way of dealing with
filesystems that reserve // for network paths.  Or, you could actually
use DESTDIR in the way it's designed (which is probably why this was
never noticed when e.g. creating the grep packages.)

Also, knock this off:

> cd c:/cygwin/usr/src/grep-2.5.1a-4/

Stop using Win32 paths.  They work only by coincidence, not by design. 
"cd /usr/src/grep-2.5.1a-4" is what you should use.

Brian

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]