Clone
2
WSLbuild
rich edited this page 2024-12-19 11:46:20 -05:00

Building Re3D on MS Win 11 WSL Ubuntu 23.04 with gcc 12.2.0

When attempting to build Re3D you will get a "fatal error: format: No such file or directory #include This is due to the need for a more up to date version of gcc/g++ (default on WSL Ubuntu 23.04 is gcc 12).

Here are the instructions to build, install and set gcc 14 as the default gcc version on WSL:

sudo apt install build-essential  
sudo apt install libmpfr-dev libgmp3-dev libmpc-dev -y  
wget http://ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.gz 
tar -xf gcc-14.1.0.tar.gz
cd gcc-14.1.0
mkdir build
cd build
../configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-14.1.0 --enable-checking=release --enable-languages=c,c++ --disable-multilib --program-suffix=-14.1.0
make
sudo make install
sudo update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-14.1.0/bin/g++-14.1.0 14
sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-14.1.0/bin/gcc-14.1.0 14

At this point Re3D would build, but failed to open a window when run.

I installed mesa3d:

sudo apt install libgl1-mesa-glx libglx-mesa0 mesa-utils

Then ran glxgears - this worked.

I recreated the Re3D build directory, and then cmake and make and still it would not open the render window.

In the end, under windows, I downloaded the latest Nvidia windows 11 drivers for my t400 (version 552.86), reboot, then re-build Re3D and run and this time it worked. I got ~120fps.