So lets try again... This source on git might be better
https://github.com/ChrisMacGregor/esp-o ... untu-21.10...
However, its first step, is wrong, the documentation is wrong, it directs the user to the ORIGINAL git source, which we know is already badly broken and can't work as tested above, previously. Moreover, neither example makes the point that there are know issues with cross-tool-NG under root. This is a major issue, omission that will drive users nuts. So the real initial steps should be...
# apt install sudo
# adduser crosstoolng
# usermod -aG sudo crosstoolng
# login crosstoolng
$ pwd
/home/crosstoolng
$ sudo apt-get install make unrar-free autoconf automake libtool gcc g++ gperf flex bison texinfo gawk ncurses-dev libexpat-dev python3-dev python3 python3-serial sed git unzip bash help2man wget bzip2
$ sudo apt-get install libtool-bin
NOTE: Corrected the references to python as now python3, so that no assumptions are made or accepted. This is another issue with the dated nature of the original git repo documentation and same bad assumption inherited by the forked instance. Again, appears that NO ONE is updating anything.
Using the correct git close source, for this variant
git clone --recursive https://github.co ... en-sdk.git. I was able to at least get the make command to work for most of the tool chain generation.
$ git clone --recursive
https://github.com/ChrisMacGregor/esp-open-sdk.git
$ cd esp-open-sdk
$ make
Since I am generating the tool-chain in a virtual machine it does take a while, but after about 20 minutes of compiling we have yet another error! Why am I not surprised. But, the good news, I guess is that the error below is because the make file is assuming there is a 'python' alias for the installed version of python, but that may not exist. Again, with the retirement of python2, and python3 now applicable, something was lost.
[INFO ] Installing cross-gdb
[ERROR] configure: error: python is missing or unusable
[ERROR] gmake[4]: *** [Makefile:8725: configure-gdb] Error 1
[ERROR] gmake[3]: *** [Makefile:845: all] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing cross-gdb'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR] >> called from: do_debug_gdb_build[scripts/build/debug/300-gdb.sh@120]
[ERROR] >> called from: do_debug[scripts/build/debug.sh@35]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@646]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> 'share/doc/crosstool-ng/crosstool-ng-1.22.0-60-g37b07f6f-dirty/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 17:42.18)
[17:42] / gmake[2]: *** [ct-ng:152: build] Error 2
gmake[2]: Leaving directory '/home/crosstoolng/esp-open-sdk/crosstool-NG'
make[1]: *** [../Makefile:142: _toolchain] Error 2
make[1]: Leaving directory '/home/crosstoolng/esp-open-sdk/crosstool-NG'
make: *** [Makefile:134: crosstool-NG/.built] Error 2
We need to find where python alias was broken or lost...
crosstoolng@psycho:~/esp-open-sdk$ python
-bash: python: command not found
crosstoolng@psycho:~/esp-open-sdk$ type python
-bash: type: python: not found
crosstoolng@psycho:~/esp-open-sdk$ type python3
python3 is /usr/bin/python3
crosstoolng@psycho:~/esp-open-sdk$ command -v python
crosstoolng@psycho:~/esp-open-sdk$ type -a python
-bash: type: python: not found
$ sudo apt-get install python3
[sudo] password for crosstoolng:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.9.2-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ which python
$ python3 --version
Python 3.9.2
$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root 9 Apr 5 2021 /usr/bin/python3 -> python3.9
-rwxr-xr-x 1 root root 5479736 Feb 28 2021 /usr/bin/python3.9
lrwxrwxrwx 1 root root 33 Feb 28 2021 /usr/bin/python3.9-config -> x86_64-linux-gnu-python3.9-config
lrwxrwxrwx 1 root root 16 Apr 5 2021 /usr/bin/python3-config -> python3.9-config
$ sudo ln -s /usr/bin/python3.3 /usr/bin/python
$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root 18 Aug 21 14:34 /usr/bin/python -> /usr/bin/python3.3
lrwxrwxrwx 1 root root 9 Apr 5 2021 /usr/bin/python3 -> python3.9
-rwxr-xr-x 1 root root 5479736 Feb 28 2021 /usr/bin/python3.9
lrwxrwxrwx 1 root root 33 Feb 28 2021 /usr/bin/python3.9-config -> x86_64-linux-gnu-python3.9-config
lrwxrwxrwx 1 root root 16 Apr 5 2021 /usr/bin/python3-config -> python3.9-config
Now we have the python alias, soft link back as the make file expects.
Will try to run the tool-chain make again...
$ make