Issue with building the image

Hi,
I'm newbie and need your big help to start with.
I'm following the toolchain quide provided by this link https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem to build the image under version 19.07.10. I am targeting the x86 with Generic subtarget build for the Ubuntu 20.04 OS. I have preinstalled all the dependencies mentioned in build setup instructions for Debian. While invoking the make command to finish building I end up with the following output errors:

/home/taras/openwrt/build_dir/host/cmake-3.15.1/Source/cmWorkerPool.h:36:10: error: 'int64_t' in namespace 'std' does not name a type
   36 |     std::int64_t ExitStatus = 0;
      |          ^~~~~~~
/home/taras/openwrt/build_dir/host/cmake-3.15.1/Source/cmWorkerPool.h: In member function 'bool cmWorkerPool::ProcessResultT::error() const':
/home/taras/openwrt/build_dir/host/cmake-3.15.1/Source/cmWorkerPool.h:33:15: error: 'ExitStatus' was not declared in this scope
   33 |       return (ExitStatus != 0) || (TermSignal != 0) || !ErrorMessage.empty();

home/taras/openwrt/build_dir/host/cmake-3.15.1/Source/cmWorkerPool.cxx: In static member function 'static void cmUVReadOnlyProcess::UVExit(uv_process_t*, int64_t, int)':
/home/taras/openwrt/build_dir/host/cmake-3.15.1/Source/cmWorkerPool.cxx:303:20: error: 'struct cmWorkerPool::ProcessResultT' has no member named 'ExitStatus'
  303 |     proc.Result()->ExitStatus = exitStatus;
      |                    ^~~~~~~~~~

I may assume I might have missed to install some setup packages but I can't figure out what those to be.

Why such an outdated release?

frollic, just to play with it , it doesn't actually matter the version would be. What I observed it was that the GCC was incorrect since I had 13 version, and it looks lilke it works good with gcc 10.

I just ran into this same issue, and managed to fix that error by following a suggestion offered here: https://gitlab.kitware.com/vtk/vtk/-/issues/18782

So in other words, added the line:
#include <cstdint>
to the file:
build_dir/host/cmake-3.15.1/Source/cmWorkerPool.h:

So that part of the file looks like this now:

#include <stdint.h>
#include <string>
#include <utility>
#include <vector>
#include <cstdint>

// -- Types
class cmWorkerPoolInternal;

Surprisingly enough, this was the only change I needed to make for a successful compile of OpenWrt v19.07.10 on Ubuntu 23.10 mantic.

The packages I installed over stock server iso, were:
build-essential libncurses-dev unzip libpam-dev libgnutls28-dev libldap-dev libidn2-dev libssh2-1-dev libcap-dev libnetsnmptrapd40 libjansson-dev

I also had to build python2.7 from source as that is not included anymore in the repos, which was easy enough:

wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar xzf Python-2.7.9.tgz
cd Python-2.7.9
sudo ./configure --enable-optimizations
sudo make altinstall