Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Missing libsubunit in some SConscript to build master branch #18

Description

@julien-nc

I'm running Ubuntu 16.04 and installed those packages with apt : zlib-devel libcurl-devel libxml2-devel ncurses-devel gsl-devel check-devel scons
Then I did :

git clone https://github.com/opencb/hpg-aligner.git
cd hpg-aligner
git submodule update --init

cd lib/hpg-libs
git checkout master
cd ../..
git checkout master
scons

and it failed at some point with :

gcc -o lib/hpg-libs/bioinfo-libs/bioformats/features/region/test/parse_regions_vcf.test -fopenmp -fopenmp lib/hpg-libs/bioinfo-libs/bioformats/features/region/test/test_parse_regions.o lib/hpg-libs/common-libs/libcommon.a lib/hpg-libs/bioinfo-libs/libbioinfo.a -Llib/hpg-libs/common-libs -Llib/hpg-libs/bioinfo-libs -L/usr/lib -L/usr/lib -L/usr/local/lib -Llibs -Llib/hpg-libs/common-libs -lxml2 -lm -lz -lcurl -ldl -lbioinfo -lcommon -lcheck -lcommon -lcurl -ldl -lm -lrt -lz
/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'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function `subunit_lfun':
(.text+0x63f): undefined reference to `subunit_test_fail'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function `subunit_lfun':
(.text+0x654): undefined reference to `subunit_test_pass'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function `subunit_lfun':
(.text+0x66f): undefined reference to `subunit_test_error'
collect2: error: ld returned 1 exit status
scons: *** [lib/hpg-libs/bioinfo-libs/bioformats/features/region/test/parse_regions_vcf.test] Error 1
scons: building terminated because of errors.

Link to libsubunit is missing. First i modified the makefiles to add -lsubunit but it is overwritten or overridden by scons so I modified those scons files :

  • ./lib/hpg-libs/bioinfo-libs/bioformats/features/region/test/SConscript
  • ./lib/hpg-libs/bioinfo-libs/bioformats/vcf/test/SConscript
  • ./lib/hpg-libs/common-libs/containers/test/SConscript
  • ./lib/hpg-libs/common-libs/containers/test/SConscript

to add libsubunit by changing this kind of line :

LIBS = ['check', 'common', 'curl', 'dl', 'm', 'rt', 'z'],

in

LIBS = ['check', 'subunit', 'common', 'curl', 'dl', 'm', 'rt', 'z'],

And it works like a charm.

I wonder how this can work without this modification. Maybe libsubunit is included in some versions of static libcheck. Anyway, don't you think subunit should be added to scons files ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions