I am trying to use Ubuntu WSL to build the GNU GCC 9.3.0 toolchain, and thought I managed to do do this, but then I couldn't actually use it as a kit in VSCode. I then assumed I did something wrong, and tried to delete the git repo, and the result from compiling, and do it again.
I have already downloaded all dependencies (I think), so that it fully ran everything without saying it encountered an error. But if you are knowledgeable about the compilation of the toolchain, and using WSL to do it, help on what exactly should be downloaded with
sudo apt-get install would be greatly appreciated!
cd /mnt/c/dev git clone git://gcc.gnu.org/git/gcc.git git checkout releases/gcc-9.3.0 cd gcc ./configure --prefix=/mnt/c/dev/gcc-9.3 --enable-languages=c,c++ make -j20 make install
Very often, it simply freezes, and refuse to function again until I restart. When it freeze, it simply doesn't output any text, and instead just shows my input. When I press
Ctrl+C, it also just show
I thought maybe this means that it is running, but giving it lots of time it still is stuck like this. It mainly happens during the configure or the make. When it has been frozen, it is frozen permanently. New windows of it also is frozen. Task manager -> termination -> Still frozen.
Thanks for reading!
Added what I have installed by looking at
sudo apt-get update sudo apt-get install build-essential sudo apt-get install gmp sudo apt-get install libdevel sudo apt install aptitude sudo apt install libgmp-dev sudo apt-get install libmpc-dev sudo apt-get upgrade sudo apt-get install lib32gcc-12-dev apt-get install -y build-essential python3 xorriso genext2fs mtools gnu-efi git automake autoconf wget libgmp-dev libmpfr-dev libmpc-dev flex bison texinfo dosfstools apt-get install -y build-essential python3 xorriso genext2fs mtools gnu-efi git automake autoconf wget libgmp-dev libmpfr-dev libmpc-dev flex bison texinfo dosfstools sudo apt install libblas-dev libatlas-base-dev sudo apt install python3-dev sudo apt-get install libxml2-dev libxslt1-dev
I added those that I think probably did install successfully. Might be some that weren't actually packages, but that would probably be 1-2 max.
Also in the GNU gcc git I use
[I'm ran the commands below]
Changed it to run in the home directory
~ with the commands now instead being;
cd ~ mkdir dev cd dev git clone git://gcc.gnu.org/git/gcc.git cd gcc git checkout releases/gcc-9.3.0 cd .. mkdir gcc-9.3.0 cd gcc-9.3.0 ./../gcc/configure --prefix=$HOME/dev/gcc-9.3.0 --enable-languages=c,c++ --disable-multilib make -j20 make install
collect2: error: ld returned 1 exit status configure: error: I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.
On a seperate pc I didn't get this issue, and I thought I downloaded the same packages, and also encountered the same freeze effect. So I just use
--disable-multilib assuming it isn't the issue.
Also somewhat unrelated to the freezing, the toolchain is now downloaded in
\\wsl.localhost\Ubuntu\~\dev\gcc-9.3.0\bin, but after adding that to path I still don't find the kit in VS Code... What might be the issue? I do get msgs after doing
make install informing me that I have not linked libraries, and that I need to use either
❯ wsl -l -v
- NAME STATE VERSION
- Ubuntu Running 2
❯ wsl --version
WSL-versjon: 184.108.40.206 Kjerneversjon: 220.127.116.11 WSLg-versjon: 1.0.51 MSRDC-versjon: 1.2.3770 Direct3D-versjon: 1.608.2-61064218 DXCore-versjon: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows-versjon: 10.0.19045.2846