qctool v2 build error after "configure" success

Issue #40 new
DavidMurphy
created an issue

Hi

I've been having some problems getting qctool to build on a RHEL system.

I thought the "Checking for compiler flags -std=c++11 : no" line might be the issue but the person here, seemed able to build despite it.

https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=OXSTATGEN;43e23e4b.1712

-bash-4.1$ ./waf-1.5.18 clean
'clean' finished successfully (0.139s)


-bash-4.1$ ./waf-1.5.18 configure
Setting blddir to                        : /data/kronos/NGS_Software/qctool/build
('Using prefix\t\t\t\t :', '/usr/local')
Checking for program g++ or c++          : /usr/bin/g++
Checking for program cpp                 : /usr/bin/cpp
Checking for program ar                  : /usr/bin/ar
Checking for program ranlib              : /usr/bin/ranlib
Checking for g++                         : ok
Checking for program gcc or cc           : /usr/bin/gcc
Checking for gcc                         : ok
Checking for compiler flags -std=c++11   : no
Checking for library cblas               : no
Checking for library blas                : no
Checking for library openblas            : no
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 (0.886s)




-bash-4.1$ ./waf-1.5.18 -v -j 1
Waf: Entering directory `/data/kronos/NGS_Software/qctool/build'

though I actually have blas and openblas-devel installed.

It fails on step 118 with

error: looser throw specifier for ‘virtual genfile::<unnamed>::PloidyConvertingSetter::~PloidyConvertingSetter()’

[118/742] cxx: genfile/src/PloidyConvertingSNPDataSource.cpp -> build/default/genfile/src/PloidyConvertingSNPDataSource_1.o
14:29:58 runner system command -> ['/usr/bin/g++', '-std=c++98', '-Wall', '-pedantic', '-Wno-long-long', '-Wno-unused-local-typedefs', '-g', '-I', 'default', '-Wall', '-pedantic', '-Wno-long-long', '-Wno-unused-local-typedefs', '-O3', '-I', 'release', '-Idefault/3rd_party/boost_1_55_0', '-I../3rd_party/boost_1_55_0', '-Idefault/3rd_party/eigen', '-I../3rd_party/eigen', '-Idefault/3rd_party/zstd-1.1.0/lib', '-I../3rd_party/zstd-1.1.0/lib', '-Idefault/genfile/include', '-I../genfile/include', '../genfile/src/PloidyConvertingSNPDataSource.cpp', '-c', '-o', 'default/genfile/src/PloidyConvertingSNPDataSource_1.o']
../genfile/src/PloidyConvertingSNPDataSource.cpp:41: error: looser throw specifier for ‘virtual genfile::<unnamed>::PloidyConvertingSetter::~PloidyConvertingSetter()’
../genfile/include/genfile/vcf/Types.hpp:60: error:   overriding ‘virtual genfile::vcf::PerSampleEntriesSetter::~PerSampleEntriesSetter() throw ()’
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
Waf: Leaving directory `/data/kronos/NGS_Software/qctool/build'
Build failed:  -> task failed (err #1):
        {task: cxx PloidyConvertingSNPDataSource.cpp -> PloidyConvertingSNPDataSource_1.o}

Any ideas for how to diagnose/resolve the issue?

Comments (11)

  1. Gavin Band repo owner

    Hi David, Thanks for reporting this, can you please let me know what compiler version you are using? (i.e. run g++ --version). Thanks, Gavin.

  2. DavidMurphy reporter
    -bash-4.1$ g++ --version
    g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
    Copyright (C) 2010 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. Gavin Band repo owner

    Thanks. To be honest I'm not sure if this is a bug or not. I think you will be able to fix the issue as follows: edit line 60 of genfile/include/genfile/vcf/Types.hpp from:

                virtual ~PerSampleEntriesSetter() throw() {}
    

    to:

                virtual ~PerSampleEntriesSetter() {}
    

    i.e. delete the nothrow specification. Could you try that and see if it fixes the problem for you?

    (What's a bit weird is that, if I'm understanding this right, PloidyConvertingSetter has a default destructor, so g++ seems to have generated a destructor that is incompatible with the base class constructor, right now I don't know if this is expected or not but I'd guess not.)

    Gavin

  4. DavidMurphy reporter

    After changing that line is now fails earlier on step 29:

    I ran ./waf-1.5.18 clean to avoid contamination from earlier build.

    [ 29/790] cxx: genfile/src/SampleFilteringSNPDataSource.cpp -> build/default/genfile/src/SampleFilteringSNPDataSource_1.o
    16:09:53 runner system command -> ['/usr/bin/g++', '-std=c++98', '-Wall', '-pedantic', '-Wno-long-long', '-Wno-unused-local-typedefs', '-g', '-I', 'default', '-Wall', '-pedantic', '-Wno-long-long', '-Wno-unused-local-typedefs', '-O3', '-I', 'release', '-Idefault/3rd_party/boost_1_55_0', '-I../3rd_party/boost_1_55_0', '-Idefault/3rd_party/eigen', '-I../3rd_party/eigen', '-Idefault/3rd_party/zstd-1.1.0/lib', '-I../3rd_party/zstd-1.1.0/lib', '-Idefault/genfile/include', '-I../genfile/include', '../genfile/src/SampleFilteringSNPDataSource.cpp', '-c', '-o', 'default/genfile/src/SampleFilteringSNPDataSource_1.o']
    In file included from ../genfile/include/genfile/VariantDataReader.hpp:22,
                     from ../genfile/include/genfile/SNPDataSource.hpp:21,
                     from ../genfile/src/SampleFilteringSNPDataSource.cpp:12:
    ../genfile/include/genfile/vcf/Types.hpp:60: error: looser throw specifier for ‘virtual genfile::vcf::PerSampleEntriesSetter::~PerSampleEntriesSetter()’
    ../genfile/include/genfile/vcf/Types.hpp:54: error:   overriding ‘virtual genfile::vcf::EntriesSetter::~EntriesSetter() throw ()’
    cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
    cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
    Waf: Leaving directory `/data/kronos/NGS_Software/qctool/build'
    Build failed:  -> task failed (err #1):
            {task: cxx SampleFilteringSNPDataSource.cpp -> SampleFilteringSNPDataSource_1.o}
    
  5. DavidMurphy reporter

    Some success!

    Got as far as 331

    [331/790] cxx: metro/src/regression/BinomialLogistic.cpp -> build/default/metro/src/regression/BinomialLogistic_1.o
    17:01:54 runner system command -> ['/usr/bin/g++', '-std=c++98', '-Wall', '-pedantic', '-Wno-long-long', '-Wno-unused-local-typedefs', '-g', '-I', 'default', '-                                                                             Wall', '-pedantic', '-Wno-long-long', '-Wno-unused-local-typedefs', '-O3', '-I', 'release', '-Idefault/3rd_party/eigen', '-I../3rd_party/eigen', '-Idefault/3rd_                                                                             party/boost_1_55_0', '-I../3rd_party/boost_1_55_0', '-Idefault/genfile/include', '-I../genfile/include', '-Idefault/3rd_party/zstd-1.1.0/lib', '-I../3rd_party/z                                                                             std-1.1.0/lib', '-Idefault/metro/include', '-I../metro/include', '../metro/src/regression/BinomialLogistic.cpp', '-c', '-o', 'default/metro/src/regression/Binom                                                                             ialLogistic_1.o']
    ../metro/src/regression/BinomialLogistic.cpp: In member function ‘virtual void metro::regression::BinomialLogistic::compute_complete_data_likelihood_and_derivat                                                                             ives(const metro::regression::BinomialLogistic::Point&, metro::regression::BinomialLogistic::Matrix*, metro::regression::BinomialLogistic::Matrix*, metro::regre                                                                             ssion::BinomialLogistic::Matrix*, const std::vector<metro::SampleRange, std::allocator<metro::SampleRange> >&, int)’:
    ../metro/src/regression/BinomialLogistic.cpp:274: warning: ‘auto’ will change meaning in C++0x; please remove it
    ../metro/src/regression/BinomialLogistic.cpp:274: error: ISO C++ forbids declaration of ‘one’ with no type
    ../metro/src/regression/BinomialLogistic.cpp:274: error: cannot convert ‘const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<                                                                             double, -0x00000000000000001, 1, 0, -0x00000000000000001, 1> >’ to ‘int’ in initialization
    ../metro/src/regression/BinomialLogistic.cpp:285: error: no match for ‘operator+’ in ‘one + ((metro::regression::BinomialLogistic*)this)->metro::regression::Bin                                                                             omialLogistic::m_f1’
    ../metro/src/regression/BinomialLogistic.cpp:298: error: request for member ‘array’ in ‘one’, which is of non-class type ‘int’
    ../metro/src/regression/BinomialLogistic.cpp:315: error: no match for ‘operator-’ in ‘one - ((metro::regression::BinomialLogistic*)this)->metro::regression::Bin                                                                             omialLogistic::m_f1’
    ../metro/src/regression/BinomialLogistic.cpp:329: error: request for member ‘array’ in ‘one’, which is of non-class type ‘int’
    ../metro/src/regression/BinomialLogistic.cpp:254: warning: unused variable ‘D’
    ../metro/src/regression/BinomialLogistic.cpp:257: warning: unused variable ‘N_predictor_levels’
    ../metro/src/regression/BinomialLogistic.cpp: In member function ‘void metro::regression::BinomialLogistic::compute_value_of_second_derivative(const metro::regr                                                                             ession::BinomialLogistic::Matrix&, const metro::regression::BinomialLogistic::Matrix&, metro::regression::BinomialLogistic::Matrix*, const std::vector<metro::Sa                                                                             mpleRange, std::allocator<metro::SampleRange> >&)’:
    ../metro/src/regression/BinomialLogistic.cpp:432: warning: unused variable ‘N’
    At global scope:
    cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
    cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedefs"
    Waf: Leaving directory `/data/kronos/NGS_Software/qctool/build'
    Build failed:  -> task failed (err #1):
            {task: cxx BinomialLogistic.cpp -> BinomialLogistic_1.o}
    
  6. Gavin Band repo owner

    Oh hang on, this means you're using the default (development) branch. You should use the 'beta' branch for the moment, try

    hg update -r beta
    

    to update to that branch.

  7. Scott Ritchie

    Hi,

    I found this issue after getting the same error building the development (beta) branch on RHEL 6 (with gcc/g++ v4.4.7). Deleting the lines containing throw() in genfile/include/genfile/vcf/Types.hpp as per the suggestion above was able to resolve the issue.

    Best,

  8. Mian Asbat Ahmad

    With help from Gavin, here is how to install the package from source on Centos 6.9

    mkdir /qctool
    cd /qctool
    wget https://bitbucket.org/gavinband/qctool/get/beta.tar.bz2
    tar -jxvf beta.tar.bz2
    cd gavinband-qctool-1215abdf6740/
    Now open the file genfile/include/genfile/vcf/Types.hpp and remove word 'throw' from line 54, 31, and 60 and save the changes.
    ./waf-1.5.18 configure --prefix=/qctool
    ./waf-1.5.18 install
    
    If all goes well, the binary will be installed in /qctool/bin
    
  9. Log in to comment