読者です 読者をやめる 読者になる 読者になる

Fail-Safe C

Macでビルドできないかと思ったんだけど、ちょっとわからない。fsccのビルドくらいできないかと思ったんだけど。fsccでビルドしたバイナリがどうなるかはともかくとして。

% make                                                                                                   [~/FailSafeC-1.0.1.1735/template]
mkdir -p ./result/parser ./result/include ./result/include/arpa ./result/include/libfsc ./result/include/net ./result/include/netinet ./result/include/sys ./result/runtime/wrapper
../tools/embedded-c/ec fsc_config.ml.ec >result/parser/fsc_config.ml
(echo '/* Generated file -- do not edit. */'; cat include/_stddef.h) >result/include/_stddef.h
(echo '/* Generated file -- do not edit. */'; cat include/_private_storage.h) >result/include/_private_storage.h
(echo '/* Generated file -- do not edit. */'; cat include/alloca.h) >result/include/alloca.h
(echo '/* Generated file -- do not edit. */'; cat include/assert.h) >result/include/assert.h
(echo '/* Generated file -- do not edit. */'; cat include/setjmp.h) >result/include/setjmp.h
(echo '/* Generated file -- do not edit. */'; cat include/ctype.h) >result/include/ctype.h
(echo '/* Generated file -- do not edit. */'; cat include/dirent.h) >result/include/dirent.h
(echo '/* Generated file -- do not edit. */'; ../tools/embedded-c/ec include/endian.h.ec) >result/include/endian.h
cc1: note: obsolete option -I- used, please use -iquote instead
include/endian.h.ec:2:20: error: endian.h: No such file or directory
include/endian.h.ec: In function ‘main’:
include/endian.h.ec:10: error: ‘__LITTLE_ENDIAN’ undeclared (first use in this function)
include/endian.h.ec:10: error: (Each undeclared identifier is reported only once
include/endian.h.ec:10: error: for each function it appears in.)
include/endian.h.ec:11: error: ‘__BIG_ENDIAN’ undeclared (first use in this function)
include/endian.h.ec:13: error: ‘__BYTE_ORDER’ undeclared (first use in this function)
Script (0) does not compile.
make: *** [result/include/endian.h] Error 1

こんな感じ。

include/endian.h.ecからresult/include/endian.hがmakeできなくて、endian.hがincludeできないとか言っててわけわからんように見えるんだけど、これはecの中で呼んでるgccが言ってるやつ。locateしてみると/usr/include/matchineとかにあるので、

% ../tools/embedded-c/ec -l ec.log -I/usr/include/i386 include/endian.h.ec  

とかやってみたけど、ぜんぜんだめだった。

% head ec.log
==== building script 0 (starting at line 1) to /var/folders/dH/dHiCBNFzGqu0G3HMeEURJE+++TI/-Tmp-/Kphj49CSs3/ec_work_0.c
---- script 0 generation finished.
---- compiling /var/folders/dH/dHiCBNFzGqu0G3HMeEURJE+++TI/-Tmp-/Kphj49CSs3/ec_work_0.exe
+ gcc -Iinclude -I- -I/usr/include/i386   -o '/var/folders/dH/dHiCBNFzGqu0G3HMeEURJE+++TI/-Tmp-/Kphj49CSs3/ec_work_0.exe' '/var/folders/dH/dHiCBNFzGqu0G3HMeEURJE+++TI/-Tmp-/Kphj49CSs3/ec_work_0.c'
cc1: note: obsolete option -I- used, please use -iquote instead
In file included from /var/folders/dH/dHiCBNFzGqu0G3HMeEURJE+++TI/-Tmp-/Kphj49CSs3/ec_work_0.c:1:
/usr/include/stdio.h:75: error: syntax error before ‘off_t’
/usr/include/stdio.h:87: error: syntax error before ‘fpos_t’
/usr/include/stdio.h:145: error: syntax error before ‘fpos_t’

みたいな感じ。

諦めて、VMWareをインストールします。明日はバッテリーもつのかなぁ。