Closed shyamrallapalli closed 6 years ago
Hi, this appears to be due to older glibc implementations demanding the use of STDC_LIMIT_MACROS and STDC_CONSTANT_MACROS to get those values defined. That behavior was appropriate for C99, but is non-standard for C++11 (see https://sourceware.org/bugzilla/show_bug.cgi?id=15366).
I don't have access to an old implementation of glibc; if the following code is added to the end of kraken2_headers.h, would that solve your compilation problems? If so, I think that's a fix I can easily commit.
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t) -1)
#endif
#ifndef UINT64_MAX
#define UINT64_MAX ((uint64_t) -1)
#endif
Hi @DerrickWood , yes that fixes it here is my glibc version for record
ldd --version
ldd (GNU libc) 2.12
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.
Written by Roland McGrath and Ulrich Drepper.
OK, I've added the definition of those constants in https://github.com/DerrickWood/kraken2/commit/1bad13827d9c5d81337cc6ea53ec33ace389db4a, should help others similarly situated to you.
my linux distribution is
CentOS release 6.7 (Final)
compiled kraken2 with gcc-4.9.3fixed it based on suggestion in the following post https://stackoverflow.com/a/42097570
That lead to next issue
fixed it based on the suggestion from following post https://stackoverflow.com/a/3233069
posting the patch here as a solution for any one facing this issue fix_install_kraken2.patch.txt