Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Thu, 12 Oct 2000 10:27:45 -0400 From: Jason Tishler To: Cygwin Cc: Steve Kelem , John Green , Andre Oliveira da Costa , "Sagar R. Shah" Subject: Cygwin RCS Build Instructions (or sometimes ash does not like a.out) Message-ID: <20001012102745.A1021@OLMY> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="c+TKG7gJB2D+DdPt" Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: Dot Hill Systems Corp. --c+TKG7gJB2D+DdPt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I believe that I finally got to the bottom of why there are problems building RCS on Cygwin. It boils down to an idiosyncrasy of ash which can be demonstrating by the following: $ cd /tmp $ cp /usr/bin/id.exe a.out $ sh -c ./a.out ./a.out: not found Hence, ash will not execute programs when their full path is specified and they don't end in ".exe". The above behavior was causing RCS's src/conf.sh to fail because it builds a.out files and attempts to run them via sh (i.e., ash) as "./a.out". Hence, conf.sh would get confused and finally abort. My guess is that Andre did not experience the above because his /bin/sh was really bash and not ash. The following is my Cygwin RCS build procedure: 1. tar -xzvf rcs-5.7.tar.gz 2. cd rcs-5.7 3. patch -p1 &3 "$0: configuring has_readlink, readlink_isreg_errno $dots" cat >a.c <&3 "$0: configuring has_readlink, readlink_isreg_errno, bad_readlink_enoent $dots" cat >a.c <&3 $h, $readlink_isreg_errno cat <&3 $h, $readlink_isreg_errno, $bh cat <&3 $has_map_fd, $has_mmap, $has_madvise, $mmap_signal --- 1071,1077 ---- # when someone unexpectedly truncates a file # while RCS has it mmapped. rm -f a.e && cp a.c a.e && ! mmap_signal=`$aout a.e &3 $has_map_fd, $has_mmap, $has_madvise, $mmap_signal *************** *** 1103,1108 **** --- 1121,1151 ---- echo "#define bad_a_rename $a /* Does rename(A,B) fail if A is unwritable? */" echo "#define bad_b_rename $b /* Does rename(A,B) fail if B is unwritable? */" echo "#define bad_NFS_rename 0 /* Can rename(A,B) falsely report success? */" + + $ech >&3 "$0: configuring bad_nw_utime $dots" + cat >a.c <&2 + then + rm -f a.a && + echo a >a.a && chmod -w a.a || exit + if $aout + then a=0 + else a=1 + fi + rm -f a.a || exit + else a=0 + fi + echo >&3 $a + echo "#define bad_nw_utime $a /* Does utime() work on unwriteable files? */" $ech >&3 "$0: configuring void, VOID $dots" cat >a.c <string, &st) == 0 ) ! /* File exists, but no symlink */ ! return 1; ! } ! # else ! return 1; ! # endif case ENOENT: return 0; default: return -1; } *************** *** 1595,1601 **** } # endif ! # if bad_a_rename /* * There's a short window of inconsistency * during which the lock file is writable. --- 1610,1617 ---- } # endif ! if ( bad_a_rename || (bad_nw_utime && mtime!=-1) ) ! { /* * There's a short window of inconsistency * during which the lock file is writable. *************** *** 1603,1609 **** mode_while_renaming = mode|S_IWUSR; if (mode != mode_while_renaming) set_mode = 1; ! # endif # if has_fchmod if (0