Failed to build gcc11

I’m not able to run an update currently, this are the packages to be updated:

To build (7):
gcc11-libs 11.3.0-6 (11.3.0-5) AUR
gcc11 11.3.0-6 (11.3.0-5) AUR
gnome-shell-extension-unite 71-1 (70-1) AUR
libsepol 3.5-1 (3.4-1) AUR
libselinux 3.5-1 (3.4-1) AUR
libuvc 0.0.7-1 (0.0.6-2) AUR
python-progress 1.6-7 (1.6-5) AUR

and this is the error message I get:

==> Verifying source file signatures with gpg…
gcc-11.3.0.tar.xz … cat: write error: Broken pipe
FAILED
==> ERROR: One or more PGP signatures could not be verified!
Finished with result: exit-code
Main processes terminated with: code=exited/status=1
Service runtime: 7min 12.884s
CPU time consumed: 5.888s
Error: Failed to build gcc11

How do I fix this issue? kindly help

Hi @■■■■■■■■■,

It seems you haven’t updated in some time, naughty boy! Anyway, look here:

You apparently have an AUR package installed that requires those dependencies to build. If you do not need the package, you can remove it.

Please post the full build log, not just what you think is important. Please use preformatted text, not quotes.

I ran the script :

bash <(curl -s "https://notabug.org/megavolt/random-scripts/raw/master/fix-gpg-pacman.sh")

The process got stuck at :

[INFO] Removing package cache
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories…
/dev/fd/63: line 38: TMPDIR: unbound variable

Never seen it. Perhaps @megavolt knows what’s going on, since he’s the author of the script,

Hi,

I need these packages, hence cant remove them :frowning:

here is the full build log:

[jo@joshitha-pc ~]$ sudo pamac update
[sudo] password for jo: 
Warning: Building packages as dynamic user
Warning: Setting build directory to /var/cache/pamac
Preparing...
Synchronizing package databases...
Refreshing AUR...                                                                                                                                                                                                  
Cloning gcc11 build files...                                                                                                                                                                                       
Running as unit: run-u323.service
fatal: not a git repository (or any parent up to mount point /var/cache/private)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Finished with result: exit-code
Main processes terminated with: code=exited/status=128
Service runtime: 11ms
CPU time consumed: 11ms
Running as unit: run-u324.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 38ms
CPU time consumed: 38ms
Running as unit: run-u325.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 1.615s
CPU time consumed: 122ms
Generating gcc11 information...
Running as unit: run-u326.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 4.133s
CPU time consumed: 4.701s
Checking gcc11 dependencies...
Cloning gnome-shell-extension-unite build files...
Running as unit: run-u327.service
fatal: not a git repository (or any parent up to mount point /var/cache/private)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Finished with result: exit-code
Main processes terminated with: code=exited/status=128
Service runtime: 16ms
CPU time consumed: 15ms
Running as unit: run-u328.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 10ms
CPU time consumed: 9ms
Running as unit: run-u329.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 1.658s
CPU time consumed: 113ms
Generating gnome-shell-extension-unite information...
Running as unit: run-u330.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 1.181s
CPU time consumed: 1.328s
Checking gnome-shell-extension-unite dependencies...
Cloning python-progress build files...
Running as unit: run-u331.service
fatal: not a git repository (or any parent up to mount point /var/cache/private)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Finished with result: exit-code
Main processes terminated with: code=exited/status=128
Service runtime: 18ms
CPU time consumed: 18ms
Running as unit: run-u332.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 12ms
CPU time consumed: 12ms
Running as unit: run-u333.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 1.641s
CPU time consumed: 128ms
Generating python-progress information...
Running as unit: run-u334.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 1.177s
CPU time consumed: 1.321s
Checking python-progress dependencies...
Cloning libsepol build files...
Running as unit: run-u335.service
fatal: not a git repository (or any parent up to mount point /var/cache/private)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Finished with result: exit-code
Main processes terminated with: code=exited/status=128
Service runtime: 14ms
CPU time consumed: 13ms
Running as unit: run-u336.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 8ms
CPU time consumed: 8ms
Running as unit: run-u337.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 1.577s
CPU time consumed: 131ms
Generating libsepol information...
Running as unit: run-u338.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 3.470s
CPU time consumed: 3.928s
Checking libsepol dependencies...
Cloning libselinux build files...
Running as unit: run-u340.service
fatal: not a git repository (or any parent up to mount point /var/cache/private)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Finished with result: exit-code
Main processes terminated with: code=exited/status=128
Service runtime: 17ms
CPU time consumed: 15ms
Running as unit: run-u341.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 10ms
CPU time consumed: 9ms
Running as unit: run-u342.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 1.629s
CPU time consumed: 120ms
Generating libselinux information...
Running as unit: run-u343.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 3.495s
CPU time consumed: 3.983s
Checking libselinux dependencies...
Cloning libuvc build files...
Running as unit: run-u344.service
fatal: not a git repository (or any parent up to mount point /var/cache/private)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Finished with result: exit-code
Main processes terminated with: code=exited/status=128
Service runtime: 16ms
CPU time consumed: 15ms
Running as unit: run-u345.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 10ms
CPU time consumed: 10ms
Running as unit: run-u346.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 1.620s
CPU time consumed: 131ms
Generating libuvc information...
Running as unit: run-u347.service
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 2.829s
CPU time consumed: 3.200s
Checking libuvc dependencies...
Resolving dependencies...
Checking inter-conflicts...

To build (7):
  gcc11-libs                   11.3.0-6  (11.3.0-5)  AUR
  gcc11                        11.3.0-6  (11.3.0-5)  AUR
  gnome-shell-extension-unite  71-1      (70-1)      AUR
  libsepol                     3.5-1     (3.4-1)     AUR
  libselinux                   3.5-1     (3.4-1)     AUR
  libuvc                       0.0.7-1   (0.0.6-2)   AUR
  python-progress              1.6-7     (1.6-5)     AUR


Edit build files : [e] 
Apply transaction ? [e/y/N] y


Building gcc11...
Running as unit: run-u348.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: gcc11 11.3.0-6 (Saturday 13 May 2023 08:29:11 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading gcc-11.3.0.tar.xz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 77.3M  100 77.3M    0     0  3103k      0  0:00:25  0:00:25 --:--:-- 5723k
  -> Downloading gcc-11.3.0.tar.xz.sig...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   310  100   310    0     0    379      0 --:--:-- --:--:-- --:--:--   379
  -> Downloading isl-0.24.tar.bz2...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2208k  100 2208k    0     0   554k      0  0:00:03  0:00:03 --:--:--  554k
  -> Found c89
  -> Found c99
==> Validating source files with b2sums...
    gcc-11.3.0.tar.xz ... Passed
    gcc-11.3.0.tar.xz.sig ... Skipped
    isl-0.24.tar.bz2 ... Passed
    c89 ... Passed
    c99 ... Passed
==> Verifying source file signatures with gpg...
    gcc-11.3.0.tar.xz ... cat: write error: Broken pipe
FAILED
==> ERROR: One or more PGP signatures could not be verified!
Finished with result: exit-code
Main processes terminated with: code=exited/status=1
Service runtime: 34.237s
CPU time consumed: 5.398s
Error: Failed to build gcc11

Don’t run pamac with sudo.

Did you assess your situation and are you sure that you definitely need these packages?

I recommend first updating without AUR packages and then the others, one by one.

@joshithar Sorry! It was a little typo or rather, the order was wrong. I pushed a fix right now: Small Fix -> unbound variable TMPDIR · 5ad06a9f08 - NotABug.org: Free code hosting

Should work now! :smiley:


Oh wait… but your issue is not related and this script cannot fix it. There is something wrong with the gcc archive and these GPG keys which are used for the AUR, are not part of pacman’s gnupg database, but your user gnupg database:

It looks like I do need this package, can you verify based on this:

[jo@joshitha-pc ~]$ pacman -Qi gcc11
Name            : gcc11
Version         : 11.3.0-5
Description     : The GNU Compiler Collection - C and C++ frontends (11.x.x)
Architecture    : x86_64
URL             : https://gcc.gnu.org
Licenses        : GPL  LGPL  FDL  custom
Groups          : None
Provides        : None
Depends On      : gcc11-libs=11.3.0-5  binutils>=2.28  libmpc  zstd  libisl.so=23-64
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 112.51 MiB
Packager        : T.J. Townsend <blakkheim@archlinux.org>
Build Date      : Tuesday 06 December 2022 04:05:46 AM
Install Date    : Friday 30 December 2022 06:30:49 PM
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

I tried update without AUR first using:

pamac update --force-refresh --no-aur

and when I ran

pamac update --aur

but it gets stuck at the same gcc11 update

yes, your script worked fine but unfortunately didn’t fix the gcc issue

how do I go about getting the right PGP signatures for gcc?

Install Reason  : Installed as a dependency for another package

how do I check which package needs this as a dependency?

Well I tried it myself quickly… It passes just fine. Maybe try:

pamac clean --build-files

and try it again? You need to import the gpg keys:

F3691687D867B81B51CE07D9BBE43771487328A9
86CFFCA918CF3AF47147588051E8B148A9999C34
13975A70E63C361C73AE69EF6EEB81F8981C74C7
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62

If pamac don’t ask you…

gpg --keyserver hkps://keyserver.ubuntu.com --recv-key <key>
pactree -r pkgname

thank you!
these are the results :

[jo@joshitha-pc ~]$ pactree -r gcc11
gcc11
[jo@joshitha-pc ~]$ pactree -r gcc11-libs
gcc11-libs
└─gcc11
[jo@joshitha-pc ~]$ pactree -r libsepol
libsepol
└─libselinux
[jo@joshitha-pc ~]$ pactree -r libselinux
libselinux
[jo@joshitha-pc ~]$ pactree -r libuvc
libuvc
[jo@joshitha-pc ~]$ pactree -r python-progress
python-progress
[jo@joshitha-pc ~]$ pactree -r gnome-shell-extension-unite
gnome-shell-extension-unite

does this mean these packages are not dependent on anything else and its safe to remove them?

Yes, nothing depends on it. As you see gcc11-libs depends on gcc11. So if you install gcc11 it also needs gcc11-libs.

thank you!
I just uninstalled gcc11 and the remaining update proceeded smoothly!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.