Skip to content

Can't build from source #77

Description

@7PintsOfCherryGarcia

Get the following compilation error when compiling ntHashIterator.hpp:
Building on Fedora 36
gcc (GCC) 12.2.1 20221121

g++ -DHAVE_CONFIG_H -I.  -I./Common -I/home/jregalado/Software/ntCard -fopenmp  -Wall -Wextra -Werror -O3 -MT ntcard-ntcard.o -MD -MP -MF .deps/ntcard-ntcard.Tpo -c -o ntcard-ntcard.o `test -f 'ntcard.cpp' || echo './'`ntcard.cpp
In file included from vendor/ntHash/ntHashIterator.hpp:6,
                 from ntcard.cpp:2:
In function ‘bool NTMC64(const char*, unsigned int, unsigned int, uint64_t&, uint64_t&, unsigned int&, uint64_t*)’,
    inlined from ‘bool NTMC64(const char*, unsigned int, unsigned int, uint64_t&, uint64_t&, unsigned int&, uint64_t*)’ at vendor/ntHash/nthash.hpp:467:13,
    inlined from ‘void ntHashIterator::init()’ at vendor/ntHash/ntHashIterator.hpp:66:53,
    inlined from ‘ntHashIterator::ntHashIterator(const std::string&, unsigned int, unsigned int)’ at vendor/ntHash/ntHashIterator.hpp:41:13,
    inlined from ‘void ntRead(const std::string&, const std::vector<unsigned int>&, uint16_t*, size_t*)’ at ntcard.cpp:151:38:
vendor/ntHash/nthash.hpp:489:17: error: array subscript 1 is outside array bounds of ‘void [8]’ [-Werror=array-bounds]
  489 |         hVal[i] =  tVal;
      |         ~~~~~~~~^~~~~~~
In constructor ‘ntHashIterator::ntHashIterator(const std::string&, unsigned int, unsigned int)’,
    inlined from ‘void ntRead(const std::string&, const std::vector<unsigned int>&, uint16_t*, size_t*)’ at ntcard.cpp:151:38:
vendor/ntHash/ntHashIterator.hpp:39:58: note: at offset 8 into object of size 8 allocated by ‘operator new []’
   39 |      m_seq(seq), m_h(h), m_k(k), m_hVec(new uint64_t[h]), m_pos(0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions