qctool v2 build error

Issue #38 new
Teresa Filshtein
created an issue

Hello, I have been having some trouble with building the qctool. I have been able to troubleshoot many of the errors that come up, but this is the final one I am left with. The final error I am left with after running ./waf-1.5.18 is:

Build failed: -> task failed (err #1): {task: cxx_link qctool_3.o -> qctool_v2.0-rc7}

I put more complete results below:

Thank you in advance for any help with this. Teresa

Here are the results of the two steps:

Step 1:

$ ./waf-1.5.18 configure Setting blddir to : /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build ('Using prefix\t\t\t\t :', '/usr/local') Checking for program g++ or c++ : /opt/rh/devtoolset-2/root/usr/bin/g++ Checking for program cpp : /opt/rh/devtoolset-2/root/usr/bin/cpp Checking for program ar : /opt/rh/devtoolset-2/root/usr/bin/ar Checking for program ranlib : /opt/rh/devtoolset-2/root/usr/bin/ranlib Checking for g++ : ok
Checking for program gcc or cc : /opt/rh/devtoolset-2/root/usr/bin/gcc Checking for gcc : ok
Checking for compiler flags -std=c++11 : yes Checking for library blas : yes Checking for library lapack : yes Checking for header sys/time.h : yes Checking for static library z : yes Checking for library dl : yes Checking for library rt : yes Checking for library m : yes Checking for library pthread : yes Checking for library readline : yes 'configure' finished successfully (2.538s)

Step 2:

$ ./waf-1.5.18 -v -j 1 Waf: Entering directory `/mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build' [ 1/742] qctool_version_autogenerated: -> build/default/config/qctool_version_autogenerated.hpp 06:53:13 runner system command -> printf '#ifndef QCTOOL_REVISION_HPP

define QCTOOL_REVISION_HPP

namespace globals { char const qctool_version = "%s" ; char const const qctool_revision = "%s" ; }

endif

' echo 2.0-rc7 hg parents --template={node} > default/config/qctool_version_autogenerated.hpp abort: There is no Mercurial repository here (.hg not found)! [ 2/742] qctool_version_autogenerated: -> build/release/config/qctool_version_autogenerated.hpp 06:53:13 runner system command -> printf '#ifndef QCTOOL_REVISION_HPP

define QCTOOL_REVISION_HPP

namespace globals { char const qctool_version = "%s" ; char const const qctool_revision = "%s" ; }

endif

' echo 2.0-rc7 hg parents --template={node} > release/config/qctool_version_autogenerated.hpp abort: There is no Mercurial repository here (.hg not found)! [738/742] cxx_link: build/release/apps/qctool_3.o -> build/release/qctool_v2.0-rc7 06:53:16 runner system command -> ['/opt/rh/devtoolset-2/root/usr/bin/g++', 'release/apps/qctool_3.o', '-o', '/mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/release/qctool_v2.0-rc7', '-Lrelease/3rd_party', '-Lrelease/3rd_party/boost_1_55_0', '-Lrelease/integration', '-Lrelease/db', '-Lrelease/metro', '-Lrelease/genfile', '-Lrelease/worker', '-Lrelease/fputils', '-Lrelease/string_utils', '-Lrelease/statfile', '-Lrelease/appcontext', '-Lrelease/qcdb', '-Lrelease', '-Lrelease/components/SNPOutputComponent', '-Lrelease/components/RelatednessComponent', '-Lrelease/components/HaplotypeFrequencyComponent', '-Lrelease/components/SampleSummaryComponent', '-Lrelease/components/SNPSummaryComponent', '-Wl,-Bstatic', '-lSNPSummaryComponent', '-lSampleSummaryComponent', '-lHaplotypeFrequencyComponent', '-lRelatednessComponent', '-lSNPOutputComponent', '-lgen-tools-lib', '-lqcdb', '-lappcontext', '-lstatfile', '-lstring_utils', '-lfputils', '-lworker', '-lgenfile', '-lmetro', '-ldb', '-lintegration', '-lboost', '-lsqlite3-qctool', '-lzstd', '-lz', '-Wl,-Bdynamic', '-llapack', '-ldl', '-lpthread', '-lblas', '-lrt'] release/libgen-tools-lib.a(FileBackupCreator_2.o): In function __static_initialization_and_destruction_0': /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../src/FileBackupCreator.cpp:24: warning: the use oftmpnam' is dangerous, better use mkstemp' release/components/RelatednessComponent/libRelatednessComponent.a(KinshipCoefficientComputer_1.o): In functionimpl::accumulate_xxt_using_cblas(Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, int, int, int, int, double)': /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../components/RelatednessComponent/src/KinshipCoefficientComputer.cpp:103: undefined reference to cblas_dger(CBLAS_ORDER, int, int, double, double const*, int, double const*, int, double*, int)' /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../components/RelatednessComponent/src/KinshipCoefficientComputer.cpp:92: undefined reference tocblas_dsyr(CBLAS_ORDER, CBLAS_UPLO, int, double, double const, int, double, int)' collect2: error: ld returned 1 exit status Waf: Leaving directory `/mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build' Build failed: -> task failed (err #1): {task: cxx_link qctool_3.o -> qctool_v2.0-rc7}

Comments (4)

  1. Gavin Band repo owner

    Hi Teresa, Sorry you're having problems. This is odd because the configure step finds the blas library, and the build step links to it ('-lblas'), yet the symbol is not found. Debugging this might be a bit tricky, however, the following might be a workaround:

    1: edit the file build/release/config/config.hpp 2: change the line #define HAVE_CBLAS 1 to #define HAVE_CBLAS 0 3: do the same to build/default/config/config.hpp

    Alternatively, some debugging would be needed. For example, you could find the libblas library that qctool is linking to and use something like nm to list its symbols and confirm if cblas_dger is in there. (This is a bit hard to debug remotely unfortunately.)

  2. Teresa Filshtein reporter

    Hi Gavin, again thank you so much for your fast response. I tried your work around but it seems that I am still getting to the same place. This is still helpful as I can at least pass it on to the systems administrator here that has been helping me here and there.

    Is it possible that is has something to do with not having zlib installed with headers correctly? I have also been trying to work on that.

    In case something has changed that I don't recognize, this is now my output:

    $./waf-1.5.18 Waf: Entering directory /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build' [ 1/742] qctool_version_autogenerated: -> build/default/config/qctool_version_autogenerated.hpp [ 2/742] qctool_version_autogenerated: -> build/release/config/qctool_version_autogenerated.hpp abort: There is no Mercurial repository here (.hg not found)! abort: There is no Mercurial repository here (.hg not found)! [740/742] cxx_link: build/release/apps/qctool_3.o -> build/release/qctool_v2.0-rc7 [742/742] cxx_link: build/default/apps/qctool_3.o -> build/default/qctool_v2.0-rc7 default/libgen-tools-lib.a(FileBackupCreator_2.o): In functionstatic_initialization_and_destruction_0': /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../src/FileBackupCreator.cpp:24: warning: the use of tmpnam' is dangerous, better usemkstemp' default/components/RelatednessComponent/libRelatednessComponent.a(KinshipCoefficientComputer_1.o): In function impl::accumulate_xxt_using_cblas(Eigen::Matrix<double, -1, 1, 0, -1, 1>*, Eigen::Matrix<double, -1, -1, 0, -1, -1>*, int, int, int, int, double)': /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../components/RelatednessComponent/src/KinshipCoefficientComputer.cpp:103: undefined reference tocblas_dger(CBLAS_ORDER, int, int, double, double const, int, double const, int, double*, int)' /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../components/RelatednessComponent/src/KinshipCoefficientComputer.cpp:92: undefined reference to cblas_dsyr(CBLAS_ORDER, CBLAS_UPLO, int, double, double const*, int, double*, int)' collect2: error: ld returned 1 exit status release/libgen-tools-lib.a(FileBackupCreator_2.o): In functionstatic_initialization_and_destruction_0': /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../src/FileBackupCreator.cpp:24: warning: the use of tmpnam' is dangerous, better usemkstemp' release/components/RelatednessComponent/libRelatednessComponent.a(KinshipCoefficientComputer_1.o): In function impl::accumulate_xxt_using_cblas(Eigen::Matrix<double, -1, 1, 0, -1, 1>*, Eigen::Matrix<double, -1, -1, 0, -1, -1>*, int, int, int, int, double)': /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../components/RelatednessComponent/src/KinshipCoefficientComputer.cpp:103: undefined reference tocblas_dger(CBLAS_ORDER, int, int, double, double const, int, double const, int, double*, int)' /mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build/../components/RelatednessComponent/src/KinshipCoefficientComputer.cpp:92: undefined reference to cblas_dsyr(CBLAS_ORDER, CBLAS_UPLO, int, double, double const*, int, double*, int)' collect2: error: ld returned 1 exit status Waf: Leaving directory/mnt/speed/glymourlab/Teresa/gavinband-qctool-621f8d24625b/build' Build failed: -> task failed (err #1): {task: cxx_link qctool_3.o -> qctool_v2.0-rc7} -> task failed (err #1): {task: cxx_link qctool_3.o -> qctool_v2.0-rc7}

  3. Gavin Band repo owner

    Hi, Thanks. (I should say that the edits to config.hpp should go after the configure step. So it should go like this:

    1: run ./waf-1.5.18 clean to remove any previous build results 2: edit the two build/*/config/config.hpp files to set HAVE_CBLAS to 0 3: run ./waf-1.5.18 to build it.

    FYI I don't think this particular error has to do with zlib, instead this error has to do with not being able to link to a symbol in the blas library. That could be a number of things including: the symbol isn't there for some reason, or the library is linked in the wrong order, or something else. Best wishes, Gavin.

  4. Log in to comment