以下のような tweet を見かけた。
多分、
- GitHub / takashi-chikayama / SamurAI-Dig-Here-2020-21
なんだけど、
$ cd /tmp
$ git clone https://github.com/takashi-chikayama/SamurAI-Dig-Here-2020-21
Cloning into 'SamurAI-Dig-Here-2020-21'...
remote: Enumerating objects: 419, done.
remote: Counting objects: 100% (419/419), done.
remote: Compressing objects: 100% (380/380), done.
remote: Total 419 (delta 68), reused 389 (delta 38), pack-reused 0
Receiving objects: 100% (419/419), 11.74 MiB | 1.52 MiB/s, done.
Resolving deltas: 100% (68/68), done.
$ cd SamurAI-Dig-Here-2020-21/
$ git log -1
commit 3825c3dd0e2a31355d0ddafe320a9acf2316ec20 (HEAD -> master, origin/master, origin/HEAD)
Author: Takashi <takashi.cikayama@gmail.com>
Date: Fri Nov 27 16:16:41 2020 +0900
Fixed the problem of exportation in dighere.html page
$ make
cd manager; make all
make[1]: ディレクトリ '/tmp/SamurAI-Dig-Here-2020-21/manager' に入ります
c++ -c -g -Wall -std=c++14 main.cc -o main.o
c++ -MM -g -Wall -std=c++14 main.cc > main.d
c++ -c -g -Wall -std=c++14 field.cc -o field.o
c++ -MM -g -Wall -std=c++14 field.cc > field.d
c++ -c -g -Wall -std=c++14 gamelog.cc -o gamelog.o
c++ -MM -g -Wall -std=c++14 gamelog.cc > gamelog.d
c++ -c -g -Wall -std=c++14 playgame.cc -o playgame.o
playgame.cc: 関数 ‘void killPlayerProcess(int)’ 内:
playgame.cc:30:3: エラー: ‘kill’ was not declared in this scope
30 | kill(playerIds[p], SIGKILL);
| ^~~~
playgame.cc: 関数 ‘std::vector<StepLog> playGame(const Configuration&, char**, char*, int)’ 内:
playgame.cc:136:39: エラー: ‘fdopen’ was not declared in this scope; did you mean ‘fopen’?
136 | close(pipeOut[0]); toPlayers[p] = fdopen(pipeOut[1], "w");
| ^~~~~~
| fopen
playgame.cc:138:5: エラー: ‘kill’ was not declared in this scope
138 | kill(playerIds[p], SIGSTOP);
| ^~~~
playgame.cc:181:7: エラー: ‘kill’ was not declared in this scope
181 | kill(playerIds[p], SIGCONT);
| ^~~~
playgame.cc:194:2: エラー: ‘usleep’ was not declared in this scope; did you mean ‘sleep’?
194 | usleep(1000*checkInterval);
| ^~~~~~
| sleep
make[1]: *** [Makefile:14: playgame.o] エラー 1
make[1]: ディレクトリ '/tmp/SamurAI-Dig-Here-2020-21/manager' から出ます
make: *** [Makefile:2: all] エラー 2
みたいな感じで、スコープ内に kill() の宣言がないぞと言われて腐る。