'Ubuntu 14.04 cpputest examples build fail
I installed cpputest on Ubuntu by:
sudo apt-get install cpputest
Now I am trying to build the examples from the book and it fails:
augre@ubuntu:~/tddec-code$ make
make -i -C code
make[1]: Entering directory `/home/augre/tddec-code/code'
make -f MakefileCppUTest.mk
make[2]: Entering directory `/home/augre/tddec-code/code'
MakefileCppUTest.mk:60: /build/MakefileWorker.mk: No such file or directory
make[2]: *** No rule to make target `/build/MakefileWorker.mk'. Stop.
make[2]: Leaving directory `/home/augre/tddec-code/code'
make[1]: [all] Error 2 (ignored)
make -f MakefileUnity.mk
make[2]: Entering directory `/home/augre/tddec-code/code'
Running BookCode_Unity_tests
Unity test run 1 of 1
..........!............................................................
-----------------------
71 Tests 0 Failures 1 Ignored
OK
make[2]: Leaving directory `/home/augre/tddec-code/code'
make[1]: Leaving directory `/home/augre/tddec-code/code'
make -i -C code-t0
make[1]: Entering directory `/home/augre/tddec-code/code-t0'
Makefile:42: /build/MakefileWorker.mk: No such file or directory
make[1]: *** No rule to make target `/build/MakefileWorker.mk'. Stop.
make[1]: Leaving directory `/home/augre/tddec-code/code-t0'
make: *** [all] Error 2
It seems like it cannot find where apt-get installed cpputest.
How can I figure that out and point it there?
Solution 1:[1]
I couldn't find the file MakefileWorker.mk in the directories that
sudo apt-get install cpputest
created.
So decided to remove the files
apt-get remove cpputest
Then download the source:
cd /home/augre/bin
git clone git://github.com/cpputest/cpputest.git
then:
$ cd cpputest_build
$ autoreconf .. -i
$ ../configure
$ make
Then set the environment variable
export CPPUTEST_HOME=/home/augre/bin/cpputest
Then to fix one more build error:
cp /home/augre/bin/cpputest/cpputest_build/lib/* /home/augre/bin/cpputest/lib/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | augre |
