Cunit安裝過程及問題解決

系統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 --add-missing
make

9.

sudo make install

少了sudo,會報錯

安裝完成

10.

檢測

ls /usr/local/lib/libcunit.so

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章