"make check" failure

Bug #1669868 reported by Chris Sharp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned

Bug Description

When testing bug 1638377, I ran 'make check' as suggested in the testing steps, and hit the following error:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck.a(check.o): undefined reference to symbol 'floor@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[4]: *** [check_util] Error 1
make[4]: Leaving directory `/home/opensrf/Evergreen/Open-ILS/src/c-apps/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/home/opensrf/Evergreen/Open-ILS/src/c-apps/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/opensrf/Evergreen/Open-ILS/src/c-apps'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/opensrf/Evergreen/Open-ILS/src'
make: *** [check-recursive] Error 1

Evergreen master branch
OpenSRF master branch
PostgreSQL 9.3
Ubuntu 14.04 LTS

Revision history for this message
Galen Charlton (gmc) wrote :

Noting that this doesn't appear to happen on Debian Jessie.

Galen Charlton (gmc)
no longer affects: opensrf
Changed in evergreen:
importance: Undecided → High
milestone: none → 2.12.0
Revision history for this message
Kathy Lussier (klussier) wrote :

Confirming that I got the same output as Chris when running make check on Ubuntu 14.04

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Working branch here. This fixes the problem on Ubuntu 14.04. We should test on our other actively supported distros/releases.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/csharp/lp1669868_make_check_failure

tags: added: pullrequest
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Testing on 16.04 yielded another issue - adding a new LD flag... (same branch location)

Revision history for this message
Chris Sharp (chrissharp123) wrote :

Adding the -lsubunit flag broke 'make check' on Ubuntu 14.04, so I've added a new deb dependency to the ubuntu-trusty makefile.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

I tested this on Wheezy.

make check works on Wheezy from a clean master.

make check fails on Wheezy with this branch applied.

If I revert the commit that adds the -lsubunit flag, make check succeeds. The additional flags in the other commit are innocuous on Wheezy.

I think we should look into why subunit is necessary on Ubuntu 16.04 and have a distro-specific remedy. It's possibly with make variables.

I'll check on Jessie and report what I find.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Make check from master on Debian Jessie gives me the following:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libcheck.a(check_pack.o): undefined reference to symbol '__pthread_unregister_cancel@@GLIBC_2.3.3'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line

I will try with csharp's branch.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

With the full branch, I get the following from make check:

/usr/bin/ld: cannot find -lsubunit
collect2: error: ld returned 1 exit status

With commit 8dbf7c4 reverted, I get a successful make check.

I think we should only add the -lsubunit on Ubuntu 16.04. I'll look into that and make a collab branch.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

It looks like the problem is with detection of CLFAGS and LIBS for the check unit testing framework. OpenSRF has no issue with this detection, so I cribbed a few lines from the OpenSRF configure.ac and adjusted Open-ILS/src/c-apps/tests/Makefile.am accordingly.

You'll find my approach in working/user/dyrcona/lp1669868-fix-make-check

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1669868-fix-make-check

Revision history for this message
Jason Stephenson (jstephenson) wrote :

I tried my fix on Debian 7 Wheezy, Debian 8 Jesse, Ubuntu 14.04 Trusty Tahr, and Ubuntu 16.04 Xenial Xerus. It worked for me on all those distros.

Revision history for this message
Ben Shum (bshum) wrote :

Tested also on Ubuntu 14.04 and 16.04, worked for me.

Signing off: user/bshum/lp1669868-fix-make-check

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/bshum/lp1669868-fix-make-check

tags: added: signedoff
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed Jason's fix to master and rel_2_12. Thanks, Jason, Ben, and Chris!

Changed in evergreen:
status: Confirmed → Fix Committed
Galen Charlton (gmc)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.