Gcc9 package build error failed unknown public key and other errors in build

I updated my Manjaro system today and I got an error in the package build for gcc9 9.3.0-5 and gcc9-libs 9.3.0-5 both in the AUR. In the first error I got this error from the package build

Building gcc9...
==> Making package: gcc9 9.3.0-5 (Fri 27 Nov 2020 01:38:12 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found gcc-9.3.0.tar.xz
  -> Found gcc-9.3.0.tar.xz.sig
  -> Found isl-0.21.tar.xz
  -> Found c89
  -> Found c99
  -> Found fs64270.patch
==> Validating source files with sha256sums...
    gcc-9.3.0.tar.xz ... Passed
    gcc-9.3.0.tar.xz.sig ... Skipped
    isl-0.21.tar.xz ... Passed
    c89 ... Passed
    c99 ... Passed
    fs64270.patch ... Passed
==> Verifying source file signatures with gpg...
    gcc-9.3.0.tar.xz ... FAILED (unknown public key A328C3A2C3C45C06)
==> ERROR: One or more PGP signatures could not be verified!
Failed to build gcc9

thinking that the key was not being downloaded I manually downloaded the key A328C3A2C3C45C06. This seems to have created a series of errors including

397 warning FORTIFY SOURCE requires compiling with optimization (-O)

I seem to be stuck in some sort of error cycle. To better troubleshoot the problem I think I may need to include the inxi command but am not sure which variables are best to pair with the inxi command for system info so people can troubleshoot this problem. Thanks in advance for any help offered. I searched the forum for other GPG errors dealing with gcc9 but did not find anything that was similar to the series of errors I am having.

According to the PKGBUILD of gcc9 these are the valid keys:

validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9  # bpiotrowski@archlinux.org
              86CFFCA918CF3AF47147588051E8B148A9999C34  # evangelos@foutrelis.com
              13975A70E63C361C73AE69EF6EEB81F8981C74C7  # richard.guenther@gmail.com
              33C235A34C46AA3FFB293709A328C3A2C3C45C06) # Jakub Jelinek <jakub@redhat.com>

Why do I have to compile gcc9 at all? I’ve never had that. After getting the right key its compiling, but why? Pamac showed it as “to be installed”. Why do I have to compile it from AUR?

Something you have installed either requires it to build or it’s left over from building something and no longer required.

pamac info gcc9
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A328C3A2C3C45C06

After this … GCC8 & GCC9 building done after 4h compiling yesterday

thanks everyone for your replies, what steps do i need to take to build these two packages successfully? I am still a noob with Manjaro. Thanks for your help.

open a terminal, copy & paste:

  1. sudo pacman -Syyu
  2. sudo pacman -S base-devel
  3. gpg --keyserver pool.sks-keyservers.net --recv-key A328C3A2C3C45C06
  4. pamac build gcc9
  5. Build start after Password input
    ^---- this build / compile gcc9 with all dependencies ----^

or manually ?!

source: AUR (en) - gcc9
git-source: https://aur.archlinux.org/gcc9.git

  1. sudo pacman -Syyu
  2. sudo pacman -S base-devel binutils libmpc doxygen python git
  3. gpg --keyserver pool.sks-keyservers.net --recv-key A328C3A2C3C45C06
  4. git clone https://aur.archlinux.org/gcc9.git
  5. cd gcc9/
  6. change the PKGBUILD (at will) in the folder
  7. makepkg -sri

or uninstall gcc9 and install gcc10 from repo?!

sudo pacman -R gcc8 gcc9
sudo pacman -S gcc

good luck and nice weekend

1 Like

Name : gcc9
Version : 9.3.0-5
Description : The GNU Compiler Collection - C and C++ frontends (9.x.x)
URL : https://gcc.gnu.org
Licenses : GPL
Repository : AUR
Installed Size : 120,8 MB
Depends On : gcc9-libs=9.3.0-5 binutils>=2.28 libmpc
Make Dependencies : binutils libmpc doxygen python git
Check Dependencies : dejagnu inetutils
Packager : Unknown Packager
First Submitted : 23.11.2020
Last Modified : 23.11.2020
Build Date : 28.11.2020
Install Date : 28.11.2020
Install Reason : Installed as a dependency for another package

I’ve removed both gcc9 and gcc-lib and had no warnings. We’ll see…

Thank you so much for your detailed instructions. Will get on it as soon as I can and will report back.

Edit: which choice do I need to make in:

"There are 24 members in group base-devel:
:: Repository core

  1. autoconf 2) automake 3) binutils 4) bison 5) fakeroot 6) file 7) findutils 8) flex 9) gawk
  2. gcc 11) gettext 12) grep 13) groff 14) gzip 15) libtool 16) m4 17) make 18) pacman
  3. patch 20) pkgconf 21) sed 22) sudo 23) texinfo 24) which

Enter a selection (default=all): "
Thanks for your help…

You need All…


Thanks very much for your reply. I could not get online for a couple of days, I will then proceed further and see what I get.

I ran all the commands you gave me and I am stuck in a loop with the following line in the gcc9 build process:

397 warning FORTIFY SOURCE requires compiling with optimization (-O)

Not sure now how to proceed… thanks for your help.

In my case I just removed gcc8 and gcc9 from the system. gcc10 is already installed. It is probably an artifact of older apps I tried in the past. Your mileage may vary.

Hello Sergei, thanks for your reply. I was wondering if it was worth installing gcc9 again or making sure I have gcc10 installed and just remove gcc9. Do I also need to uninstall gcc9-libs too? Thanks for your help and suggestions.

GCC will only ever be a build dependency. Remember, managing AUR packages are your own responsibility.

1 Like

Before I forget, Lila-Kuh, thanks for wishing me good luck and a nice weekend. It was very nice of you to stay with me on this problem and also thanks for your help. I wish you well wishes and a very good week.

Hi Yochanan, I appreciate your input. I was asking for help because I have not installed that package but it appeared as an error when I upgraded my Manjaro system. I did not know it was in the AUR until the error showed up. Thanks for your input and help. Edit: I will look further into how to update packages in the AUR.

I removed gcc9-libs as well. If it is a dependency, it will get installed. It sounds like you are not doing your own development, so you are on the safer side. In the worst case you can install it back.

Thanks Sergei for your help.
No I am not a developer, just starting with Manjaro as a regular desktop user. I like Linux and Manjaro is a great distro for me. I will then remove gcc9 and gcc9-libs.
Do I need to make sure to have gcc10 and gcc10-libs installed then before I remove gcc9 and gcc9-libs? Thanks again for your help. I will first check to see if I have gcc10 and gcc10-libs installed.

no, you don’t need to.

Manjaro has a tougher curve. Debian or Ubuntu is easier…

Thanks Sergei for your help. I removed gcc9 and gcc9-lib and now I have no problems updating all packages. These seems to have solved the loop problem i had. I will mark it as solved.