Unable to compile geoviewer-3.1-5 from source with python-3.9

GCC version is 9.3.0. There was no such problem with python-3.6.

Should i roll back to python-3.6 or there is a way to fix it?

The output:

c++ -c geometryobject.cc -m64 -g -DUNIX -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD  -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -Wno-class-memaccess -fwrapv -fstack-protector -fpic -fno-strict-aliasing -I. -I.. -I/usr/include -I/usr/include/python3.9 -I/usr/include/python3.9
make[1]: Leaving directory '/tmp/flair-geoviewer-3.1/math'
c++ -c viewerobject.cc -m64 -g -DUNIX -O3 -funroll-loops -DNDEBUG -D_DEBUG=0 -ftree-vectorize -DTHREAD  -std=c++11 -pedantic -W -Wall -Wcast-align -Wcast-qual -Wextra -Wformat -Wpointer-arith -Wredundant-decls -Wshadow -Wno-write-strings -Wno-long-long -Wno-non-virtual-dtor -Wno-variadic-macros -Woverloaded-virtual -Wpointer-arith -Wshadow -Wunused -Wuninitialized -Wwrite-strings -Wshadow -pipe -pthread -Wno-class-memaccess -fwrapv -fstack-protector -fpic -fno-strict-aliasing -I. -I.. -I/usr/include -I/usr/include/python3.9 -I/usr/include/python3.9
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/tmp/flair-geoviewer-3.1/farm'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/tmp/flair-geoviewer-3.1/data'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/tmp/flair-geoviewer-3.1/xdraw'
geometryobject.cc:2146:1: error: too many initializers for 'PyTypeObject' {aka '_typeobject'}
 2146 | }; // GeometryType
      | ^
viewerobject.cc:4734:1: error: too many initializers for 'PyTypeObject' {aka '_typeobject'}
 4734 | }; // ViewerType
      | ^

Dear @Mik, which version of linux you are using?

The distribution is Slackware64-current.

Apologies for too early bothering, but after some tests i have reinstalled previous python-3.8.5, and now everything works without troubles.

This thread can be closed.

No worries, its better to fix things early.
It seems that python 3.9 removed the deprecated tp_print member from the object classes. I am protecting it under a conditional for python 3.9.
The correction will be in the next flair release 3.1-6 quite soon.
Many thanks for reporting.