Cunit安装过程及问题解决

ⅰ亾dé卋堺 提交于 2019-12-20 08:56:35

系统ubuntu 18.04  版本CUnit-2.1-3

1.去下方网址,下载CUnit压缩包

https://sourceforge.net/projects/cunit/   

2. 解压缩

tar jxvf CUnit-2.1-3.tar.bz2

cd CUnit-2.1-3

3. 安装相关工具

sudo apt install libtool

4.

aclocal

warning : aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'。
解决办法:
可以不用理会,或者将configure.in改名为configure.ac

5.

autoconf    ( 注:autoconf 是用来生成自动配置软件源代码脚本(configure)的 工具)

6.

automake

error:
required file 'config.h.in' not found 
解决办法:
执行autoheader

参考:https://lists.gnu.org/archive/html/bug-gnulib/2012-11/msg00097.html

error:
 required file './compile' not found

解决办法:
automake --add-missing

7.

./configure

error:
sed: can't read ./ltmain.sh: No such file or directory
mv: cannot stat 'libtoolT': No such file or directory
cp: cannot stat 'libtoolT': No such file or directory
chmod: cannot access 'libtool': No such file or directory

输入命令:
libtoolize --automake --copy --debug --force
./configure

8.

make

error:
configure.in:158: error: required file './compile' not found
configure.in:158:   'automake --add-missing' can install 'compile'
configure.in:4: error: required file './missing' not found
configure.in:4:   'automake --add-missing' can install 'missing'
automake-1.15: warning: autoconf input should be named 'configure.ac', not 'configure.in'
CUnit/Sources/Automated/Makefile.am: error: required file './depcomp' not found
CUnit/Sources/Automated/Makefile.am:   'automake --add-missing' can install 'depcomp'
CUnit/Sources/Framework/Makefile.am:20: warning: '%'-style pattern rules are a GNU make extension
CUnit/Sources/Test/Makefile.am:12: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Examples/AutomatedTest/Makefile.am:13: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Examples/BasicTest/Makefile.am:13: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Examples/ConsoleTest/Makefile.am:13: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Examples/CursesTest/Makefile.am:13: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Makefile:404: recipe for target 'Makefile.in' failed
make: *** [Makefile.in] Error 1


解决办法:
再次执行automake
make

9.

sudo make install

少了sudo,会报错

安装完成

10.

检测

ls /usr/local/lib/libcunit.so

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!