Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing libsubunit in some SConscript to build master branch #18

Open
julien-nc opened this issue May 26, 2016 · 1 comment
Open

Missing libsubunit in some SConscript to build master branch #18

julien-nc opened this issue May 26, 2016 · 1 comment

Comments

@julien-nc
Copy link

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 ?

@sumudu-rangika
Copy link

Hi,

I'm getting the following error when I run scons to build hpg-aligner.

parasit@parasit-OptiPlex-3020:~/hpg-aligner$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
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 tosubunit_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 tosubunit_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 tosubunit_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 tosubunit_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.

I'm using Ubuntu 16.04LTS and I tried your solution but it doesn't work. Can you give a solution to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants