Using a Zorin OS Lite 16.2 (Ubuntu 20.04 derivative) VirtualBox virtual machine with all prerequiste packages installed I tried to build as follows but got the error shown:
cd ~/Downloads
git clone https://github.com/arsv/riscv-toolchain arsv-riscv-toolchain
cd arsv-riscv-toolchain
./configure --prefix `pwd`/installed-tools
make 2>&1 | tee build.log
...
make[12]: Nothing to be done for 'install-data-am'.
make[12]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb/build-gnulib/import'
make[11]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb/build-gnulib/import'
make[10]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb/build-gnulib/import'
make[9]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb/build-gnulib/import'
make[8]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb/build-gnulib'
make[7]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb/build-gnulib'
make[6]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb/build-gnulib'
make[5]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb'
make[4]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb'
make[3]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils/gdb'
make[2]: Nothing to be done for 'install-target'.
make[2]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils'
make[1]: Leaving directory '/home/tommy/Downloads/arsv-riscv-toolchain/build-binutils'
touch files-binutils/stamp
scripts/stagebin files-binutils/bin riscv64-riscv32-elf
scripts/stagebin: 14: Bad substitution
make: *** [make-binutils.mk:22: staging/exe/ld] Error 2
Using a Zorin OS Lite 16.2 (Ubuntu 20.04 derivative) VirtualBox virtual machine with all prerequiste packages installed I tried to build as follows but got the error shown:
Full build log (compressed): build.log.tar.gz
The issue seems to be here but I don't know why: