openxc / bitfield-c

Bit array parsing and encoding utility library in C
BSD 3-Clause "New" or "Revised" License
92 stars 51 forks source link

Libraries needed for running coverage #3

Open josephmarlin opened 7 years ago

josephmarlin commented 7 years ago

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

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

peplin commented 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.

josephmarlin commented 7 years ago

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 tofloor'

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 totimer_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 tosubunit_test_start'