Subject: toolchain/18863: build.sh fails on freebsd with "rm: grep: is a directory"
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jcline@globespanvirata.com>
List: netbsd-bugs
Date: 10/30/2002 09:29:21
>Number:         18863
>Category:       toolchain
>Synopsis:       build.sh fails on freebsd with "rm: grep: is a directory"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 30 09:30:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     jcline
>Release:        cvs current
>Organization:
>Environment:
I'm compiling netbsd (i386) on freebsd (i386).

FreeBSD mysite.com 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #0: Wed Aug 14 21:23:26 GMT 2002     murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC  i386

>Description:
I did a checkout on src via anoncvs on 10/28/2002 and this problem occured.  I updated today 10/29 and same problem.

This is the first time I've ever tried to compile netbsd (that's kind of a disclaimer).  And I'm not even compiling netbsd on netbsd.  The capture below illustrates the problem.  I figure this is a bug even if I haven't set the env correctly since build.sh should at least complain.
I have not modified any files in the src directory (yet).

--- cut & paste --

bash-2.05a$ ./build.sh 
===> Bootstrapping nbmake
checking for sh... /bin/sh
checking for gcc... cc

{{ snip..   }}

cc  -O -D_PATH_BSHELL="/bin/sh" -D_PATH_DEFSHELLDIR="/bin" -DHAVE_SETENV=1 -DHAVE_ST
RDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -DMAKE_BOOTSTRAP -I/u
sr/home/jcline/NetBSD-source/src/tools/make/../../usr.bin/make -c /usr/home/jcline/N
etBSD-source/src/tools/make/../../usr.bin/make/lst.lib/lstSucc.c
cc  -O -o nbmake *.o  
===> DESTDIR path: ./output
===> TOOLDIR path: /usr/home/jcline/NetBSD-source/src/tools/obj/tools.FreeBSD-4.6.2-
RELEASE-i386
Build started at: Wed Oct 30 09:03:43 PST 2002
cleandir ===> tools

{{ snip ...  }}

cleandir ===> gnu/usr.bin/grep
rm -f grep.o dfa.o kwset.o obstack.o savedir.o getopt.o getopt1.o search.o stpcpy.o regex.o grepmat.o  grep.ln dfa.ln kwset.ln obstack.ln savedir.ln getopt.ln getopt1.ln search.ln stpcpy.ln regex.ln grepmat.ln
rm -f grep.1 grep.info grep.cat1  
rm -f a.out [Ee]rrs mklog core *.core .gdbinit grep
rm: grep: is a directory
*** Error code 1

Stop.
nbmake: stopped in /usr/home/jcline/NetBSD-source/src/gnu/usr.bin/grep
*** Error code 1

{{ ... etc ... }}







>How-To-Repeat:


Here is my freebsd bash environment... 

---  cut & paste ---
BASH=/usr/local/bin/bash
BASH_VERSINFO=([0]="2" [1]="05a" [2]="0" [3]="1" [4]="release" [5]="i386-portbld-freebsd4.6")
BASH_VERSION='2.05a.0(1)-release'
BLOCKSIZE=K
COLUMNS=84
CVSROOT=:pserver:anoncvs@anoncvs.netbsd.org:/cvsroot
DESTDIR=./output
DIRSTACK=()
DISPLAY=:1.0
EDITOR=gvim
ENV=/home/jcline/.shrc
EUID=1001
FTP_PASSIVE_MODE=YES
GROUPS=()
HISTFILE=/home/jcline/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/jcline
HOSTDISPLAY=:1.0
HOSTNAME=xxx
HOSTTYPE=i386
IFS=$' \t\n'
LINES=26
LOGNAME=jcline
MACHINE=i386
MACHTYPE=i386-portbld-freebsd4.6
MAIL=/var/mail/jcline
MAILCHECK=60
OLDPWD=/home/jcline/NetBSD-source
OPTERR=1
OPTIND=1
OSTYPE=freebsd4.6
PAGER=more
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/home/jcline/bin
PIPESTATUS=([0]="1")
PPID=30192
PS1='\s-\v\$ '
PS2='> '
PS4='+ '
PWD=/home/jcline/NetBSD-source/src
SHELL=/usr/local/bin/bash
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs
SHLVL=2
TERM=xterm
TERMCAP='xterm|vs100|xterm terminal emulator (X window system):li#24:kh=\EOH:@7=\EOF:kD=^?:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:km:is=\E>\E[?1;3;4;5l\E[?7;8h\E[1;65r\E[65;1H:rs=\E>\E[?1;3;4;5l\E[?7;8h:kI=\E[2~:kN=\E[6~:kP=\E[5~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:k5=\E[15~:ve=\E[?25h:vi=\E[?25l:k0@:F1=\E[23~:F2=\E[24~:ic=\E[@:IC=\E[%d@:ec=\E[%dX:al=\E[L:dl=\E[M:dc=\E[P:AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:NP:do=\E[B:cl=\E[H\E[J:sf=\ED:as=\E(0:ae=\E(B:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:nw=\EE:ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:sr=\EM:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:UP=\E[%dA:DO=\E[%dB:RI=\E[%dC:LE=\E[%dD:ct=\E[3g:st=\EH:co#80:le=^H:bs:am:if=/usr/share/tabset/vt100:ho=\E[H:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||:ks=\E[?1h\E=:ke=\E[?1l\E>:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:@8=\EOM:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:pt:xn:ta=^I:ms:bl=^G:cr=^M:eo:it#8:RA=\E[?7l:SA=\E[?7h:kb=\010:'
UID=1001
USER=jcline
VNCDESKTOP=X
WINDOWID=8388622
_=./build.sh

-----

Also FYI,

bash-2.05a$ which make
/usr/bin/make



>Fix:
Fix the clean target?


>Release-Note:
>Audit-Trail:
>Unformatted: