|
From: Clay M. <cl...@da...> - 2014-09-16 05:57:58
|
Howdy, In working through the Check tutorial, step 3.5 (here: http://check.sourceforge.net/doc/check_html/check_3.html#Creating-a-Suite-1) on Ubuntu 14.04, I've run into some linker errors: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check.o): In function `tcase_create': (.text+0x194): undefined reference to `floor' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check.o): In function `tcase_create': (.text+0x1a8): undefined reference to `floor' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check.o): In function `tcase_set_timeout': (.text+0x435): undefined reference to `floor' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check.o): In function `tcase_set_timeout': (.text+0x449): undefined reference to `floor' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_pack.o): In function `ppack': (.text+0x51d): undefined reference to `__pthread_register_cancel' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_pack.o): In function `ppack': (.text+0x551): undefined reference to `__pthread_unregister_cancel' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run': (.text+0x965): undefined reference to `timer_create' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run': (.text+0x9b3): undefined reference to `timer_settime' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check_run.o): In function `srunner_run': (.text+0x9d9): undefined reference to `timer_delete' collect2: error: ld returned 1 exit status Adding the following to configure.ac fixes that up: # Checks for libraries AC_CHECK_LIB(m, floor) AC_CHECK_LIB(rt, setitimer) AC_CHECK_LIB(pthread, pthread_create) If that looks like an acceptable fix, I'd be happy to submit a patch. Thanks, and happy checking! Clay |