gcc 14.1 for C++23 - Compiling from source demonstration and explanation

Published: 08 July 2024
on channel: Mike Shah
1,868
95

►Full CS Essentials Playlist:    • CS Essential Skills  
►Find full courses on: https://courses.mshah.io/
►Join as member to get perks:    / @mikeshah  

►Lesson Description:
This is an updated video on how to build large source projects, specifically the gcc compiler for version 14.1. In this version of the video I show you a little bit more behind the scenes in regards to what the flags mean and how to otherwise get everything installed. In total, it took around 29 minutes for me to do the build once downloaded, and probably 40 minutes to get everything downloaded and setup.

00:00 Trying to use C++23 feature that requires g++14
00:35 Welcome and introduction
01:00 Linux package manager notes
01:44 The installation documentation and prerequisites
06:12 Downloading the source https://ftp.gnu.org/gnu/gcc/gcc-14.1.0/
07:13 using tar to extract files
08:40 using configure to setup our build.
13:20 Make (parallel build) to build gcc
14:30 Nice music break and courses (Compilation took 29 minutes in real-time)
15:31 sudo make install
16:30 First test of compiler
17:47 Updating default g++ compiler
19:18 Wrap up and Conclusion

Here are the steps I used to build.
sudo apt install build-essential
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev libisl-dev libzstd-dev -y
wget http://ftp.gnu.org/gnu/gcc/gcc-14.1.0...
tar -xf gcc-14.1.0.tar.gz
cd gcc-14.1.0
./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/gcc14.1.0 14

►Please like and subscribe to help the channel!
►YouTube Channel:    / mikeshah  
►Join our free community: https://courses.mshah.io/communities/...


Watch video gcc 14.1 for C++23 - Compiling from source demonstration and explanation online, duration hours minute second in high quality that is uploaded to the channel Mike Shah 08 July 2024. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 1,868 times and liked it 95 visitors.