Your Cart

GCC 13.2.0 for Raspberry Pi OS Legacy (buster 2023-05-03 release)

On Sale
$5.00
$5.00
Added to cart

What is this?


This is pre-built GCC version 13.2.0, which supports most of the c++23 features, running on Raspberry Pi OS Legacy Buster.


Why do you provide the latest GCC 13.2.0 for the Legacy Raspberry Pi OS Buster?


The latest GCC version 13.2.0 which is built for Raspberry Pi OS Legacy Buster version, which is the last RPi OS supporting the MMAL(Multi-Media Abstraction Layer)and the omxplayer which is running with MMAL and provides smooth video playback with very low CPU & memory usage. So, even though Buster is a legacy version, it is still strongly necessary for a multimedia application running on a Raspberry Pi device.


But, the default version of GCC on the Raspberry Pi OS Legacy Buster is 8.3.0, just supporting c++17.

So, We provided pre-built GCC 13.2.0 for Raspberry Pi OS Legacy Buster. With this product, you can use most of the c++23 features on Raspberry Pi OS Legacy Buster.


How can I know my Raspberry Pi OS version?


Issue the command cat /etc/debian_version

pi@raspberrypi:~ $ cat /etc/debian_version
10.13


The returned 10.13 indicates that its version is the Buster.


How to install it?


Download and expand the file.


Download the file gcc-13.2.0.tar.gz and expand it on your Raspberry Pi OS Buster.


tar -xvzf gcc-13.2.0.tar.gz


It will take a long time to finish. After expanded, cd to gcc-13.2.0/build/


cd gcc-13.2.0/build/


Install.


Install as a user with root privileges.


sudo make install


It will also take a long time to finish. After installed, reboot your Raspberrypi


Make the system recognize the newly built library.


New versions of libraries are built on the /usr/local/lib. To recognize these, add this path to the top of /etc/ld.so.conf.d/arm-linux-gnueabihf.conf.


You can see the conf file below before adding as follow:


# Multiarch support
/usr/local/lib/arm-linux-gnueabihf
/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabihf


So, add usr/local/lib at top as follows:


# Multiarch support
/usr/local/lib
/usr/local/lib/arm-linux-gnueabihf
/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabihf


Then, issue ldconfig command with sudo as follows:


sudo ldconfig


Confirm.


Confirm the version as follows:


pi@raspberrypi:~ $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/armv6l-unknown-linux-gnueabihf/13.2.0/lto-wrapper
Target: armv6l-unknown-linux-gnueabihf
Configured with: ../configure --enable-languages=c,c++ --prefix=/usr/local --disable-bootstrap --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC) 


pi@raspberrypi:~ $ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/armv6l-unknown-linux-gnueabihf/13.2.0/lto-wrapper
Target: armv6l-unknown-linux-gnueabihf
Configured with: ../configure --enable-languages=c,c++ --prefix=/usr/local --disable-bootstrap --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC) 


Also, confirm you can use the -std=c++23 option.

g++ -std=c++23 somesource.cpp


In Case…


fatal error: gmp.h: No such file or directory


sudo apt-get install libgmp3-dev


fatal error: mpc.h: No such file or directory


sudo apt-get install libmpc-dev
You will get a GZ (1GB) file