分页: 1 / 1

安装splint过程中出现错误:recipe for target 'cscanner.o' failed

发表于 : 2018-01-06 21:53
desila
各位大佬好,我在安装deal.ii过程中提示没有splint,然后就去安装splint了。主要步骤如下:
sudo mkdir /usr/local/splint
cd splint-3.1.2
./configure --prefix=/usr/local/splint
make
但是make先是提示cgrammar.c文件中三处缺少分号,添加之后如下所示,出现了两款问题:
Making all in src
make[2]: Entering directory '/home/desila/Downloads/splint-3.1.2/src'
Compiling cgrammar.c...
flex -L cscanner.l
cat flex.head lex.yy.c flex.reset | sed 's/YYSTYPE/cgrammar_YYSTYPE/g' | sed 's/lsllex/cgrammar_lsllex/g' > cscanner.c
Compiling cscanner.c...
In file included from Headers/basic.h:46:0,
from cscanner.c:993:
Headers/globals.h:38:25: error: conflicting types for ‘yyleng’
extern /*@unused@*/ int yyleng;
^
cscanner.c:369:11: note: previous declaration of ‘yyleng’ was here
yy_size_t yyleng;
^
Makefile:1101: recipe for target 'cscanner.o' failed
make[2]: *** [cscanner.o] Error 1
make[2]: Leaving directory '/home/desila/Downloads/splint-3.1.2/src'
Makefile:256: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/desila/Downloads/splint-3.1.2'
Makefile:195: recipe for target 'all' failed
make: *** [all] Error 2

请问下大佬们这两个问题:yyleng的前后不一致和recipe for target ** failed该如何解决?

Re: 安装splint过程中出现错误:recipe for target 'cscanner.o' failed

发表于 : 2018-01-06 23:37
poloshiao
然后就去安装splint了
https://packages.ubuntu.com/search?suit ... chon=names
套件 splint

安装 splint
sudo apt install splint

Re: 安装splint过程中出现错误:recipe for target 'cscanner.o' failed

发表于 : 2018-01-07 14:10
desila
poloshiao 写了:
然后就去安装splint了
https://packages.ubuntu.com/search?suit ... chon=names
套件 splint

安装 splint
sudo apt install splint
谢谢大神,从ubuntu package里边下到了好多要用到的库