Install gcc-9 on PYNQv2.4 over ZCU-104 patform

Hi,
I’m not sure if this is a basic question but I’m newbie for the installation of gcc-9 on the PYNQ on the ZCU-104. For project need, we need to upgrade the gcc version to gcc-9 to support C++20 on ZCU-104.

I found the following information but I am not sure if it can apply to the ZCU-104. Thus, for the use of PYNQ over ZCU-104, to upgrade the gcc to gcc-9, can I just following the installation commands ?

https://askubuntu.com/questions/1140183/install-gcc-9-on-ubuntu-18-04

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-9

Thank you very much

You can, but you may end up with 2 gcc compilers on your board. You then need to choose the default gcc using some commands - you can find on line.

@rock

Thank you very much for the comment. After a check, the command to change the default GCC should be something like the follows including g+±9.

%sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g+±9

1 Like