接続数

COUNTER287501FROM 2012/1/12

TOPPERS diary最小セットカーネル(smallest setprofile kernel)

TOPPERS/SSP日誌 >> Article details

2015/03/16

Adlint のMacintoshへの導入

Tweet ThisSend to Facebook | by kaizen
Adlintを導入

前提。Homebrewを利用している。

1 Macintosh OS/X 環境へのど導入手順

Ruby は導入済み。ただし、版が古い可能性がある。
>brew update
>brew install ruby
==> Downloading https://homebrew.bintray.com/bottles/libyaml-0.1.6_1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libyaml-0.1.6_1.yosemite.bottle.tar.gz
  /usr/local/Cellar/libyaml/0.1.6_1: 7 files, 352K
==> Installing ruby
==> Downloading https://homebrew.bintray.com/bottles/ruby-2.2.1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ruby-2.2.1.yosemite.bottle.tar.gz
 /usr/local/Cellar/ruby/2.2.1: 1080 files,  21M

下記のコマンドにより AdLint の最新バージョンをダウンロードし導入します。

$ gem install adlint
または、
$ sudo gem install adlint
HTTP プロキシを使用する場合は、gem コマンドに --http-proxy http://ユーザ:パスワード@プロキシホスト:ポート番号 を指定します。

導入できたかの確認
/workspace/demoというフォルダを作り、adlintの導入ソフトのdemo フォルダの中身を複写

$ cp -r `adlint --prefix`/share/demo/intro_demo .

adlintizeコマンドを実行

$ cd intro_demo
$ ls
intro_demo.cintro_demo.huseless_header.h
$ adlintize
$ ls
GNUmakefileadlint_cinit.hadlint_traits.ymluseless_header.h
adlint_all.batadlint_files.txtintro_demo.c
adlint_all.shadlint_pinit.hintro_demo.h

ファイルを生成している。

$ make verbose-all
adlint -t adlint_traits.yml -o . -p 1 -v ./intro_demo.c
                ./intro_demo.c [fin] |============================| 0.225s
                    intro_demo [fin] |============================| 0.030s
  0.740s user, 0.030s system, 00:00:00.77 total

cat intro_demo.c.msg.csv

V,3.2.14,2015-03-17 15:35:02 +0900,/workspace/demo/intro_demo

W,./intro_demo.c,4,12,c_builtin,W1076,UNC,X99,関数 `foo' は内部結合を持ちますが、事前に内部結合として宣言していません。


ここからは、gnu-screenの解析の記述をもとに、
toppers/sspの解析に変更する作業をします。

#行がgnu screenからの引用です。

#ダウンロード
#ビルド

準備
# uname -mo
# gcc --version
# adlintize -L

$uname -mo
uname: illegal option -- o
usage: uname [-amnprsv]
$ uname -v
Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64

 uname -m

x86_64


arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/workspace/gcc-arm-none-eabi-4_9-2014q4/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper
Target: arm-none-eabi
Configured with: /Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/src/gcc/configure --target=arm-none-eabi --prefix=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native --libexecdir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/lib --infodir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/install-native/arm-none-eabi --build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --with-gmp=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-mpfr=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-mpc=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-isl=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-cloog=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-libelf=/Users/build/GCC-4-9-build/gcc-arm-none-eabi-4_9-2014q4-20141203/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-lstdc++ -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278] (GNU Tools for ARM Embedded Processors) 

$ adlintize -L
i686-cygwin-gcc_4.3.4
i686-devkit-gcc_4.5.2
i686-linux-gcc_4.5.1
i686-mingw-gcc_4.6.1
i686-mswin-msvc_100
x86_64-centos_6.4-gcc_4.4.7
x86_64-ubuntu_12.04-gcc_4.6.3

# adlintize -e x86_64-ubuntu_12.04-gcc_4.6.3 -o adlint
$ cd adlint
$ ls
GNUmakefileadlint_all.shadlint_files.txtadlint_traits.yml
adlint_all.batadlint_cinit.hadlint_pinit.h

$make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

make verbose-all
adlint -t adlint_traits.yml -o . -p 1 -v ../cfg1_out.c ../kernel_cfg.c ../sample1.c
adlint: Failed to read `adlint_traits.yml'.

Detailed message is below;
1. `compiler_traits:file_search_paths' contains non-existent pathname (/usr/lib/gcc/x86_64-linux-gnu/4.6/include).
2. `compiler_traits:file_search_paths' contains non-existent pathname (/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed).
3. `compiler_traits:file_search_paths' contains non-existent pathname (/usr/include/x86_64-linux-gnu).

make: *** [adlint_verbose-all] Error 3

arm-gccのincludeフォルダを指定し、
上記の3箇所は削除

$ make verbose-all

adlint -t adlint_traits.yml -o . -p 1 -v ../cfg1_out.c ../kernel_cfg.c ../sample1.c

                 ../cfg1_out.c [cpp] |====                        | 0.053s!

An error was occurred while processing `../cfg1_out.c'.

See `cfg1_out.c.msg.csv' and `cfg1_out.c.log' for more details.

               ../kernel_cfg.c [cpp] |====                        | 0.041s!

An error was occurred while processing `../kernel_cfg.c'.

See `kernel_cfg.c.msg.csv' and `kernel_cfg.c.log' for more details.

                  ../sample1.c [cpp] |====                        | 0.057s!

An error was occurred while processing `../sample1.c'.

See `sample1.c.msg.csv' and `sample1.c.log' for more details.

  0.630s user, 0.030s system, 00:00:00.66 total

make: *** [adlint_verbose-all] Error 4


cat sample1.c.log

I, [2015-03-17 16:21:36 #56020]  INFO -- SMA-3.2.14: start analysis by adlint-3.2.14 with c_builtin-3.2.14.

F, [2015-03-17 16:21:36 #56020] FATAL -- SMA-3.2.14: invalid byte sequence in UTF-8 (AdLint::InternalError)

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/source.rb:104:in `read_content'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/source.rb:84:in `open'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/lexer.rb:167:in `initialize'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/prelude.rb:88:in `new'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/prelude.rb:88:in `method_missing'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/lexer.rb:107:in `discard_heading_comments'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/lexer.rb:223:in `discard_heading_comments'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/lexer.rb:311:in `block in next_token'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/lexer.rb:310:in `loop'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/lexer.rb:310:in `next_token'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/lexer.rb:75:in `next_token'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/lexer.rb:79:in `top_token'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:886:in `top_token'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:99:in `group_part'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:88:in `group'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:84:in `preprocessing_file'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:56:in `execute'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/phase.rb:126:in `process_target_source'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/phase.rb:98:in `do_execute'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/phase.rb:58:in `block in execute'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/monitor.rb:43:in `monitored_region'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/phase.rb:57:in `execute'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `block (2 levels) in execute'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `each'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `block in execute'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/report.rb:50:in `initialize'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:123:in `new'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:123:in `execute'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:72:in `block in run'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:65:in `open'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:65:in `run'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/driver.rb:61:in `run_sma!'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:133:in `block in <top (required)>'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:132:in `each'

/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:132:in `<top (required)>'

/usr/bin/adlint:23:in `load'

/usr/bin/adlint:23:in `<main>'


cat sample1.c.msg.csv
V,3.2.14,2015-03-17 16:21:36 +0900,/workspace/demo/ssp/OBJ/adlint
X,,,,core,X0001,ERR,X99,不明な例外条件 `ArgumentError : invalid byte sequence in UTF-8' を検出しました。

 make verbose-all

adlint -t adlint_traits.yml -o . -p 1 -v ../cfg1_out.c ../kernel_cfg.c ../sample1.c

                 ../cfg1_out.c [cpp] |====                        | 0.049s!

An error was occurred while processing `../cfg1_out.c'.

See `cfg1_out.c.msg.csv' and `cfg1_out.c.log' for more details.

               ../kernel_cfg.c [cpp] |====                        | 0.038s!

An error was occurred while processing `../kernel_cfg.c'.

See `kernel_cfg.c.msg.csv' and `kernel_cfg.c.log' for more details.

                  ../sample1.c [cpp] |====                        | 0.056s!

An error was occurred while processing `../sample1.c'.

See `sample1.c.msg.csv' and `sample1.c.log' for more details.

  0.620s user, 0.030s system, 00:00:00.65 total

make: *** [adlint_verbose-all] Error 4

cat sample1.c.msg.csv

V,3.2.14,2015-03-17 16:29:07 +0900,/workspace/demo/ssp/OBJ/adlint

E,../sample1.c,1,1,core,E0009,ERR,X99,ヘッダファイル <kernel.h> が見つかりません。

X,../sample1.c,1,1,core,X0003,ERR,X99,回復不能なエラーにより解析処理を中断しました。詳細は `sample1.c.msg.csv' 及び `sample1.c.log' を確認して下さい。


- "/workspace/demo/ssp/include"
行を追加。

make verbose-all
adlint -t adlint_traits.yml -o . -p 1 -v ../cfg1_out.c ../kernel_cfg.c ../sample1.c
adlint: Failed to read `adlint_traits.yml'.

Detailed message is below;
(<unknown>): found character that cannot start any token while scanning for the next token at line 124 column 1
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:208:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:208:in `parse_stream'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:291:in `load_stream'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/traits.rb:44:in `block in initialize'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/traits.rb:43:in `open'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/traits.rb:43:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/driver.rb:89:in `new'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/driver.rb:89:in `load_traits'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/driver.rb:43:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:129:in `new'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:129:in `<top (required)>'
/usr/bin/adlint:23:in `load'
/usr/bin/adlint:23:in `<main>'

make: *** [adlint_verbose-all] Error 2

¥¥(tab)使ったらエラーになった。

make verbose-all

adlint -t adlint_traits.yml -o . -p 1 -v ../cfg1_out.c ../kernel_cfg.c ../sample1.c

                 ../cfg1_out.c [cpp] |====                        | 0.060s!

An error was occurred while processing `../cfg1_out.c'.

See `cfg1_out.c.msg.csv' and `cfg1_out.c.log' for more details.

               ../kernel_cfg.c [cpp] |====                        | 0.038s!

An error was occurred while processing `../kernel_cfg.c'.

See `kernel_cfg.c.msg.csv' and `kernel_cfg.c.log' for more details.

                  ../sample1.c [cpp] |====                        | 0.055s!

An error was occurred while processing `../sample1.c'.

See `sample1.c.msg.csv' and `sample1.c.log' for more details.

  0.650s user, 0.030s system, 00:00:00.68 total

make: *** [adlint_verbose-all] Error 4


cat cfg1_out.c.msg.csv
V,3.2.14,2015-03-17 16:37:39 +0900,/workspace/demo/ssp/OBJ/adlint
E,../cfg1_out.c,3,1,core,E0010,ERR,X99,"ヘッダファイル ""kernel/kernel_int.h""が見つかりません。"
X,../cfg1_out.c,3,1,core,X0003,ERR,X99,回復不能なエラーにより解析処理を中断しました。詳細は `cfg1_out.c.msg.csv' 及び `cfg1_out.c.log' を確認して下さい。

 cat kernel_cfg.c.msg.csv

V,3.2.14,2015-03-17 16:37:39 +0900,/workspace/demo/ssp/OBJ/adlint

E,../kernel_cfg.c,2,1,core,E0010,ERR,X99,"ヘッダファイル ""kernel/kernel_int.h""が見つかりません。"

X,../kernel_cfg.c,2,1,core,X0003,ERR,X99,回復不能なエラーにより解析処理を中断しました。詳細は `kernel_cfg.c.msg.csv' 及び `kernel_cfg.c.log' を確認して下さい。


$ cat kernel_cfg.c.msg.csv

V,3.2.14,2015-03-17 16:41:34 +0900,/workspace/demo/ssp/OBJ/adlint

X,,,,core,X0001,ERR,X99,不明な例外条件 `ArgumentError : invalid byte sequence in UTF-8' を検出しました。

$ cat cfg1_out.c.msg.csv

V,3.2.14,2015-03-17 16:41:34 +0900,/workspace/demo/ssp/OBJ/adlint

X,,,,core,X0001,ERR,X99,不明な例外条件 `ArgumentError : invalid byte sequence in UTF-8' を検出しました。

$ cat sample1.c.msg.csv

V,3.2.14,2015-03-17 16:41:34 +0900,/workspace/demo/ssp/OBJ/adlint

X,,,,core,X0001,ERR,X99,不明な例外条件 `ArgumentError : invalid byte sequence in UTF-8' を検出しました。


$ cat sample1.c.log
I, [2015-03-17 17:07:10 #56111]  INFO -- SMA-3.2.14: start analysis by adlint-3.2.14 with c_builtin-3.2.14.
I, [2015-03-17 17:07:10 #56111]  INFO -- SMA-3.2.14: including </workspace/demo/ssp/include/kernel.h> at ../sample1.c:1:1
I, [2015-03-17 17:07:10 #56111]  INFO -- SMA-3.2.14: including </workspace/demo/ssp/include/t_stddef.h> at /workspace/demo/ssp/include/kernel.h:62:1
F, [2015-03-17 17:07:10 #56111] FATAL -- SMA-3.2.14: cannot open "target_stddef.h". (AdLint::MissingUserHeaderError)
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:603:in `include_first_user_header'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:329:in `user_include_line'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:299:in `include_line'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:276:in `control_line'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:104:in `group_part'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:90:in `group'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:205:in `ifndef_statement'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:159:in `if_group'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:131:in `if_section'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:102:in `group_part'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:90:in `group'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:205:in `ifndef_statement'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:159:in `if_group'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:131:in `if_section'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:102:in `group_part'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:90:in `group'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:84:in `preprocessing_file'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/eval.rb:56:in `execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/phase.rb:126:in `process_target_source'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cpp/phase.rb:98:in `do_execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/phase.rb:58:in `block in execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/monitor.rb:43:in `monitored_region'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/phase.rb:57:in `execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `block (2 levels) in execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `each'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `block in execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/report.rb:50:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:123:in `new'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:123:in `execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:72:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:65:in `open'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:65:in `run'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/driver.rb:61:in `run_sma!'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:133:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:132:in `each'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:132:in `<top (required)>'
/usr/bin/adlint:23:in `load'
/usr/bin/adlint:23:in `<main>'
make verbose-all
adlint -t adlint_traits.yml -o . -p 1 -v ../cfg1_out.c ../kernel_cfg.c ../sample1.c
                 ../cfg1_out.c [cpp] |====                        | 0.055s!
An error was occurred while processing `../cfg1_out.c'.
See `cfg1_out.c.msg.csv' and `cfg1_out.c.log' for more details.
               ../kernel_cfg.c [cpp] |====                        | 0.039s!
An error was occurred while processing `../kernel_cfg.c'.
See `kernel_cfg.c.msg.csv' and `kernel_cfg.c.log' for more details.
                  ../sample1.c [prs] |==========                  | 1.376s!
An error was occurred while processing `../sample1.c'.
See `sample1.c.msg.csv' and `sample1.c.log' for more details.
  1.980s user, 0.040s system, 00:00:02.02 total
make: *** [adlint_verbose-all] Error 4
$ cat sample1.c.log
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: start analysis by adlint-3.2.14 with c_builtin-3.2.14.
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </workspace/demo/ssp/include/kernel.h> at ../sample1.c:1:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </workspace/demo/ssp/include/t_stddef.h> at /workspace/demo/ssp/include/kernel.h:62:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/target_stddef.h" at /workspace/demo/ssp/include/t_stddef.h:68:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/gcc/tool_stddef.h" at /workspace/demo/ssp/include/target_stddef.h:61:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/stdint.h> at /workspace/demo/ssp/include/gcc/tool_stddef.h:80:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_types/_int8_t.h> at /usr/include/stdint.h:18:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_types/_int16_t.h> at /usr/include/stdint.h:19:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_types/_int32_t.h> at /usr/include/stdint.h:20:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_types/_int64_t.h> at /usr/include/stdint.h:21:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/_types/_uint8_t.h> at /usr/include/stdint.h:23:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/_types/_uint16_t.h> at /usr/include/stdint.h:24:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/_types/_uint32_t.h> at /usr/include/stdint.h:25:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/_types/_uint64_t.h> at /usr/include/stdint.h:26:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_types.h> at /usr/include/stdint.h:52:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/cdefs.h> at /usr/include/sys/_types.h:32:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_symbol_aliasing.h> at /usr/include/sys/cdefs.h:506:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_posix_availability.h> at /usr/include/sys/cdefs.h:572:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/machine/_types.h> at /usr/include/sys/_types.h:33:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/usr/include/i386/_types.h" at /usr/include/machine/_types.h:32:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_pthread/_pthread_types.h> at /usr/include/sys/_types.h:80:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/cdefs.h> at /usr/include/sys/_pthread/_pthread_types.h:32:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_types/_intptr_t.h> at /usr/include/stdint.h:53:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/_types/_uintptr_t.h> at /usr/include/stdint.h:54:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/_types/_intmax_t.h> at /usr/include/stdint.h:58:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/_types/_uintmax_t.h> at /usr/include/stdint.h:59:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/limits.h> at /workspace/demo/ssp/include/gcc/tool_stddef.h:81:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/cdefs.h> at /usr/include/limits.h:63:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/machine/limits.h> at /usr/include/limits.h:64:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/i386/limits.h> at /usr/include/machine/limits.h:6:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/cdefs.h> at /usr/include/i386/limits.h:39:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/i386/_limits.h> at /usr/include/i386/limits.h:40:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/syslimits.h> at /usr/include/limits.h:65:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </usr/include/sys/cdefs.h> at /usr/include/sys/syslimits.h:68:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/arm_m_gcc/prc_stddef.h" at /workspace/demo/ssp/include/target_stddef.h:66:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/target_kernel.h" at /workspace/demo/ssp/include/kernel.h:67:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/arm_m_gcc/prc_kernel.h" at /workspace/demo/ssp/include/target_kernel.h:62:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </workspace/demo/ssp/include/sil.h> at ../sample1.c:2:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including </workspace/demo/ssp/include/t_stddef.h> at /workspace/demo/ssp/include/sil.h:66:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/target_sil.h" at /workspace/demo/ssp/include/sil.h:71:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/MB9BF618T.h" at /workspace/demo/ssp/include/target_sil.h:51:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/arm_m_gcc/arm_m.h" at /workspace/demo/ssp/include/MB9BF618T.h:44:1
I, [2015-03-17 17:53:08 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/arm_m_gcc/prc_sil.h" at /workspace/demo/ssp/include/target_sil.h:56:1
I, [2015-03-17 17:53:09 #56232]  INFO -- SMA-3.2.14: including </workspace/demo/ssp/include/t_syslog.h> at ../sample1.c:3:1
I, [2015-03-17 17:53:09 #56232]  INFO -- SMA-3.2.14: including "../kernel_cfg.h" at ../sample1.c:4:1
I, [2015-03-17 17:53:09 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/syssvc/serial.h" at ../sample1.c:5:1
I, [2015-03-17 17:53:09 #56232]  INFO -- SMA-3.2.14: including "../sample1.h" at ../sample1.c:7:1
I, [2015-03-17 17:53:09 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/target_test.h" at ../sample1.h:42:1
I, [2015-03-17 17:53:09 #56232]  INFO -- SMA-3.2.14: including "/workspace/demo/ssp/include/arm_m_gcc/prc_test.h" at /workspace/demo/ssp/include/target_test.h:59:1
F, [2015-03-17 17:53:09 #56232] FATAL -- SMA-3.2.14: failed to parse preprocessed file. (AdLint::ParseError)
parser.y:1901:in `on_error'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/racc/parser.rb:258:in `_racc_do_parse_c'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/racc/parser.rb:258:in `do_parse'
parser.y:1871:in `execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/cc1/phase.rb:68:in `do_execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/phase.rb:58:in `block in execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/monitor.rb:43:in `monitored_region'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/phase.rb:57:in `execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `block (2 levels) in execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `each'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:133:in `block in execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/report.rb:50:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:123:in `new'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:123:in `execute'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:72:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:65:in `open'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/analyzer.rb:65:in `run'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/lib/adlint/driver.rb:61:in `run_sma!'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:133:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:132:in `each'
/Library/Ruby/Gems/2.0.0/gems/adlint-3.2.14/bin/adlint:132:in `<top (required)>'
/usr/bin/adlint:23:in `load'
/usr/bin/adlint:23:in `<main>'


13:59 | Impressed! | Voted(0) | Comment(0)