Can not compile qctool 2 - missing mgl library?

Issue #21 resolved
Giovanni Dall'Olio
created an issue

Hi, I am trying to compile qctool 2 from source (since there are no binaries available).

In the configure step, I get a warning saying that the mgl library is not present:

Setting blddir to                        : /home/user/download/customrecipes/qctool/qctool/build
Using prefix                             : /home/user/usr
Checking for program g++ or c++          : /home/user/usr/bin/g++
Checking for program cpp                 : /home/user/usr/bin/cpp
Checking for program ar                  : /home/user/usr/bin/ar
Checking for program ranlib              : /home/user/usr/bin/ranlib
Checking for g++                         : ok
Checking for program gcc or cc           : /home/user/usr/bin/gcc
Checking for gcc                         : ok
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 bz2                 : yes
Checking for library mgl                 : not found
Checking for library cairo               : yes
Checking for library pthread             : yes
Checking for library readline            : yes
'configure' finished successfully (5.498s)

I am confused for two reasons:

  1. the configure step does not return an error code, so it would seem that the installation could proceed even without mgl. However the compilation step fails afterwards
  2. The documentation says that all the dependencies except libz are included in the repo

How can I install mgl? Which library it is, exactly?

Thanks

Comments (15)

  1. Gavin Band repo owner

    Hi Giovanni, You don't need mgl to compile qctool. The configure step warning is just a warning, so just go ahead and compile anyway. (Let me know if compilation is unsuccessful). Best, g.

  2. Giovanni Dall'Olio reporter
    g++ (Homebrew gcc 5.3.0) 5.3.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
  3. Giovanni Dall'Olio reporter

    Sorry, we would really need to use qctool2 as soon as possible... Is there any chance you may prepare a compiled binary for Linux i686 systems, when you have time? Thanks in advance.

  4. Gavin Band repo owner

    Is it easy to try a gcc 4.9 or earlier series compiler? If you have one on your system this should do it: CXX=/path/to/g++ ./waf-1.5.18 configure ./waf-1.5.18 I can also try to send you a compiled version. g.

  5. vrie0006

    Hi Gavin, I'm also having trouble compiling on a debian system. I tried the suggestion above to no avail. I'm keen to use qctool 2 as soon as possible. Perhaps a precompiled binary would work, if that wouldn't be too much trouble. We're operating a Linux norm 4.7.0-1-amd64 #1 SMP Debian 4.7.8-1 (2016-10-19) x86_64 GNU/Linux

    Thanks. Very excited to use the program.

  6. Giovanni Dall'Olio reporter

    I've tried with g++ 4.8.5.4 but no luck.

    I get this error, maybe related to encoding?

    [111/776] cxx: genfile/src/bgen/bgen.cpp -> build/default/genfile/src/bgen/bgen_1.o
    In file included from /usr/include/c++/4.8.2/cassert:43:0,
                     from ../genfile/include/genfile/zlib.hpp:12,
                     from ../genfile/include/genfile/bgen/bgen.hpp:17,
                     from ../genfile/src/bgen/bgen.cpp:13:
    ../genfile/include/genfile/bgen/bgen.hpp: In member function void genfile::bgen::GenotypeDataBlockWriter::finalise():
    ../genfile/include/genfile/bgen/bgen.hpp:1319:83: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         assert( (m_writer->repr().second - m_writer->repr().first) <= m_buffer1->size() ) ;
                                                                                       ^
    [165/776] cxx: genfile/test/test_filter_grammar.cpp -> build/default/genfile/test/test_filter_grammar_2.o
    ../genfile/src/bgen/bgen.cpp: In function const byte_t* genfile::bgen::v12::impl::read_bits_from_buffer(const byte_t*, const byte_t*, uint64_t*, int*, uint8_t):
    ../genfile/src/bgen/bgen.cpp:387:14: error: CHAR_BIT was not declared in this scope
          assert( CHAR_BIT == 8 ) ;
                  ^
    At global scope:
    cc1plus: warning: unrecognized command line option "-Wno-redeclared-class-member" [enabled by default]
    [166/776] cxx: genfile/test/test_genfile_io.cpp -> build/default/genfile/test/test_genfile_io_2.o
    In file included from /usr/include/c++/4.8.2/cassert:43:0,
                     from ../genfile/include/genfile/zlib.hpp:12,
                     from ../genfile/include/genfile/bgen/bgen.hpp:17,
                     from ../genfile/include/genfile/BGenFileSNPDataSource.hpp:15,
                     from ../genfile/test/test_genfile_io.cpp:15:
    ../genfile/include/genfile/bgen/bgen.hpp: In member function void genfile::bgen::GenotypeDataBlockWriter::finalise():
    ../genfile/include/genfile/bgen/bgen.hpp:1319:83: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         assert( (m_writer->repr().second - m_writer->repr().first) <= m_buffer1->size() ) ;
                                                                                       ^
    At global scope:
    cc1plus: warning: unrecognized command line option "-Wno-redeclared-class-member" [enabled by default]
    Waf: Leaving directory `/GWD/bioinfo/projects/RD-TSci-Software/CB/customrecipes/qctool/qctool/build'
    Build failed:  -> task failed (err #1):
            {task: cxx bgen.cpp -> bgen_1.o}
    
  7. Gavin Band repo owner

    Sorry. CHAR_BIT is defined in limits.h, which should be included at the top of the file. This issue has been fixed in the dev version. For now please insert the line #include <limits> on line 14 of the file genfile/src/bgen.cpp

    (Or replace CHAR_BIT with 8 in that file.)

    It's for reasons like this that qctool v2 is still marked 'beta', but FYI I'm working on an updated version and I will aim to make a compiled version available soon.

  8. Giovanni Dall'Olio reporter

    Thanks, I've finally managed to compile it!

    I've used g++ 4.8.5.4 and had to change CHAR_BIT in another file as well.

    Thanks for the effort in developing qctool, I appreciate that it is a beta and fixing bugs can be very time consuming.

  9. Olay

    Hello,

    I am trying to install qctool_v1.4-osx but keep getting an error "n file included from ../3rd_party/eigen/Eigen/Core:255:0, from ../genfile/include/genfile/VariantDataReader.hpp:16, from ../genfile/include/genfile/SNPDataSink.hpp:16, from ../genfile/src/VCFFormatSNPDataSink.cpp:10: ../3rd_party/eigen/Eigen/src/Core/util/Memory.h: In function ‘Index Eigen::internal::first_aligned(const Scalar, Index)’: ../3rd_party/eigen/Eigen/src/Core/util/Memory.h:441:48: warning: typedef ‘Packet’ locally defined but not used [-Wunused-local-typedefs] typedef typename packet_traits<Scalar>::type Packet; ^ In file included from ../3rd_party/eigen/Eigen/Core:331:0, from ../genfile/include/genfile/VariantDataReader.hpp:16, from ../genfile/include/genfile/SNPDataSink.hpp:16, from ../genfile/src/VCFFormatSNPDataSink.cpp:10: ../3rd_party/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h: In function ‘void Eigen::internal::product_selfadjoint_vector(Index, const Scalar, Index, const Scalar, Index, Scalar, Scalar)’: ../3rd_party/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h:44:44: warning: typedef ‘RealScalar’ locally defined but not used [-Wunused-local-typedefs] typedef typename NumTraits<Scalar>::Real RealScalar; ^ ../genfile/src/VCFFormatSNPDataSink.cpp: At global scope: ../genfile/src/VCFFormatSNPDataSink.cpp:17:15: warning: ‘std::string genfile::{anonymous}::int_to_number(std::size_t)’ defined but not used [-Wunused-function] std::string int_to_number( std::size_t i ) { ^ Waf: Leaving directory `/homeappl/home/anufriev/appl_taito/qctool/qctool/build' Build failed: -> task failed (err #1): {task: cxx SortingBGenFileSNPDataSink.cpp -> SortingBGenFileSNPDataSink_1.o}"

    Could you please help me solving it. Thank you beforehand.

  10. Gavin Band repo owner

    Hi Olay, I'm no longer supporting QCTOOL v1.4. QCTOOL v2 has a revamped compilation process which should be much easier, please can you try that. g.

  11. Gavin Band repo owner
    • edited description
    • changed status to resolved

    Closing this issue, there has been much work on the build lately (including removing any test for mgl and fixing the CHAR_BIT issue), please raise new issues if build still fails.

  12. Log in to comment