At Thu, 13 Dec 2012 19:03:01 +0900,
Koh-ichi Oniuda (鬼生田浩一) wrote:
> /usr/src/bin/expr/expr.y: In function 'main':
> /usr/src/bin/expr/expr.y:291: warning: implicit declaration of function 
> 'yyparse'
> /usr/src/bin/expr/expr.y:291: warning: nested extern declaration of 'yyparse'
> expr.c: At top level:
> expr.c:813: warning: no previous prototype for 'yyparse'

当方で9.1の buildworldが完了した /usr/obj/usr/src/bin/expr を無くして
/usr/src/bin/expr での操作です。

# ls -l
total 28
-rw-r--r--  1 root  wheel    137 12月 11 20:48 Makefile
-rw-r--r--  1 root  wheel   9079 12月 11 20:48 expr.1
-rw-r--r--  1 root  wheel  10743 12月 11 20:48 expr.y

# make
Warning: Object directory not changed from original /usr/src/bin/expr
yacc  -o expr.c expr.y
cc -O2 -pipe -march=nocona -std=gnu99 -fstack-protector -Wsystem-headers 
-Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings 
-Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline 
-Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c 
expr.c
cc -O2 -pipe -march=nocona -std=gnu99 -fstack-protector -Wsystem-headers 
-Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings 
-Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline 
-Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign  -o 
expr expr.o 
gzip -cn expr.1 > expr.1.gz

# ls -l
total 104
-rw-r--r--  1 root  wheel    137 12月 11 20:48 Makefile
-rwxr-xr-x  1 root  wheel  20390 12月 13 22:32 expr
-rw-r--r--  1 root  wheel   9079 12月 11 20:48 expr.1
-rw-r--r--  1 root  wheel   3781 12月 13 22:32 expr.1.gz
-rw-r--r--  1 root  wheel  27616 12月 13 22:32 expr.c
-rw-r--r--  1 root  wheel  20896 12月 13 22:32 expr.o
-rw-r--r--  1 root  wheel  10743 12月 11 20:48 expr.y

となります。
/usr/obj/usr/src/bin/expr で作られるのが以下ですが、それがここで作成さ
れています。

# ls -l
total 80
-rw-r--r--  1 root  wheel   1962 12月 11 21:53 .depend
-rwxr-xr-x  1 root  wheel  20390 12月 11 21:56 expr
-rw-r--r--  1 root  wheel   3781 12月 11 21:56 expr.1.gz
-rw-r--r--  1 root  wheel  27963 12月 11 21:53 expr.c
-rw-r--r--  1 root  wheel  20896 12月 11 21:56 expr.o

単体テストの参考にもならないかも知れませんが...

ただ、言われている事ですが「buildworldが原因不明の理由で失敗する場合は
/usr/objを消去してみましょう。」そうです。
# cd /usr/obj
# rm -rf *
# chflags -R noschg *
# rm -rf *

もしくは当方も今回行いましたが、/usr/srcを新しくしてから svnで
checkoutしました。(これまでは csupを使っていました。)

又、省略せずに手続きを記しても、いいかも知れません。
-- 
                        / Name : Dobashi Mitsuyoshi  /
                       / Email : md...@luna.wak2.jp /

メールによる返信