You are not logged in.

#1 2024-05-09 16:31:16

ChaiChai
Member
Registered: 2024-05-09
Posts: 2

Upgrading from gcc12 to gcc13

Trying to run my updates today throws errors at me when my system tries to install the gcc13 dependencies, because they're already owned by gcc12. I'm of half a mind to just remove gcc12 prior to running the updates but in addition to the problems the new version might cause for any software I used with breaking changes, I'm not sure I could easily return my system to a working state. Is there any way to request pacman cleanly replace a package with another, and if things are to break, I could use the same command to do the reverse? I feel I should be able to swap them in place and worst case rebuild all my software that required one to resolve.

I have dug through the help menu but if what I'm looking for exists I've missed it.

sudo pacman -Syu

:: Synchronizing package databases...
 core is up to date
 extra                                7.8 MiB  25.9 MiB/s 00:00 [###################################] 100%
 multilib is up to date
:: Starting full system upgrade...
:: Replace glfw-wayland with extra/glfw? [Y/n] n
resolving dependencies...
looking for conflicting packages...

Packages (33) binutils-2.42+r91+g6224493e457-1  cuda-12.4.1-4  cuda-tools-12.4.1-4  debugedit-5.0-6
              docker-1:26.1.2-1  gcc-14.1.1+r1+g43b730b9134-1  gcc-libs-14.1.1+r1+g43b730b9134-1
              gcc13-13.2.1-1  glib2-2.80.2-1  glibc-2.39+r52+gf8e4623421-1  jbigkit-2.1-8
              lib32-gcc-libs-14.1.1+r1+g43b730b9134-1  lib32-glib2-2.80.2-1
              lib32-glibc-2.39+r52+gf8e4623421-1  libcdio-paranoia-10.2+2.0.2-1  libelf-0.191-3
              libngtcp2-1.5.0-1  libreoffice-fresh-24.2.3-2  libsysprof-capture-46.0-3
              libtool-2.4.7+83+g7b091831-1  libwbclient-4.20.1-1  linux-6.8.9.arch1-2
              linux-headers-6.8.9.arch1-2  mpfr-4.2.1-3  poppler-24.05.0-1  poppler-glib-24.05.0-1
              poppler-qt6-24.05.0-1  postgresql-libs-16.2-3  python-tomlkit-0.12.5-1  samba-4.20.1-1
              smbclient-4.20.1-1  terraform-1.8.3-1  virtualbox-host-modules-arch-7.0.18-2

Total Download Size:     28.84 MiB
Total Installed Size:  8838.48 MiB
Net Upgrade Size:       177.33 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 docker-1:26.1.2-1-x86_64            28.8 MiB  55.5 MiB/s 00:01 [###################################] 100%
(33/33) checking keys in keyring                                [###################################] 100%
(33/33) checking package integrity                              [###################################] 100%
(33/33) loading package files                                   [###################################] 100%
(33/33) checking for file conflicts                             [###################################] 100%
error: failed to commit transaction (conflicting files)
gcc13: /usr/lib/gcc/x86_64-pc-linux-gnu/lib/libgcc_s.so exists in filesystem (owned by gcc12)
gcc13: /usr/lib/gcc/x86_64-pc-linux-gnu/lib/libgcc_s.so.1 exists in filesystem (owned by gcc12)
Errors occurred, no packages were upgraded.

Offline

#2 2024-05-09 16:59:01

loqs
Member
Registered: 2014-03-06
Posts: 17,581

Re: Upgrading from gcc12 to gcc13

Does anything installed on the system require gcc12? `pacman -Qi gcc12`

Offline

#3 2024-05-09 17:16:36

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,254

Re: Upgrading from gcc12 to gcc13

loqs wrote:

Does anything installed on the system require gcc12? `pacman -Qi gcc12`

This solved it for me when I encountered the same problem yesterday, except I went straight to pacman -R and waited to see if there were any dependency issues.

All good up to now.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#4 2024-05-09 17:23:11

mpan
Member
Registered: 2012-08-01
Posts: 1,221
Website

Re: Upgrading from gcc12 to gcc13

Tonight another person had a similar issue in #archlinux. Apparently gcc12 was a dependency for something far in the past, but later became an orphaned dependency and people didn’t notice it for some time.

gcc12 is no longer maintained in the official repos, so certainly no official package depends on it anymore. If you don’t have any packages other than official and you don’t use gcc12 yourself, you can safely remove this package before updating.

However, there may be packages other than official: for example ones you built yourself using PKGBUILDs from AUR. Running `pacman -Qi gcc12` and looking at “Required by” line, as suggested by loqs, will tell which ones. You may also use `pactree -r gcc12` (from pacman-contrib) to get a better view. If this produces nothing and it’s not used by you, you may safely remove this package.

Otherwise, if something depends on this package, perhaps you may need to rebuild it with a newer version, report a bug to the author of the relevant PKGBUILD, or cease using the offending package.

In general use `pacman -Qdt` periodically to find unused, stale dependencies. Don’t remove them blindly, though: some of them may be still used by you and coincidently happened to be marked as dependencies, instead of explicit installs.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#5 2024-05-09 17:37:09

ChaiChai
Member
Registered: 2024-05-09
Posts: 2

Re: Upgrading from gcc12 to gcc13

Gotcha, I was scared of going straight to `pacman -R` because I wasn't sure if it would just nuke it on me, and `-Qi` is definitely something I need to keep at the back of my mind for these things now.

It was in fact just an orphaned dep for me.


Thank you all, appreciate your help!

EDIT: Just started digging through the list from `pacman -Qdt` as well and this is incredibly useful. Most of what's in that list is dependencies for applications that are not used by my package manager, but I've definitely been able to trim down my system as a result, ex. two installs of electron when I want everything on the newer version.

Last edited by ChaiChai (2024-05-09 18:02:14)

Offline

Board footer

Powered by FluxBB