Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Error in making genesis-0.11.0

Hi Lucas,

I am trying to install the new version of genesis-0.11.0 to try out the new app for comparing jplace files but I am having trouble installing that I did not have previously with version 0.7.0. Here's the error I am getting:

[congxu@lg-1r17-n04 genesis-0.11.0]$ make
Running make...
make -s -C build
[  0%] Building CXX object lib/CMakeFiles/genesis_lib_shared.dir/placement/formats/edge_color.cpp.o
cc1plus: error: unrecognized command line option "-std=c++11"
make[3]: *** [lib/CMakeFiles/genesis_lib_shared.dir/placement/formats/edge_color.cpp.o] Error 1
make[2]: *** [lib/CMakeFiles/genesis_lib_shared.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [build] Error 2

A quick Google tells me that its because my gcc/g++ versions need to be updated since "-std=c++11" was only introduced in version 4.7, but I am using version 4.9.1.

[congxu@lg-1r17-n04 genesis-0.11.0]$ gcc --version
gcc (4.9.1-guillimin) 4.9.1
Copyright (C) 2014 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.

[congxu@lg-1r17-n04 genesis-0.11.0]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/sb/software/CentOS-6/compilers/gcc-4.9.1/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../../../src_common/gcc-4.9.1/configure --prefix=/software/CentOS-6/compilers/gcc-4.9.1 --with-arch=westmere --with-pkgversion=4.9.1-guillimin --with-bugurl=http://www.hpc.mcgill.ca/starthere --enable-languages=c,c++,java,fortran,go --enable-shared --enable-static --enable-threads=posix --enable-bootstrap
Thread model: posix
gcc version 4.9.1 (4.9.1-guillimin)

So I am not sure what is wrong... Thanks for your help!

Comments

  • My old version of genesis-0.7.0 still works. I also tried to make update, but I get this long error:

    [congxu@lg-1r17-n04 genesis-0.7.0]$ make update
    Running make with new files...
    make -s -C build
    -- Building RELEASE
    -- Using threads
    -- Building shared lib
    -- Building applications:
    --   extract_branch_placements
    --   placement_classification_table
    --   compare_jplace_files
    -- Found Python Lib and Boost Python
    -- Building Python module
    -- Using boost shared libs: ON
    -- Could NOT find GTest (missing:  GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
    -- Gtest not found
    CMake Warning at test/src/CMakeLists.txt:30 (message):
      Cannot build tests.


    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/congxu/programs/genesis-0.7.0/build
    [ 43%] Built target genesis_lib_shared
    [ 43%] Building CXX object apps/CMakeFiles/compare_jplace_files.dir/compare_jplace_files.cpp.o
    /home/congxu/programs/genesis-0.7.0/apps/compare_jplace_files.cpp: In function ‘int main(int, const char**)’:
    /home/congxu/programs/genesis-0.7.0/apps/compare_jplace_files.cpp:133:5: error: ‘scale_all_branch_lengths’ is not a member of ‘genesis::tree’
         tree::scale_all_branch_lengths(smpl_l.tree(), 1.0 / tree_len_l);
         ^
    /home/congxu/programs/genesis-0.7.0/apps/compare_jplace_files.cpp:134:5: error: ‘scale_all_branch_lengths’ is not a member of ‘genesis::tree’
         tree::scale_all_branch_lengths(smpl_r.tree(), 1.0 / tree_len_r);
         ^
    /home/congxu/programs/genesis-0.7.0/apps/compare_jplace_files.cpp:320:27: error: ‘class genesis::utils::Table’ has no member named ‘line_break’
                 details_table.line_break();
                               ^



  • In file included from /home/congxu/programs/genesis-0.7.0/lib/tree/default/distances.hpp:118:0,
                     from /home/congxu/programs/genesis-0.7.0/lib/genesis.hpp:79,
                     from /home/congxu/programs/genesis-0.7.0/apps/compare_jplace_files.cpp:28:
    /home/congxu/programs/genesis-0.7.0/lib/tree/default/distances.tpp: In instantiation of ‘double genesis::tree::length(const Tree&) [with Tree = genesis::tree::Tree<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>]’:
    /home/congxu/programs/genesis-0.7.0/apps/compare_jplace_files.cpp:127:49:   required from here
    /home/congxu/programs/genesis-0.7.0/lib/tree/default/distances.tpp:51:80: error: no match for ‘operator++’ (operand type is ‘const __gnu_cxx::__normal_iterator<const std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >*, std::vector<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >, std::allocator<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > > > > >’)
         for (const auto edge_it = tree.begin_edges(); edge_it != tree.end_edges(); ++edge_it) {
                                                                                    ^
    /home/congxu/programs/genesis-0.7.0/lib/tree/default/distances.tpp:51:80: note: candidates are:

  • In file included from /software/CentOS-6/compilers/gcc-4.9.1/include/c++/4.9.1/bits/stl_algobase.h:67:0,
                     from /software/CentOS-6/compilers/gcc-4.9.1/include/c++/4.9.1/vector:60,
                     from /home/congxu/programs/genesis-0.7.0/lib/placement/formats/edge_color.hpp:34,
                     from /home/congxu/programs/genesis-0.7.0/lib/genesis.hpp:36,
                     from /home/congxu/programs/genesis-0.7.0/apps/compare_jplace_files.cpp:28:
    /software/CentOS-6/compilers/gcc-4.9.1/include/c++/4.9.1/bits/stl_iterator.h:749:7: note: __gnu_cxx::__normal_iterator<_Iterator, _Container>& __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator++() [with _Iterator = const std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >*; _Container = std::vector<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >, std::allocator<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > > > >] <near match>
           operator++() _GLIBCXX_NOEXCEPT
           ^
    /software/CentOS-6/compilers/gcc-4.9.1/include/c++/4.9.1/bits/stl_iterator.h:749:7: note:   no known conversion for implicit ‘this’ parameter from ‘const __gnu_cxx::__normal_iterator<const std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >*, std::vector<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >, std::allocator<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > > > > >*’ to ‘__gnu_cxx::__normal_iterator<const 
  • std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >*, std::vector<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >, std::allocator<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > > > > >*’
    /software/CentOS-6/compilers/gcc-4.9.1/include/c++/4.9.1/bits/stl_iterator.h:756:7: note: __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator++(int) [with _Iterator = const std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >*; _Container = std::vector<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >, std::allocator<std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > > > >]
           operator++(int) _GLIBCXX_NOEXCEPT
           ^
    /software/CentOS-6/compilers/gcc-4.9.1/include/c++/4.9.1/bits/stl_iterator.h:756:7: note:   candidate expects 1 argument, 0 provided
    In file included from /home/congxu/programs/genesis-0.7.0/lib/tree/default/distances.hpp:118:0,
                     from /home/congxu/programs/genesis-0.7.0/lib/genesis.hpp:79,
                     from /home/congxu/programs/genesis-0.7.0/apps/compare_jplace_files.cpp:28:
    /home/congxu/programs/genesis-0.7.0/lib/tree/default/distances.tpp:52:13: error: ‘const class std::unique_ptr<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData>, std::default_delete<genesis::tree::TreeEdge<genesis::placement::PlacementTreeNodeData, genesis::placement::PlacementTreeEdgeData> > >’ has no member named ‘data’
             len += edge_it->data.branch_length;
                 ^
    make[3]: *** [apps/CMakeFiles/compare_jplace_files.dir/compare_jplace_files.cpp.o] Error 1
    make[2]: *** [apps/CMakeFiles/compare_jplace_files.dir/all] Error 2
    make[1]: *** [all] Error 2
    make: *** [update] Error 2
  • Hi Charles,

    wow, that's quite some errors. Can you try `make clean`, then `make` in the v0.11.0 version, and post the whole output again?

    Thanks
    Lucas
  • Hah! It worked. Thanks a lot Lucas!
  • Hehe nice. I was already wondering what was going on there... Probably just some old files that were not properly updated.
Sign In or Register to comment.