Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with gcc-13 #30

Open
wants to merge 1 commit into
base: cram-support
Choose a base branch
from

Conversation

HippocampusGirl
Copy link

The new compiler version gcc-13 stops including the <cstdint> header by default (see here and here) which leads to an error when trying to build libStatGen.

g++  --std=c++11 -I$SRC_DIR/cget/include -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/raremetal-4.15.1 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix   -fopenmp -g  -I../include -I.   -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS  -o obj/SamFile.o -c SamFile.cpp -DVERSION="\"1.0.0\""
In file included from SamRecord.h:24,
                 from SamFile.h:24,
                 from SamFile.cpp:18:
../include/GenomeSequence.h:99:7: warning: ‘GenomeSequence’ declared with greater visibility than its base ‘MemoryMapArray<unsigned int, unsigned int, 460927905, 20100401, PackedAccess_4Bit<char*>, PackedAssign_4Bit<char*>, Packed4BitElementCount2Bytes, genomeSequenceMmapHeader>’ [-Wattributes]
   99 | class GenomeSequence : public genomeSequenceArray
      |       ^~~~~~~~~~~~~~
In file included from SamFile.h:25:
GenericSamInterface.h:40:57: error: ‘std::int32_t’ has not been declared
   40 |     bool setReadSection(const char*const ref_name, std::int32_t beg = 0, std::int32_t end = INT_MAX);
      |                                                         ^~~~~~~
GenericSamInterface.h:40:79: error: ‘std::int32_t’ has not been declared
   40 |     bool setReadSection(const char*const ref_name, std::int32_t beg = 0, std::int32_t end = INT_MAX);
      |                                                                               ^~~~~~~
GenericSamInterface.h:41:30: error: ‘std::int32_t’ has not been declared
   41 |     bool setReadSection(std::int32_t ref_id, std::int32_t beg = 0, std::int32_t end = INT_MAX);
      |                              ^~~~~~~
GenericSamInterface.h:41:51: error: ‘std::int32_t’ has not been declared
   41 |     bool setReadSection(std::int32_t ref_id, std::int32_t beg = 0, std::int32_t end = INT_MAX);
      |                                                   ^~~~~~~
GenericSamInterface.h:41:73: error: ‘std::int32_t’ has not been declared
   41 |     bool setReadSection(std::int32_t ref_id, std::int32_t beg = 0, std::int32_t end = INT_MAX);
      |                                                                         ^~~~~~~
SamFile.cpp: In member function ‘bool SamFile::SetReadSection(const char*, int32_t, int32_t, bool)’:
SamFile.cpp:796:98: error: ‘uint32_t’ is not a member of ‘std’; did you mean ‘wint_t’?
  796 |     return(myInterfacePtr->setReadSection(refName, (start == -1 ? 0 : start), (end == -1 ? (std::uint32_t)-1 : end)));
      |                                                                                                  ^~~~~~~~
      |                                                                                                  wint_t

This patch fixes the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant