You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the unit tests via make check inside a conda environment, the linking of testRNAblueprint fails with the following error message:
/home/felix/miniconda3/envs/rnablueprint/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: testRNAblueprint-main.o: in function `boost::unit_test::timer::timer::elapsed() const':
main.cc:(.text._ZNK5boost9unit_test5timer5timer7elapsedEv[_ZNK5boost9unit_test5timer5timer7elapsedEv]+0x45): undefined reference to `clock_gettime'
/home/felix/miniconda3/envs/rnablueprint/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: testRNAblueprint-main.o: in function `boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned long, boost::unit_test::framework::state::random_generator_helper const*)':
main.cc:(.text._ZN5boost9unit_test9framework5state17execute_test_treeEmmPKNS2_23random_generator_helperE[_ZN5boost9unit_test9framework5state17execute_test_treeEmmPKNS2_23random_generator_helperE]+0x5b3): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
Makefile:674: recipe for target 'testRNAblueprint' failed
make[2]: *** [testRNAblueprint] Error 1
My conda env was created using the following command:
The problem seems to be that clock_gettime needs to be linked with -lrt, cf. man clock_gettime. There it sais " Link with -lrt (only for glibc versions before 2.17)." Adding -lrt to testRNAblueprint_LDADD in tests/Makefile.am solves this problem. librt is part of the Linux Standard Base specification, so it should be present everywhere (?).
The text was updated successfully, but these errors were encountered:
Hi Felix,
as you already solved the problem, is it possible to send a PR with the changes in tests/Makefile.am? Sounds like a good idea to add -lrt here!
When running the unit tests via
make check
inside a conda environment, the linking oftestRNAblueprint
fails with the following error message:My conda env was created using the following command:
The problem seems to be that
clock_gettime
needs to be linked with-lrt
, cf.man clock_gettime
. There it sais " Link with -lrt (only for glibc versions before 2.17)." Adding-lrt
totestRNAblueprint_LDADD
intests/Makefile.am
solves this problem. librt is part of the Linux Standard Base specification, so it should be present everywhere (?).The text was updated successfully, but these errors were encountered: