make check fails in Ubuntu 14.04

Bug #1379360 reported by Miika Komu on 2014-10-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HIPL
High
Unassigned

Bug Description

Running "make check" does not execute really anything in trusty:

============================================================================
Testsuite summary for HIP for Linux 1.0.8
============================================================================
# TOTAL: 0
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================

Juhani Toivonen (scolphoy) wrote :

It would seem that although 'check' is installed, ./configure doesn't find it.

I was trying to collect the output to a file to compare with one produced on a Ubuntu 12.04 system, when this popped up in stderr:

hipuser@ubuntu:~/src/hipl$ ./configure > configure.log
/bin/bash: /home/hipuser/missing: No such file or directory
configure: WARNING: 'missing' script is too old or missing
configure: WARNING: libcheck not found: unit tests not available

Juhani Toivonen (scolphoy) wrote :

From config.log:

configure:11926: checking for suite_create in -lcheck
configure:11951: gcc -o conftest -g -O2 conftest.c -lcheck -lm -lcrypto >&5
/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'
collect2: error: ld returned 1 exit status
configure:11951: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "HIP for Linux"
| #define PACKAGE_TARNAME "hipl"
| #define PACKAGE_VERSION "1.0.8"
| #define PACKAGE_STRING "HIP for Linux 1.0.8"
| #define PACKAGE_BUGREPORT "<email address hidden>"
| #define PACKAGE_URL ""
| #define HIPL_CONFIGURATION ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define PACKAGE "hipl"
| #define VERSION "1.0.8"
| #define HAVE_LIBCRYPTO 1
| #define HAVE_EC_CRYPTO 1
| #define HAVE_LIBM 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char suite_create ();
| int
| main ()
| {
| return suite_create ();
| ;
| return 0;
| }
configure:11960: result: no
configure:11970: WARNING: libcheck not found: unit tests not available

Juhani Toivonen (scolphoy) wrote :

Ubuntu 12.04 --
scolphoy@farnsworth:/usr/lib$ pkg-config --cflags --libs check
 -lcheck_pic

Ubuntu 14.04 --
hipuser@ubuntu:~/src/hipl$ pkg-config --cflags --libs check
-pthread -pthread -lcheck_pic -lrt -lm

Running ./configure CFLAGS="-pthread -pthread -lcheck_pic -lrt -lm" seems to make at least some tests run. They are a lot less verbose than on Ubuntu 12.04, and I'm not entirely sure yet if the tests are actually run, or simply marked as passed.

make check-TESTS
make[2]: Entering directory `/home/hipuser/src/hipl'
make[3]: Entering directory `/home/hipuser/src/hipl'
PASS: test/check_hipd
PASS: test/check_hipfw
PASS: test/check_libcore
PASS: test/check_libhipl
PASS: tools/hipdnsproxy/dnsproxy.py
PASS: tools/hipdnsproxy/hosts.py
PASS: tools/hipdnsproxy/util.py
PASS: tools/hipdnsproxy/resolvconf.py
PASS: tools/hipdnsproxy/resolvconf_test.py
PASS: tools/hipdnsproxy/dnsproxy_test.py
make[4]: Entering directory `/home/hipuser/src/hipl'
make all-am
make[5]: Entering directory `/home/hipuser/src/hipl'
make[5]: Leaving directory `/home/hipuser/src/hipl'
make[4]: Leaving directory `/home/hipuser/src/hipl'
============================================================================
Testsuite summary for HIP for Linux 1.0.8
============================================================================
# TOTAL: 11
# PASS: 11
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================

Miika Komu (miika-iki) wrote :

Yes, they are being run. Tested this on lp:~hipl-core/hipl/rfc-checksum branch that introduces new test cases that intentionally fail.

It seems that just adding -lcheck_pic -lrt is not enough (tested this).

Juhani Toivonen (scolphoy) wrote :

I think it's mostly about that -pthread flag.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers