Building calibre 4.23 on Odroid C2

Hi,
I’m trying to build newest calibre version on my dietpi running on Odroid C2
Where I am getting stuck is that it requires python-sip and PyQt5 and trying to build python-sip it throws the following error:

/sip-5.3.1.dev2008131208 » python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to sip.egg-info/requires.txt
writing sip.egg-info/PKG-INFO
writing top-level names to sip.egg-info/top_level.txt
writing dependency_links to sip.egg-info/dependency_links.txt
writing entry points to sip.egg-info/entry_points.txt
reading manifest file 'sip.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'sip.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
running build_ext
building 'sipbuild.code_generator' extension
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QCkEc0/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icode_generator -I/usr/include/python2.7 -c code_generator/export.c -o build/temp.linux-aarch64-2.7/code_generator/export.o
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QCkEc0/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icode_generator -I/usr/include/python2.7 -c code_generator/extracts.c -o build/temp.linux-aarch64-2.7/code_generator/extracts.o
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QCkEc0/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icode_generator -I/usr/include/python2.7 -c code_generator/gencode.c -o build/temp.linux-aarch64-2.7/code_generator/gencode.o
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QCkEc0/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icode_generator -I/usr/include/python2.7 -c code_generator/heap.c -o build/temp.linux-aarch64-2.7/code_generator/heap.o
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QCkEc0/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icode_generator -I/usr/include/python2.7 -c code_generator/lexer.c -o build/temp.linux-aarch64-2.7/code_generator/lexer.o
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QCkEc0/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icode_generator -I/usr/include/python2.7 -c code_generator/parser.c -o build/temp.linux-aarch64-2.7/code_generator/parser.o
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-QCkEc0/python2.7-2.7.16=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Icode_generator -I/usr/include/python2.7 -c code_generator/pybinding.c -o build/temp.linux-aarch64-2.7/code_generator/pybinding.o
code_generator/pybinding.c: In function ‘PyInit_code_generator’:
code_generator/pybinding.c:81:12: error: unknown type name ‘PyModuleDef’
     static PyModuleDef module_def = {
            ^~~~~~~~~~~
code_generator/pybinding.c:82:9: error: ‘PyModuleDef_HEAD_INIT’ undeclared (first use in this function); did you mean ‘PyObject_HEAD_INIT’?
         PyModuleDef_HEAD_INIT,
         ^~~~~~~~~~~~~~~~~~~~~
         PyObject_HEAD_INIT
code_generator/pybinding.c:82:9: note: each undeclared identifier is reported only once for each function it appears in
code_generator/pybinding.c:83:9: warning: excess elements in scalar initializer
         "sipbuild.code_generator",  /* m_name */
         ^~~~~~~~~~~~~~~~~~~~~~~~~
code_generator/pybinding.c:83:9: note: (near initialization for ‘module_def’)
code_generator/pybinding.c:84:9: warning: excess elements in scalar initializer
         NULL,                       /* m_doc */
         ^~~~
code_generator/pybinding.c:84:9: note: (near initialization for ‘module_def’)
code_generator/pybinding.c:85:9: warning: excess elements in scalar initializer
         -1,                         /* m_size */
         ^
code_generator/pybinding.c:85:9: note: (near initialization for ‘module_def’)
code_generator/pybinding.c:86:9: warning: excess elements in scalar initializer
         methods,                    /* m_methods */
         ^~~~~~~
code_generator/pybinding.c:86:9: note: (near initialization for ‘module_def’)
code_generator/pybinding.c:87:9: warning: excess elements in scalar initializer
         NULL,                       /* m_reload */
         ^~~~
code_generator/pybinding.c:87:9: note: (near initialization for ‘module_def’)
code_generator/pybinding.c:88:9: warning: excess elements in scalar initializer
         NULL,                       /* m_traverse */
         ^~~~
code_generator/pybinding.c:88:9: note: (near initialization for ‘module_def’)
code_generator/pybinding.c:89:9: warning: excess elements in scalar initializer
         NULL,                       /* m_clear */
         ^~~~
code_generator/pybinding.c:89:9: note: (near initialization for ‘module_def’)
code_generator/pybinding.c:90:9: warning: excess elements in scalar initializer
         NULL,                       /* m_free */
         ^~~~
code_generator/pybinding.c:90:9: note: (near initialization for ‘module_def’)
code_generator/pybinding.c:93:12: warning: implicit declaration of function ‘PyModule_Create’; did you mean ‘PyModule_Check’? [-Wimplicit-function-declaration]
     return PyModule_Create(&module_def);
            ^~~~~~~~~~~~~~~
            PyModule_Check
code_generator/pybinding.c:93:12: warning: ‘return’ with a value, in function returning void
     return PyModule_Create(&module_def);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
code_generator/pybinding.c:68:16: note: declared here
 PyMODINIT_FUNC PyInit_code_generator(void)
                ^~~~~~~~~~~~~~~~~~~~~
code_generator/pybinding.c: In function ‘fs_convertor’:
code_generator/pybinding.c:329:18: warning: implicit declaration of function ‘PyUnicode_EncodeFSDefault’; did you mean ‘PyUnicode_EncodeDecimal’? [-Wimplicit-function-declaration]
     if ((bytes = PyUnicode_EncodeFSDefault(obj)) == NULL)
                  ^~~~~~~~~~~~~~~~~~~~~~~~~
                  PyUnicode_EncodeDecimal
code_generator/pybinding.c:329:16: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
     if ((bytes = PyUnicode_EncodeFSDefault(obj)) == NULL)
                ^
code_generator/pybinding.c: In function ‘stringList_convert_from’:
code_generator/pybinding.c:391:18: warning: implicit declaration of function ‘PyUnicode_DecodeLocale’; did you mean ‘PyUnicode_DecodeLatin1’? [-Wimplicit-function-declaration]
         if ((s = PyUnicode_DecodeLocale(sl->s, NULL)) == NULL)
                  ^~~~~~~~~~~~~~~~~~~~~~
                  PyUnicode_DecodeLatin1
code_generator/pybinding.c:391:16: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
         if ((s = PyUnicode_DecodeLocale(sl->s, NULL)) == NULL)
                ^
code_generator/pybinding.c: In function ‘extend_stringList’:
code_generator/pybinding.c:422:24: warning: implicit declaration of function ‘PyUnicode_EncodeLocale’; did you mean ‘PyUnicode_EncodeLatin1’? [-Wimplicit-function-declaration]
         PyObject *el = PyUnicode_EncodeLocale(PyList_GET_ITEM(py_list, i),
                        ^~~~~~~~~~~~~~~~~~~~~~
                        PyUnicode_EncodeLatin1
code_generator/pybinding.c:422:24: warning: initialization of ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

Any idea how can I fix it?

EDIT:
In fact python-sip seems to be present in my system (as a dependency of calibre from debian repos), but I still get:

 python setup.py install

*
* Running build
*

Traceback (most recent call last):
  File "setup.py", line 122, in <module>
    sys.exit(main())
  File "setup.py", line 107, in main
    command.run_all(opts)
  File "/root/calibre-4.23.0/setup/__init__.py", line 251, in run_all
    self.run_cmd(self, opts)
  File "/root/calibre-4.23.0/setup/__init__.py", line 243, in run_cmd
    self.run_cmd(scmd, opts)
  File "/root/calibre-4.23.0/setup/__init__.py", line 247, in run_cmd
    cmd.run(opts)
  File "/root/calibre-4.23.0/setup/build.py", line 267, in run
    self.env = init_env()
  File "/root/calibre-4.23.0/setup/build.py", line 157, in init_env
    from setup.build_environment import msvc, is64bit, win_inc, win_lib, NMAKE
  File "/root/calibre-4.23.0/setup/build_environment.py", line 120, in <module>
    pyqt['pyqt_sip_dir'] = get_sip_dir()
  File "/root/calibre-4.23.0/setup/build_environment.py", line 117, in get_sip_dir
    raise EnvironmentError('Failed to find the location of the PyQt5 .sip files')
EnvironmentError: Failed to find the location of the PyQt5 .sip files



  locate python-sip                                               1 ↵
/usr/share/doc/python-sip
/usr/share/doc/python-sip/NEWS.gz
/usr/share/doc/python-sip/changelog.Debian.gz
/usr/share/doc/python-sip/changelog.gz
/usr/share/doc/python-sip/copyright
/var/lib/dpkg/info/python-sip.list
/var/lib/dpkg/info/python-sip.md5sums
/var/lib/dpkg/info/python-sip.postinst
/var/lib/dpkg/info/python-sip.prerm

So I don’t see any binaries of python-sip there, but I installed that package via apt, and calibre 3.39.1 from the repository works fine. Why can’t I build the newer one?