jts / sga

de novo sequence assembler using string graphs
http://genome.cshlp.org/content/22/3/549
239 stars 82 forks source link

configure forces -std=c++98 but that should be moved to relevant Makefiles or sga code adjusted #156

Open mmokrejs opened 5 years ago

mmokrejs commented 5 years ago

For me configure does not detect sparsehash-2.0.3 not even with current git master at commit af73db617738ff3e4c85cb370f485b208d6be15c :

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64 --with-bamtools=/usr
...
checking google/sparse_hash_set usability... no
checking google/sparse_hash_set presence... yes
configure: WARNING: google/sparse_hash_set: present but cannot be compiled
configure: WARNING: google/sparse_hash_set:     check for missing prerequisite headers?
configure: WARNING: google/sparse_hash_set: see the Autoconf documentation
configure: WARNING: google/sparse_hash_set:     section "Present But Cannot Be Compiled"
configure: WARNING: google/sparse_hash_set: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------- ##
configure: WARNING:     ## Report this to js18@sanger.ac.uk ##
configure: WARNING:     ## -------------------------------- ##
checking for google/sparse_hash_set... no
configure: error: google sparse hash library is required: http://code.google.com/p/google-sparsehash/

The config.log states:

configure:5164: checking google/sparse_hash_set usability
configure:5164: x86_64-pc-linux-gnu-g++ -c -std=c++98 -O3  -fopenmp  -I/usr/include -I/usr/include/bamtools conftest.cpp >&5
In file included from /usr/include/sparsehash/sparsetable:227,
                 from /usr/include/sparsehash/internal/sparsehashtable.h:106,
                 from /usr/include/sparsehash/sparse_hash_set:97,
                 from /usr/include/google/sparse_hash_set:34,
                 from conftest.cpp:56:
/usr/include/sparsehash/sparse_hash_set:103:27: error: 'hash' in namespace 'std' does not name a template type
           class HashFcn = SPARSEHASH_HASH<Value>,   // defined in sparseconfig.h
                           ^~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set:103:27: note: 'std::hash' is only available from C++11 onwards
           class HashFcn = SPARSEHASH_HASH<Value>,   // defined in sparseconfig.h
                           ^~~~~~~~~~~~~~~
In file included from /usr/include/google/sparse_hash_set:34,
                 from conftest.cpp:56:
/usr/include/sparsehash/sparse_hash_set:103:42: error: expected '>' before '<' token
           class HashFcn = SPARSEHASH_HASH<Value>,   // defined in sparseconfig.h
                                          ^
/usr/include/sparsehash/sparse_hash_set:120:28: error: 'EqualKey' was not declared in this scope
                            EqualKey, Alloc> ht;
                            ^~~~~~~~
/usr/include/sparsehash/sparse_hash_set:120:38: error: 'Alloc' was not declared in this scope
                            EqualKey, Alloc> ht;
                                      ^~~~~
/usr/include/sparsehash/sparse_hash_set:120:38: note: suggested alternative: 'valloc'
                            EqualKey, Alloc> ht;
                                      ^~~~~
                                      valloc
/usr/include/sparsehash/sparse_hash_set:120:43: error: template argument 6 is invalid
                            EqualKey, Alloc> ht;
                                           ^
/usr/include/sparsehash/sparse_hash_set:120:43: error: template argument 7 is invalid
/usr/include/sparsehash/sparse_hash_set:124:20: error: 'ht' is not a class or namespace
   typedef typename ht::key_type key_type;
                    ^~
/usr/include/sparsehash/sparse_hash_set:125:20: error: 'ht' is not a class or namespace
   typedef typename ht::value_type value_type;
                    ^~
/usr/include/sparsehash/sparse_hash_set:126:20: error: 'ht' is not a class or namespace
   typedef typename ht::hasher hasher;
                    ^~
/usr/include/sparsehash/sparse_hash_set:127:20: error: 'ht' is not a class or namespace
   typedef typename ht::key_equal key_equal;
                    ^~
/usr/include/sparsehash/sparse_hash_set:128:11: error: 'Alloc' does not name a type; did you mean 'valloc'?
   typedef Alloc allocator_type;
           ^~~~~
           valloc
/usr/include/sparsehash/sparse_hash_set:130:20: error: 'ht' is not a class or namespace
   typedef typename ht::size_type size_type;
                    ^~
/usr/include/sparsehash/sparse_hash_set:131:20: error: 'ht' is not a class or namespace
   typedef typename ht::difference_type difference_type;
                    ^~
/usr/include/sparsehash/sparse_hash_set:132:20: error: 'ht' is not a class or namespace
   typedef typename ht::const_pointer pointer;
                    ^~
/usr/include/sparsehash/sparse_hash_set:133:20: error: 'ht' is not a class or namespace
   typedef typename ht::const_pointer const_pointer;
                    ^~
/usr/include/sparsehash/sparse_hash_set:134:20: error: 'ht' is not a class or namespace
   typedef typename ht::const_reference reference;
                    ^~
/usr/include/sparsehash/sparse_hash_set:135:20: error: 'ht' is not a class or namespace
   typedef typename ht::const_reference const_reference;
                    ^~
/usr/include/sparsehash/sparse_hash_set:137:20: error: 'ht' is not a class or namespace
   typedef typename ht::const_iterator iterator;
                    ^~
/usr/include/sparsehash/sparse_hash_set:138:20: error: 'ht' is not a class or namespace
   typedef typename ht::const_iterator const_iterator;
                    ^~
/usr/include/sparsehash/sparse_hash_set:139:20: error: 'ht' is not a class or namespace
   typedef typename ht::const_local_iterator local_iterator;
                    ^~
/usr/include/sparsehash/sparse_hash_set:140:20: error: 'ht' is not a class or namespace
   typedef typename ht::const_local_iterator const_local_iterator;
                    ^~
/usr/include/sparsehash/sparse_hash_set:153:3: error: 'allocator_type' does not name a type
   allocator_type get_allocator() const    { return rep.get_allocator(); }
   ^~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set:163:34: error: 'allocator_type' does not name a type
                            const allocator_type& alloc = allocator_type())
                                  ^~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set:172:25: error: 'allocator_type' does not name a type
                   const allocator_type& alloc = allocator_type())
                         ^~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set:281:20: error: 'ht' is not a class or namespace
   typedef typename ht::NopointerSerializer NopointerSerializer;
                    ^~
/usr/include/sparsehash/sparse_hash_set:163:58: error: there are no arguments to 'allocator_type' that depend on a template parameter, so a declaration of 'allocator_type' must be available [-fpermissive]
                            const allocator_type& alloc = allocator_type())
                                                          ^~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set:163:58: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/sparsehash/sparse_hash_set:172:49: error: there are no arguments to 'allocator_type' that depend on a template parameter, so a declaration of 'allocator_type' must be available [-fpermissive]
                   const allocator_type& alloc = allocator_type())
                                                 ^~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::iterator google::sparse_hash_set<Value, HashFcn>::begin() const':
/usr/include/sparsehash/sparse_hash_set:144:56: error: request for member 'begin' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   iterator begin() const                  { return rep.begin(); }
                                                        ^~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::iterator google::sparse_hash_set<Value, HashFcn>::end() const':
/usr/include/sparsehash/sparse_hash_set:145:56: error: request for member 'end' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   iterator end() const                    { return rep.end(); }
                                                        ^~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::local_iterator google::sparse_hash_set<Value, HashFcn>::begin(google::sparse_hash_set<Value, HashFcn>::size_type) const':
/usr/include/sparsehash/sparse_hash_set:148:56: error: request for member 'begin' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   local_iterator begin(size_type i) const { return rep.begin(i); }
                                                        ^~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::local_iterator google::sparse_hash_set<Value, HashFcn>::end(google::sparse_hash_set<Value, HashFcn>::size_type) const':
/usr/include/sparsehash/sparse_hash_set:149:56: error: request for member 'end' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   local_iterator end(size_type i) const   { return rep.end(i); }
                                                        ^~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::hasher google::sparse_hash_set<Value, HashFcn>::hash_funct() const':
/usr/include/sparsehash/sparse_hash_set:154:56: error: request for member 'hash_funct' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   hasher hash_funct() const               { return rep.hash_funct(); }
                                                        ^~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::key_equal google::sparse_hash_set<Value, HashFcn>::key_eq() const':
/usr/include/sparsehash/sparse_hash_set:156:56: error: request for member 'key_eq' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   key_equal key_eq() const                { return rep.key_eq(); }
                                                        ^~~~~~
/usr/include/sparsehash/sparse_hash_set: In constructor 'google::sparse_hash_set<Value, HashFcn>::sparse_hash_set(InputIterator, InputIterator, google::sparse_hash_set<Value, HashFcn>::size_type, const hasher&, const key_equal&, const int&)':
/usr/include/sparsehash/sparse_hash_set:174:9: error: request for member 'insert' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     rep.insert(f, l);
         ^~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::clear()':
/usr/include/sparsehash/sparse_hash_set:180:45: error: request for member 'clear' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   void clear()                        { rep.clear(); }
                                             ^~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::swap(google::sparse_hash_set<Value, HashFcn>&)':
/usr/include/sparsehash/sparse_hash_set:181:45: error: request for member 'swap' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   void swap(sparse_hash_set& hs)      { rep.swap(hs.rep); }
                                             ^~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::size_type google::sparse_hash_set<Value, HashFcn>::size() const':
/usr/include/sparsehash/sparse_hash_set:185:52: error: request for member 'size' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   size_type size() const              { return rep.size(); }
                                                    ^~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::size_type google::sparse_hash_set<Value, HashFcn>::max_size() const':
/usr/include/sparsehash/sparse_hash_set:186:52: error: request for member 'max_size' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   size_type max_size() const          { return rep.max_size(); }
                                                    ^~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'bool google::sparse_hash_set<Value, HashFcn>::empty() const':
/usr/include/sparsehash/sparse_hash_set:187:52: error: request for member 'empty' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   bool empty() const                  { return rep.empty(); }
                                                    ^~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::size_type google::sparse_hash_set<Value, HashFcn>::bucket_count() const':
/usr/include/sparsehash/sparse_hash_set:188:52: error: request for member 'bucket_count' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   size_type bucket_count() const      { return rep.bucket_count(); }
                                                    ^~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::size_type google::sparse_hash_set<Value, HashFcn>::max_bucket_count() const':
/usr/include/sparsehash/sparse_hash_set:189:52: error: request for member 'max_bucket_count' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   size_type max_bucket_count() const  { return rep.max_bucket_count(); }
                                                    ^~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::size_type google::sparse_hash_set<Value, HashFcn>::bucket_size(google::sparse_hash_set<Value, HashFcn>::size_type) const':
/usr/include/sparsehash/sparse_hash_set:192:60: error: request for member 'bucket_size' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   size_type bucket_size(size_type i) const    { return rep.bucket_size(i); }
                                                            ^~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::size_type google::sparse_hash_set<Value, HashFcn>::bucket(const key_type&) const':
/usr/include/sparsehash/sparse_hash_set:193:60: error: request for member 'bucket' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   size_type bucket(const key_type& key) const { return rep.bucket(key); }
                                                            ^~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'float google::sparse_hash_set<Value, HashFcn>::max_load_factor() const':
/usr/include/sparsehash/sparse_hash_set:199:9: error: request for member 'get_resizing_parameters' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
     rep.get_resizing_parameters(&shrink, &grow);
         ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::max_load_factor(float)':
/usr/include/sparsehash/sparse_hash_set:204:9: error: request for member 'get_resizing_parameters' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     rep.get_resizing_parameters(&shrink, &grow);
         ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set:205:9: error: request for member 'set_resizing_parameters' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     rep.set_resizing_parameters(shrink, new_grow);
         ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'float google::sparse_hash_set<Value, HashFcn>::min_load_factor() const':
/usr/include/sparsehash/sparse_hash_set:210:9: error: request for member 'get_resizing_parameters' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
     rep.get_resizing_parameters(&shrink, &grow);
         ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::min_load_factor(float)':
/usr/include/sparsehash/sparse_hash_set:215:9: error: request for member 'get_resizing_parameters' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     rep.get_resizing_parameters(&shrink, &grow);
         ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set:216:9: error: request for member 'set_resizing_parameters' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     rep.set_resizing_parameters(new_shrink, grow);
         ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::set_resizing_parameters(float, float)':
/usr/include/sparsehash/sparse_hash_set:220:9: error: request for member 'set_resizing_parameters' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     rep.set_resizing_parameters(shrink, grow);
         ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::resize(google::sparse_hash_set<Value, HashFcn>::size_type)':
/usr/include/sparsehash/sparse_hash_set:223:45: error: request for member 'resize' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   void resize(size_type hint)         { rep.resize(hint); }
                                             ^~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::iterator google::sparse_hash_set<Value, HashFcn>::find(const key_type&) const':
/usr/include/sparsehash/sparse_hash_set:227:67: error: request for member 'find' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   iterator find(const key_type& key) const           { return rep.find(key); }
                                                                   ^~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::size_type google::sparse_hash_set<Value, HashFcn>::count(const key_type&) const':
/usr/include/sparsehash/sparse_hash_set:229:67: error: request for member 'count' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   size_type count(const key_type& key) const         { return rep.count(key); }
                                                                   ^~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'std::pair<int, int> google::sparse_hash_set<Value, HashFcn>::equal_range(const key_type&) const':
/usr/include/sparsehash/sparse_hash_set:232:16: error: request for member 'equal_range' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
     return rep.equal_range(key);
                ^~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'std::pair<int, bool> google::sparse_hash_set<Value, HashFcn>::insert(const value_type&)':
/usr/include/sparsehash/sparse_hash_set:238:42: error: wrong number of template arguments (1, should be 2)
     std::pair<typename ht::iterator, bool> p = rep.insert(obj);
                                          ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/utility:70,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/algorithm:60,
                 from /usr/include/sparsehash/sparse_hash_set:92,
                 from /usr/include/google/sparse_hash_set:34,
                 from conftest.cpp:56:
/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/bits/stl_pair.h:208:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
     struct pair
            ^~~~
In file included from /usr/include/google/sparse_hash_set:34,
                 from conftest.cpp:56:
/usr/include/sparsehash/sparse_hash_set:238:52: error: request for member 'insert' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     std::pair<typename ht::iterator, bool> p = rep.insert(obj);
                                                    ^~~~~~
/usr/include/sparsehash/sparse_hash_set:239:40: error: request for member 'first' in 'p', which is of non-class type 'int'
     return std::pair<iterator, bool>(p.first, p.second);   // const to non-const
                                        ^~~~~
/usr/include/sparsehash/sparse_hash_set:239:49: error: request for member 'second' in 'p', which is of non-class type 'int'
     return std::pair<iterator, bool>(p.first, p.second);   // const to non-const
                                                 ^~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::insert(InputIterator, InputIterator)':
/usr/include/sparsehash/sparse_hash_set:242:9: error: request for member 'insert' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     rep.insert(f, l);
         ^~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::insert(google::sparse_hash_set<Value, HashFcn>::const_iterator, google::sparse_hash_set<Value, HashFcn>::const_iterator)':
/usr/include/sparsehash/sparse_hash_set:245:9: error: request for member 'insert' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     rep.insert(f, l);
         ^~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::set_deleted_key(const key_type&)':
/usr/include/sparsehash/sparse_hash_set:256:53: error: request for member 'set_deleted_key' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   void set_deleted_key(const key_type& key)   { rep.set_deleted_key(key); }
                                                     ^~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::clear_deleted_key()':
/usr/include/sparsehash/sparse_hash_set:257:53: error: request for member 'clear_deleted_key' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   void clear_deleted_key()                    { rep.clear_deleted_key(); }
                                                     ^~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::key_type google::sparse_hash_set<Value, HashFcn>::deleted_key() const':
/usr/include/sparsehash/sparse_hash_set:258:60: error: request for member 'deleted_key' in '((const google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'const ht' {aka 'const int'}
   key_type deleted_key() const                { return rep.deleted_key(); }
                                                            ^~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'google::sparse_hash_set<Value, HashFcn>::size_type google::sparse_hash_set<Value, HashFcn>::erase(const key_type&)':
/usr/include/sparsehash/sparse_hash_set:261:67: error: request for member 'erase' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   size_type erase(const key_type& key)               { return rep.erase(key); }
                                                                   ^~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::erase(google::sparse_hash_set<Value, HashFcn>::iterator)':
/usr/include/sparsehash/sparse_hash_set:262:60: error: request for member 'erase' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   void erase(iterator it)                            { rep.erase(it); }
                                                            ^~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'void google::sparse_hash_set<Value, HashFcn>::erase(google::sparse_hash_set<Value, HashFcn>::iterator, google::sparse_hash_set<Value, HashFcn>::iterator)':
/usr/include/sparsehash/sparse_hash_set:263:60: error: request for member 'erase' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   void erase(iterator f, iterator l)                 { rep.erase(f, l); }
                                                            ^~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'bool google::sparse_hash_set<Value, HashFcn>::serialize(ValueSerializer, OUTPUT*)':
/usr/include/sparsehash/sparse_hash_set:293:16: error: request for member 'serialize' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     return rep.serialize(serializer, fp);
                ^~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'bool google::sparse_hash_set<Value, HashFcn>::unserialize(ValueSerializer, INPUT*)':
/usr/include/sparsehash/sparse_hash_set:312:16: error: request for member 'unserialize' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
     return rep.unserialize(serializer, fp);
                ^~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'bool google::sparse_hash_set<Value, HashFcn>::write_metadata(OUTPUT*)':
/usr/include/sparsehash/sparse_hash_set:318:54: error: request for member 'write_metadata' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   bool write_metadata(OUTPUT *fp)       { return rep.write_metadata(fp); }
                                                      ^~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'bool google::sparse_hash_set<Value, HashFcn>::read_metadata(INPUT*)':
/usr/include/sparsehash/sparse_hash_set:321:54: error: request for member 'read_metadata' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   bool read_metadata(INPUT *fp)         { return rep.read_metadata(fp); }
                                                      ^~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'bool google::sparse_hash_set<Value, HashFcn>::write_nopointer_data(OUTPUT*)':
/usr/include/sparsehash/sparse_hash_set:324:54: error: request for member 'write_nopointer_data' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   bool write_nopointer_data(OUTPUT *fp) { return rep.write_nopointer_data(fp); }
                                                      ^~~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In member function 'bool google::sparse_hash_set<Value, HashFcn>::read_nopointer_data(INPUT*)':
/usr/include/sparsehash/sparse_hash_set:327:54: error: request for member 'read_nopointer_data' in '((google::sparse_hash_set<Value, HashFcn>*)this)->google::sparse_hash_set<Value, HashFcn>::rep', which is of non-class type 'google::sparse_hash_set<Value, HashFcn>::ht' {aka 'int'}
   bool read_nopointer_data(INPUT *fp)   { return rep.read_nopointer_data(fp); }
                                                      ^~~~~~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: At global scope:
/usr/include/sparsehash/sparse_hash_set:331:63: error: wrong number of template arguments (4, should be at least 1)
 inline void swap(sparse_hash_set<Val, HashFcn, EqualKey, Alloc>& hs1,
                                                               ^
/usr/include/sparsehash/sparse_hash_set:106:7: note: provided for 'template<class Value, class HashFcn> class google::sparse_hash_set'
 class sparse_hash_set {
       ^~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set:332:63: error: wrong number of template arguments (4, should be at least 1)
                  sparse_hash_set<Val, HashFcn, EqualKey, Alloc>& hs2) {
                                                               ^
/usr/include/sparsehash/sparse_hash_set:106:7: note: provided for 'template<class Value, class HashFcn> class google::sparse_hash_set'
 class sparse_hash_set {
       ^~~~~~~~~~~~~~~
/usr/include/sparsehash/sparse_hash_set: In function 'void google::swap(int&, int&)':
/usr/include/sparsehash/sparse_hash_set:333:7: error: request for member 'swap' in 'hs1', which is of non-class type 'int'
   hs1.swap(hs2);
       ^~~~
configure:5164: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "sga"
| #define PACKAGE_TARNAME "sga"
| #define PACKAGE_VERSION "0.10.15"
| #define PACKAGE_STRING "sga 0.10.15"
| #define PACKAGE_BUGREPORT "js18@sanger.ac.uk"
| #define PACKAGE_URL ""
| #define PACKAGE "sga"
| #define VERSION "0.10.15"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_CLOCK_GETTIME 1
| #define HAVE_OPENMP 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <google/sparse_hash_set>
configure:5164: result: no
configure:5164: checking google/sparse_hash_set presence
configure:5164: x86_64-pc-linux-gnu-g++ -E  -fopenmp  -I/usr/include -I/usr/include/bamtools conftest.cpp
configure:5164: $? = 0
configure:5164: result: yes
configure:5164: WARNING: google/sparse_hash_set: present but cannot be compiled
configure:5164: WARNING: google/sparse_hash_set:     check for missing prerequisite headers?
configure:5164: WARNING: google/sparse_hash_set: see the Autoconf documentation
configure:5164: WARNING: google/sparse_hash_set:     section "Present But Cannot Be Compiled"
configure:5164: WARNING: google/sparse_hash_set: proceeding with the compiler's result
configure:5164: checking for google/sparse_hash_set
configure:5164: result: no
configure:5171: error: google sparse hash library is required: http://code.google.com/p/google-sparsehash/

I dropped the -std=c++98 and now configure checks passed:

--- src/configure.ac.old    2019-04-04 10:22:22.113290603 +0200
+++ src/configure.ac    2019-04-04 10:47:31.362115204 +0200
@@ -92,8 +92,6 @@

 # Set compiler flags.
 AC_SUBST(AM_CXXFLAGS, "-Wall -Wextra $fail_on_warning -Wno-unknown-pragmas")
-AC_SUBST(CXXFLAGS, "-std=c++98 -O3")
-AC_SUBST(CFLAGS, "-std=gnu99 -O3")
 AC_SUBST(CPPFLAGS, "$CPPFLAGS $openmp_cppflags $sparsehash_include $bamtools_include")
 AC_SUBST(LDFLAGS, "$openmp_cppflags $external_malloc_ldflags $bamtools_ldflags $LDFLAGS")

Now configure works:

configure:5164: checking google/sparse_hash_set usability
configure:5164: x86_64-pc-linux-gnu-g++ -c   -fopenmp  -I/usr/include -I/usr/include/bamtools conftest.cpp >&5
configure:5164: $? = 0
configure:5164: result: yes
configure:5164: checking google/sparse_hash_set presence
configure:5164: x86_64-pc-linux-gnu-g++ -E  -fopenmp  -I/usr/include -I/usr/include/bamtools conftest.cpp
configure:5164: $? = 0
configure:5164: result: yes
configure:5164: checking for google/sparse_hash_set
configure:5164: result: yes
configure:5185: checking for google/sparse_hash_set
configure:5185: result: yes
configure:5185: checking google/sparse_hash_map usability
configure:5185: x86_64-pc-linux-gnu-g++ -c   -fopenmp  -I/usr/include -I/usr/include/bamtools conftest.cpp >&5
configure:5185: $? = 0
configure:5185: result: yes
configure:5185: checking google/sparse_hash_map presence
configure:5185: x86_64-pc-linux-gnu-g++ -E  -fopenmp  -I/usr/include -I/usr/include/bamtools conftest.cpp
configure:5185: $? = 0
configure:5185: result: yes
configure:5185: checking for google/sparse_hash_map
configure:5185: result: yes
configure:5185: checking unordered_map usability
configure:5185: x86_64-pc-linux-gnu-g++ -c   -fopenmp  -I/usr/include -I/usr/include/bamtools conftest.cpp >&5
configure:5185: $? = 0
configure:5185: result: yes

But, the sga code needs some more tweaks or src/Util/Makefile and src/SGA/Makefile need to append -std=c++98 to CXXFLAGS:

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I../Bigraph -I../Thirdparty -fopenmp  -I/usr/include -I/usr/include/bamtools -Wall -Wextra  -Wno-unknown-pragmas -g -O2 -c -o libutil_a-ClusterReader.o `test -f 'ClusterReader.cpp' || echo './'`ClusterReader.cpp
ClusterReader.cpp: In member function 'bool ClusterReader::readCluster(ClusterRecord&)':
ClusterReader.cpp:70:41: error: cannot convert 'std::basic_istream<char>' to 'bool' in initialization
     bool good = getline(*m_pReader, line);
                                         ^
make[2]: *** [Makefile:753: libutil_a-ClusterReader.o] Error 1
make[2]: Leaving directory '/scratch/var/tmp/portage/sci-biology/sga-9999/work/sga-9999/src/Util'
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I../Bigraph -I../Thirdparty -fopenmp  -I/usr/include -I/usr/include/bamtools -Wall -Wextra  -Wno-unknown-pragmas -g -O2 -c -o libutil_a-StdAlnTools.o `test -f 'StdAlnTools.cpp' || echo './'`StdAlnTools.cpp
StdAlnTools.cpp: In function 'std::__cxx11::string StdAlnTools::expandCigar(const string&)':
StdAlnTools.cpp:122:34: error: cannot convert 'std::basic_istream<char>' to 'bool' in initialization
         bool success = parser >> code;
                                  ^~~~
...
make[2]: Leaving directory '/scratch/var/tmp/portage/sci-biology/sga-9999/work/sga-9999/src/Util'
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..  -I../Util -I../Bigraph -I../SuffixTools -I../StringGraph -I../Concurrency -I../Algorithm -I../SQG -I../Scaffold -I../GraphDiff -I../Thirdparty -fopenmp  -I/usr/include -I/usr/include/bamtools -Wall -Wextra  -Wno-unknown-pragmas -g -O2 -c -o sga-rmdup.o `test -f 'rmdup.cpp' || echo './'`rmdup.cpp
rmdup.cpp: In function 'std::__cxx11::string parseDupHits(const StringVector&, const string&)':
rmdup.cpp:235:62: error: cannot convert 'std::basic_istream<char>' to 'bool' in initialization
         bool valid = getline(*reader_vec[currReaderIdx], line);
                                                              ^
make[2]: *** [Makefile:621: sga-rmdup.o] Error 1
make[2]: Leaving directory '/scratch/var/tmp/portage/sci-biology/sga-9999/work/sga-9999/src/SGA'
jts commented 5 years ago

Thanks @mmokrejs for the detailed report.

Do you remember how you configured your installation of sparsehash? It should not be looking for std::hash and should have no problems compiling with -std=c++98. I see you've reported a very similar issue here: https://github.com/bcgsc/abyss/issues/225. Was this ever resolved?

mmokrejs commented 5 years ago
>>> Preparing source in /scratch/var/tmp/portage/dev-cpp/sparsehash-2.0.3-r1/work/sparsehash-sparsehash-2.0.3 ...
 * Applying sparsehash-2.0.3-fix-buildsystem.patch ...                                                                                                           [ ok ]
 * Running eautoreconf in '/scratch/var/tmp/portage/dev-cpp/sparsehash-2.0.3-r1/work/sparsehash-sparsehash-2.0.3' ...
 * Running aclocal -I m4 ...                                                                                                                                     [ ok ]
 * Running autoconf --force ...                                                                                                                                  [ ok ]
 * Running autoheader ...                                                                                                                                        [ ok ]
 * Running automake --add-missing --copy --force-missing ...                                                                                                     [ ok ]
 * Running elibtoolize in: sparsehash-sparsehash-2.0.3/
>>> Source prepared.
>>> Configuring source in /scratch/var/tmp/portage/dev-cpp/sparsehash-2.0.3-r1/work/sparsehash-sparsehash-2.0.3 ...
 * econf: updating sparsehash-sparsehash-2.0.3/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating sparsehash-sparsehash-2.0.3/config.guess with /usr/share/gnuconfig/config.guess
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/sparsehash-2.0.3-r1 --htmldir=/usr/share/doc/sparsehash-2.0.3-r1/html --libdir=/usr/lib64
...

It was built with gcc-8.2.0 or 8.3.0. No special CFLAGS/CXXFLAGS fiddling with -std or similar.

No, the issue in abyss was not solved.

jts commented 5 years ago

Thanks. I don't see anything there would cause a problem. Can you paste the contents of your sparsehash/internal/sparseconfig.h file?

mmokrejs commented 5 years ago
$ cat /usr/include/sparsehash/internal/sparseconfig.h
/*
 * NOTE: This file is for internal use only.
 *       Do not use these #defines in your own program!
 */

/* Namespace for Google classes */
#define GOOGLE_NAMESPACE ::google

/* the location of the header defining hash functions */
#define HASH_FUN_H <functional>

/* the namespace of the hash<> function */
#define HASH_NAMESPACE std

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if the system has the type `long long'. */
#define HAVE_LONG_LONG 1

/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if the system has the type `uint16_t'. */
#define HAVE_UINT16_T 1

/* Define to 1 if the system has the type `u_int16_t'. */
#define HAVE_U_INT16_T 1

/* Define to 1 if the system has the type `__uint16'. */
/* #undef HAVE___UINT16 */

/* The system-provided hash function including the namespace. */
#define SPARSEHASH_HASH HASH_NAMESPACE::hash

/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }

/* Puts following code inside the Google namespace */
#define _START_GOOGLE_NAMESPACE_ namespace google {
$
jts commented 5 years ago

Ok, that confirms your sparsehash is configured to assume c++11 hash functions are available.

I am reluctant to change the dialect to c++11 just over this issue. SGA is no longer used for assembly very often but some subprograms it contains are still useful. Perhaps I should default to using the standard hash map if sparsehash is unavailable instead of dying.

numpde commented 4 years ago

FWIW, I was able to compile with c++11 with the following changes:

configure.ac AC_SUBST(CXXFLAGS, "-std=c++11 -O3")

ClusterReader.cpp bool good = static_cast<bool>(getline(*m_pReader, line));

rmdup.cpp bool valid = static_cast<bool>(getline(*reader_vec[currReaderIdx], line));