Open josephmarlin opened 7 years ago
Thanks for the report - what OS are you running, and which version of the check
library do you have installed?
I'm running Arch Linux with check 0.10.0, and I can run make coverage
with the current Makefile. Adding -lpthread -lrt -lm
works for me too, so I would be happy to add that if it makes it more portable, but -lsubunit
fails for me.
I'm on Ubuntu 16.04.1 LTS and check:amd64/xenial 0.10.0-3.
'make test' also requires these additional library changes, I should add, with the exception of lsubunit.
Examples of issues:
Without -lm:
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check.o): In function tcase_create': (.text+0x1a4): undefined reference to
floor'
Without -lrt:
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check.o): In function check_get_clockid': (.text+0xaa3): undefined reference to
timer_create'
Without -lpthread: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_pack.o): undefined reference to symbol '__pthread_unregister_cancel@@GLIBC_2.3.3'
Without -lsubunit ('make coverage' only):
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function subunit_lfun': (.text+0x584): undefined reference to
subunit_test_start'
In order to "make coverage" I had to amend the Makefile as such:
LDLIBS = -lcheck -lpthread -lsubunit -lrt -lm