Gcc 6.5 compilation issue on ubuntu 20.04

In file included from ../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:186:0:
../../.././libsanitizer/sanitizer_common/sanitizer_internal_defs.h:254:72: error: size of array ‘assertion_failed__1135’ is negative
typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
^
../../.././libsanitizer/sanitizer_common/sanitizer_internal_defs.h:248:30: note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, LINE)
^~~~~~~~~~~~~~~~~~~~
../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1424:3: note: in expansion of macro ‘COMPILER_CHECK’
COMPILER_CHECK(sizeof(((_sanitizer##CLASS *) NULL)->MEMBER) ==
^~~~~~~~~~~~~~
../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1135:1: note: in expansion of macro ‘CHECK_SIZE_AND_OFFSET’
CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
^~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:477: sanitizer_platform_limits_posix.lo] Error 1
make[4]: Leaving directory '/nlsasfs/home/sysadmin/pankajd/gcc-6.5/gcc-6.5.0/x86_64-pc-linux-gnu/libsanitizer/sanitizer_common'
make[3]: *** [Makefile:466: all-recursive] Error 1
make[3]: Leaving directory '/nlsasfs/home/sysadmin/pankajd/gcc-6.5/gcc-6.5.0/x86_64-pc-linux-gnu/libsanitizer'
make[2]: *** [Makefile:336: all] Error 2
make[2]: Leaving directory '/nlsasfs/home/sysadmin/pankajd/gcc-6.5/gcc-6.5.0/x86_64-pc-linux-gnu/libsanitizer'
make[1]: *** [Makefile:17009: all-target-libsanitizer] Error 2
make[1]: Leaving directory '/nlsasfs/home/sysadmin/pankajd/gcc-6.5/gcc-6.5.0'
make: *** [Makefile:924: all] Error 2