Please find the below details
>>> on which platform?
I am running a build for x86_64 64-bit architecture, and tried in arm 32 bit too.
>>> in 32-bit mode or in 64-bit mode?
so in both mode it fails with the same error
>>> which were the values of CC, CXX, CFLAGS, CXXFLAGS, CPPFLAGS
for x86_64 64-bit
CC=x86_64-xx-linux-gnu-gcc
CXX=x86_64-xx-linux-gnu-g++
CFLAGS="-Os -g -pipe"
CXXFLAGS="-Os -g -pipe"
Tried passing -fcommon too, but no improvement
CFLAGS="-fcommon -Os -g -pipe"
for arm32 bit
CC=armv7l-xx-linux-gnueabihf-gcc
CXX=armv7l-xx-linux-gnueabihf-g++
CFLAGS="-Os -g -pipe"
CXXFLAGS="-Os -g -pipe"
and the configure options which I am passing
--enable-shared --disable-java --disable-csharp --enable-nls --disable-openmp --with-included-glib --without-emacs --without-git --without-libiconv --without-bzip2 --without-libxml-prefix --with-included-libxml --without-xz --with-ncurses --with-libncurses-prefix=PATH_TO_TOOLCHAIN --enable-c++
It seems the error is because of the gcc change, I think we need to change the macro definition of the error.h.diff
https://gcc.gnu.org/gcc-10/porting_to.html