Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Libraries needed for running coverage #3

Open
josephmarlin opened this issue Dec 6, 2016 · 2 comments
Open

Libraries needed for running coverage #3

josephmarlin opened this issue Dec 6, 2016 · 2 comments

Comments

@josephmarlin
Copy link

In order to "make coverage" I had to amend the Makefile as such:

LDLIBS = -lcheck -lpthread -lsubunit -lrt -lm

@peplin
Copy link
Member

peplin commented Dec 7, 2016

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.

@josephmarlin
Copy link
Author

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants