RE: Problems compiling grep and friends
On 05 October 2007 23:16, Siegfried Heintze wrote: > Dave, > I'm not sure what to do. I see you attached a diffs file. Is there a utility > such as patch that I can use to apply those diffs? What would be the > command? There's a utility *exactly* such as patch that you can use to apply those diffs, it's patch! Place the diffs file in the grep top-level source directory, cd into that directory in a shell and run patch --dry-run -p0 < diffs.txt which will do a quick trial run. You may see some output about "matched at ... offset" or "fuzz", but that's ok, as long as there are no rejections. If it looks ok, apply the patch for real by running patch -p0 < diffs.txt Then reconfigure and re-build, and you should be ok. cheers, DaveK -- Can't think of a witty .sigline today -- 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: Problems compiling grep and friends
Dave, I'm not sure what to do. I see you attached a diffs file. Is there a utility such as patch that I can use to apply those diffs? What would be the command? Thanks, Siegfried > >On 04 October 2007 22:13, Siegfried Heintze wrote: > >> Siegfried wrote: >> OK, I tried that. See below for the results. Looks like we have the same >> problem. > > > I whipped this up against grep-2.5.1a-3. It might just apply cleanly to the >version you're working with; make sure it gets all the "$(DESTDIR)/" instances >and changes them to "$DDSLASH". It WFM: > -- 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: Problems compiling grep and friends
On 04 October 2007 22:13, Siegfried Heintze wrote: > Siegfried wrote: > OK, I tried that. See below for the results. Looks like we have the same > problem. > 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 > make[1]: *** [install-data-yes] Error 1 > make[1]: Leaving directory `/usr/src/grep-2.5.1a-4/po' > make: *** [install-recursive] Error 1 I whipped this up against grep-2.5.1a-3. It might just apply cleanly to the version you're working with; make sure it gets all the "$(DESTDIR)/" instances and changes them to "$DDSLASH". It WFM: '" '"'---' /usr/src/grep-2.5.1a-3 $ cd po @___. . ( /"\ ||--||(___) '" '"'---' /usr/src/grep-2.5.1a-3/po $ make install 2>&1 | tee inst.log if test -n "" ; then \ DDSLASH="/" ; \ else \ DDSLASH="" ; \ fi if test -r ".././mkinstalldirs"; then \ .././mkinstalldirs $DDSLASH/usr/local/share; \ else \ /bin/sh ../mkinstalldirs $DDSLASH/usr/local/share; \ fi mkdir /usr/local/share/locale/cs mkdir /usr/local/share/locale/cs/LC_MESSAGES installing cs.gmo as /usr/local/share/locale/cs/LC_MESSAGES/grep.mo installing de.gmo as /usr/local/share/locale/de/LC_MESSAGES/grep.mo installing el.gmo as /usr/local/share/locale/el/LC_MESSAGES/grep.mo mkdir /usr/local/share/locale/eo mkdir /usr/local/share/locale/eo/LC_MESSAGES installing eo.gmo as /usr/local/share/locale/eo/LC_MESSAGES/grep.mo installing es.gmo as /usr/local/share/locale/es/LC_MESSAGES/grep.mo mkdir /usr/local/share/locale/et mkdir /usr/local/share/locale/et/LC_MESSAGES installing et.gmo as /usr/local/share/locale/et/LC_MESSAGES/grep.mo installing fr.gmo as /usr/local/share/locale/fr/LC_MESSAGES/grep.mo mkdir /usr/local/share/locale/gl mkdir /usr/local/share/locale/gl/LC_MESSAGES installing gl.gmo as /usr/local/share/locale/gl/LC_MESSAGES/grep.mo mkdir /usr/local/share/locale/hr mkdir /usr/local/share/locale/hr/LC_MESSAGES installing hr.gmo as /usr/local/share/locale/hr/LC_MESSAGES/grep.mo installing id.gmo as /usr/local/share/locale/id/LC_MESSAGES/grep.mo installing it.gmo as /usr/local/share/locale/it/LC_MESSAGES/grep.mo installing ja.gmo as /usr/local/share/locale/ja/LC_MESSAGES/grep.mo installing ko.gmo as /usr/local/share/locale/ko/LC_MESSAGES/grep.mo installing nl.gmo as /usr/local/share/locale/nl/LC_MESSAGES/grep.mo mkdir /usr/local/share/locale/no mkdir /usr/local/share/locale/no/LC_MESSAGES installing no.gmo as /usr/local/share/locale/no/LC_MESSAGES/grep.mo installing pl.gmo as /usr/local/share/locale/pl/LC_MESSAGES/grep.mo installing pt_BR.gmo as /usr/local/share/locale/pt_BR/LC_MESSAGES/grep.mo installing ru.gmo as /usr/local/share/locale/ru/LC_MESSAGES/grep.mo mkdir /usr/local/share/locale/sl mkdir /usr/local/share/locale/sl/LC_MESSAGES installing sl.gmo as /usr/local/share/locale/sl/LC_MESSAGES/grep.mo installing sv.gmo as /usr/local/share/locale/sv/LC_MESSAGES/grep.mo if test "grep" = "gettext"; then \ if test -r ".././mkinstalldirs"; then \ .././mkinstalldirs $DDSLASH/usr/local/share/gettext/po; \ else \ /bin/sh ../mkinstalldirs $DDSLASH/usr/local/share/gettext/po; \ fi; \ /usr/bin/install -c -m 644 ./Makefile.in.in \ $DDSLASH/usr/local/share/gettext/po/Makefile.in.in; \ else \ : ; \ fi cheers, DaveK -- Can't think of a witty .sigline today diff -pu po.orig/Makefile.in.in po/Makefile.in.in --- po.orig/Makefile.in.in 2002-03-26 14:38:46.00100 + +++ po/Makefile.in.in 2007-10-04 22:31:11.260792100 +0100 @@ -110,10 +110,15 @@ install-exec: install-data: [EMAIL PROTECTED]@ install-data-no: all install-data-yes: all + if test -n "$(DESTDIR)" ; then \ + DDSLASH="$(DESTDIR)/" ; \ + else \ + DDSLASH="" ; \ + fi if test -r "$(MKINSTALLDIRS)"; then \ - $(MKINSTALLDIRS) $(DESTDIR)/$(datadir); \ + $(MKINSTALLDIRS) $$DDSLASH$(datadir); \ else \ - $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir); \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$DDSLASH$(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ @@ -125,27 +130,27 @@ install-data-yes: all lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$$destdir/$$lang/LC_MESSAGES; \ if test -r "$(MKINSTALLDIRS)"; then \ - $(MKINSTALLDIRS) $(DESTDIR)/$$dir; \ + $(MKINSTALLDIRS) $$DDSLASH$$dir; \ else \ - $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)/$$dir; \ + $(SHELL) $(top_srcdir)/mkinstalldirs $$DDSLASH$$dir; \ fi; \ if test -r $$cat; then \ - $(INSTALL_DATA) $$cat $(DESTDIR)/$$dir/$(PACKAGE)$(INSTOBJEXT); \ - echo "installing $$cat as $(DESTDIR)/$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ + $(IN
RE: Problems compiling grep and friends
Siegfried wrote: OK, I tried that. See below for the results. Looks like we have the same problem. Thanks, Siegfried Brian wrote: 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/ cd /usr/src/grep-2.5.1a-4/ make install DESTDIR=/ Making install in intl make[1]: Entering directory `/usr/src/grep-2.5.1a-4/intl' if test "grep" = "gettext" \ && test '' = 'intl-compat.o'; then \ /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` //usr/local/lib //usr/local/include; \ /usr/bin/install -c -m 644 libintl.h //usr/local/include/libintl.h; \ @LIBTOOL@ --mode=install \ /usr/bin/install -c -m 644 libintl.a //usr/local/lib/libintl.a; \ else \ : ; \ fi if test 'no' = yes; then \ test no != no || /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` //usr/local/lib; \ temp=//usr/local/lib/t-charset.alias; \ dest=//usr/local/lib/charset.alias; \ if test -f //usr/local/lib/charset.alias; then \ orig=//usr/local/lib/charset.alias; \ sed -f ref-add.sed $orig > $temp; \ /usr/bin/install -c -m 644 $temp $dest; \ rm -f $temp; \ else \ if test no = no; then \ orig=charset.alias; \ sed -f ref-add.sed $orig > $temp; \ /usr/bin/install -c -m 644 $temp $dest; \ rm -f $temp; \ fi; \ fi; \ /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` //usr/local/share/locale; \ test -f //usr/local/share/locale/locale.alias \ && orig=//usr/local/share/locale/locale.alias \ || orig=./locale.alias; \ temp=//usr/local/share/locale/t-locale.alias; \ dest=//usr/local/share/locale/locale.alias; \ sed -f ref-add.sed $orig > $temp; \ /usr/bin/install -c -m 644 $temp $dest; \ rm -f $temp; \ else \ : ; \ fi if test "grep" = "gettext"; then \ /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` //usr/local/share/gettext/intl; \ /usr/bin/install -c -m 644 VERSION //usr/local/share/gettext/intl/VERSION; \ /usr/bin/install -c -m 644 ChangeLog.inst //usr/local/share/gettext/intl/ChangeLog; \ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 Makefile.in config.charset locale.alias ref-add.sin ref-del.sin gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h libgnuintl.h loadinfo.h bindtextdom.c dcgettext.c dgettext.c gettext.c finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y plural-exp.c localcharset.c localename.c osdep.c os2compat.c intl-compat.c"; \ for file in $dists; do \ /usr/bin/install -c -m 644 ./$file \ //usr/local/share/gettext/intl/$file; \ done; \ chmod a+x //usr/local/share/gettext/intl/config.charset; \ dists="plural.c"; \ for file in $dists; do \ if test -f $file; then dir=.; else dir=.; fi; \ /usr/bin/install -c -m 644 $dir/$file \ //usr/local/share/gettext/intl/$file; \ done; \ dists="xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c COPYING.LIB-2 gettext.h libgettext.h plural-eval.c"; \ for file in $dists; do \ rm -f //usr/local/share/gettext/intl/$file; \ done; \ else \ : ; \ fi make[1]: Leaving directory `/usr/src/grep-2.5.1a-4/intl' Making install in po 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 make[1]: *** [install-data-yes] Error 1 make[1]: Leaving directory `/usr/src/grep-2.5.1a-4/po' make: *** [install-recursive] Error 1 Compilation exited abnormally with code 2 at Thu Oct 4 15:11:53 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Document
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/
RE: Problems compiling grep and friends
Siegfried Heintze wrote on Wednesday, October 03, 2007 12:23 PM: >> On 27 September 2007 14:15, Siegfried Heintze wrote: >> > Is there a cygpath command that will show me all the files connected > with grep? What is this command? Should not I have been able to > manually find some notes on compiling this in /usr/share/doc > someplace? I could not find any notes there. How about cygcheck, not cygpath? bash-3.2$ cygcheck --help Usage: cygcheck PROGRAM [ -v ] [ -h ] cygcheck -c [ PACKAGE ] [ -d ] cygcheck -s [ -r ] [ -v ] [ -h ] cygcheck -k cygcheck -f FILE [ FILE ... ] cygcheck -l [ PACKAGE ] [ PACKAGE ... ] cygcheck -p REGEXP List system information, check installed packages, or query package database. At least one command option or a PROGRAM is required, as shown above. PROGRAM list library (DLL) dependencies of PROGRAM -c, --check-setupshow installed version of PACKAGE and verify integrity (or for all installed packages if none specified) -d, --dump-only just list packages, do not verify (with -c) -s, --sysinfoproduce diagnostic system information (implies -c -d) -r, --registry also scan registry for Cygwin settings (with -s) -k, --keycheck perform a keyboard check session (must be run from a plain console only, not from a pty/rxvt/xterm) -f, --find-package find the package that FILE belongs to -l, --list-package list contents of PACKAGE (or all packages if none given) -p, --package-query search for REGEXP in the entire cygwin.com package repository (requies internet connectivity) -v, --verboseproduce more verbose output -h, --help annotate output with explanatory comments when given with another command, otherwise print this help -V, --versionprint the version of cygcheck and exit Note: -c, -f, and -l only report on packages that are currently installed. To search all official Cygwin packages use -p instead. The -p REGEXP matches package names, descriptions, and names of files/paths within all packages. bash-3.2$ cygcheck -l grep /usr/bin/egrep /usr/bin/fgrep /usr/bin/grep.exe /usr/share/info/grep.info /usr/share/locale/cs/LC_MESSAGES/grep.mo /usr/share/locale/de/LC_MESSAGES/grep.mo /usr/share/locale/el/LC_MESSAGES/grep.mo /usr/share/locale/eo/LC_MESSAGES/grep.mo /usr/share/locale/es/LC_MESSAGES/grep.mo /usr/share/locale/et/LC_MESSAGES/grep.mo /usr/share/locale/fr/LC_MESSAGES/grep.mo /usr/share/locale/gl/LC_MESSAGES/grep.mo /usr/share/locale/hr/LC_MESSAGES/grep.mo /usr/share/locale/id/LC_MESSAGES/grep.mo /usr/share/locale/it/LC_MESSAGES/grep.mo /usr/share/locale/ja/LC_MESSAGES/grep.mo /usr/share/locale/ko/LC_MESSAGES/grep.mo /usr/share/locale/nl/LC_MESSAGES/grep.mo /usr/share/locale/no/LC_MESSAGES/grep.mo /usr/share/locale/pl/LC_MESSAGES/grep.mo /usr/share/locale/pt_BR/LC_MESSAGES/grep.mo /usr/share/locale/ru/LC_MESSAGES/grep.mo /usr/share/locale/sl/LC_MESSAGES/grep.mo /usr/share/locale/sv/LC_MESSAGES/grep.mo /usr/share/man/man1/egrep.1.gz /usr/share/man/man1/fgrep.1.gz /usr/share/man/man1/grep.1.gz bash-3.2$ -- 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: Problems compiling grep and friends
> >On 27 September 2007 14:15, Siegfried Heintze wrote: > >> I'm running xp pro and I am trying to compile grep. I downloaded the source. >> ./configure seemed to go OK but there were problems with "make". It looks >> like it cannot find the usr directory. Is there a fix for this? > > How did you configure? It looks like it's got confused over the --prefix >setting; that extra '/' then makes cygwin treat the path as a UNC network >path, so you're trying to install to a network share called 'local' on a >remote host named 'usr'! > > I've seen this sort of thing happen before when I was messing around by >setting DESTDIR during "make install". You'd better show us all your >configure and build command lines. Is there a cygpath command that will show me all the files connected with grep? What is this command? Should not I have been able to manually find some notes on compiling this in /usr/share/doc someplace? I could not find any notes there. Ok, here it is: cd c:/cygwin/usr/src/grep-2.5.1a-4/ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets ${MAKE}... yes checking build system type... i686-pc-cygwin checking host system type... i686-pc-cygwin checking for gawk... (cached) gawk checking for gcc... gcc checking for C compiler default output... a.exe checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... .exe checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for a BSD-compatible install... /usr/bin/install -c checking for ranlib... ranlib checking for getconf... no checking for CFLAGS value to request large file support... no checking for LDFLAGS value to request large file support... no checking for LIBS value to request large file support... no checking for _FILE_OFFSET_BITS... no checking for _LARGEFILE_SOURCE... no checking for _LARGE_FILES... no checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for function prototypes... yes checking for ANSI C header files... yes checking for string.h... (cached) yes checking for size_t... yes checking for ssize_t... yes checking for gcc option to accept ANSI C... none needed checking for an ANSI C-conforming const... yes checking for inttypes.h... yes checking for unsigned long long... yes checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking for stdlib.h... (cached) yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking for memory.h... (cached) yes checking for unistd.h... (cached) yes checking libintl.h usability... yes checking libintl.h presence... yes checking for libintl.h... yes checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking whether stat file-mode macros are broken... no checking for stdlib.h... (cached) yes checking for mbstate_t... yes checking for working alloca.h... yes checking for alloca... yes checking whether closedir returns void... no checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for getpagesize... yes checking for working mmap... no checking for btowc... yes checking for isascii... yes checking for memmove... yes checking for setmode... yes checking for strerror... yes checking for wctype... yes checking for mbrtowc... yes checking for memchr... yes checking for stpcpy... no checking for strtoul... yes checking for atexit... yes checking for fnmatch... yes checking for stdlib.h... (cached) yes checking whether defines strtoumax as a macro... no checking for strtoumax... yes checking whether strtoul is declared... yes checking whether strtoull is declared... yes checking for strerror in -lcposix... no checking for inline... inline checking for off_t... yes checking whether we are using the GNU C Library 2.1 or newer... no checking argz.h usability... yes checking argz.h presence... yes checking for argz.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking nl_types.h usability... no
RE: Problems compiling grep and friends
On 27 September 2007 14:15, Siegfried Heintze wrote: > Im running xp pro and I am trying to compile grep. I downloaded the source. > ./configure seemed to go OK but there were problems with make. It looks > like it cannot find the usr directory. Is there a fix for this? How did you configure? It looks like it's got confused over the --prefix setting; that extra '/' then makes cygwin treat the path as a UNC network path, so you're trying to install to a network share called 'local' on a remote host named 'usr'! I've seen this sort of thing happen before when I was messing around by setting DESTDIR during "make install". You'd better show us all your configure and build command lines. > 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 > make[1]: *** [install-data-yes] Error 1 > make[1]: Leaving directory `/cygdrive/c/Documents and > Settings/sheintze/Desktop/ftp%3a%2f%2fmirrors.kernel.org%2fsourceware%2fcygwin /release/grep/grep-2.5.1a-4/po' > make: *** [install-recursive] Error 1 I really wouldn't build it in your package dir though, that's a bit cluttery. The optimal method is to use setup.exe to download and unpack the source for grep into /usr/src, and build it there (using the provided build script if there should happen to be one). cheers, DaveK -- Can't think of a witty .sigline today -- 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/