delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/10/03/12:55:41

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <4703C960.EF841594@dessent.net>
Date: Wed, 03 Oct 2007 09:54:56 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Problems compiling grep and friends
References: <FAE23AA888D14A218DAC781334E6BDC9 AT kingmark>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019