freebsd / pkg

Package management tool for FreeBSD. Help at #pkg on Libera Chat or pkg@FreeBSD.org
Other
748 stars 279 forks source link

`pkg upgrade` cannot find local or remote packages for libGL.so.1, libEGL.so.1 or libGLESv2.so.2 #1918

Closed CyberBotX closed 4 months ago

CyberBotX commented 3 years ago

Recently I tried to set things up so I could install some packages from my locally built package repository created via poudriere and some from the official FreeBSD package repository. Since then, whenever I tried to do a pkg upgrade, it wants to install libglvnd along with a few other packages, but it cannot do so because of mesa-libs being installed. I am currently on pkg 1.15.10.

Below is what I get when I do pkg upgrade:

[12/20/2020 12:13:48 kirby /ports]# pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
Checking for upgrades (443 candidates): 100%
Processing candidates (443 candidates): 100%
The following 39 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        avahi-app: 0.7_3 [FreeBSD]
        blas: 3.5.0_6 [FreeBSD]
        lapack: 3.5.0_8 [FreeBSD]
        libdaemon: 0.14_1 [FreeBSD]
        libglvnd: 1.3.2 [FreeBSD]
        py37-tkinter: 3.7.9_6 [FreeBSD]

Installed packages to be UPGRADED:
        audacious-plugins: 4.0.5_2 -> 4.0.5_3 [FreeBSD]
        node: 15.3.0 -> 15.4.0 [FreeBSD]
        qemu: 4.2.1 -> 5.0.1 [FreeBSD]
        qscintilla2-qt5: 2.11.5 -> 2.11.5_1 [FreeBSD]

Installed packages to be REINSTALLED:
        OpenSP-1.5.2_3 [FreeBSD] (options changed)
        gdome2-0.8.1_11 [FreeBSD] (options changed)
        gtksourceview3-3.24.11 [FreeBSD] (options changed)
        icecast-2.4.4,1 [poudriere]
        libgit2-1.0.1 [FreeBSD] (direct dependency changed: libssh2)
        libsoup-2.72.0 [FreeBSD] (direct dependency changed: libgcrypt)
        libtorrent-rasterbar-1.2.10 [FreeBSD] (options changed)
        lua52-luafilesystem-1.8.0 [FreeBSD] (options changed)
        openjdk8-8.275.01.1 [FreeBSD] (options changed)
        p5-HTML-Tidy-1.60 [FreeBSD] (options changed)
        panda-cclient-20130621_1 [FreeBSD] (direct dependency removed: openssl)
        portlint-2.19.3 [FreeBSD] (options changed)
        portshaker-1.0.18_1 [FreeBSD] (options changed)
        porttools-1.09 [FreeBSD] (options changed)
        portupgrade-2.4.16,2 [FreeBSD] (options changed)
        py37-cryptography-2.9.2 [FreeBSD] (direct dependency changed: python37)
        py37-pillow-7.0.0 [FreeBSD] (options changed)
        py37-urwid-2.1.2 [FreeBSD] (options changed)
        python27-2.7.18_1 [FreeBSD] (direct dependency changed: readline)
        python37-3.7.9_1 [FreeBSD] (direct dependency changed: readline)
        qbittorrent-4.3.1 [FreeBSD] (direct dependency changed: qt5-network)
        rasqal-0.9.33_1 [poudriere]
        rsync-3.2.3 [FreeBSD] (options changed)
        ruby27-bdb-0.6.6_8 [FreeBSD] (options changed)
        source-highlight-3.1.9_1 [FreeBSD] (options changed)
        unrar-6.00.beta2,6 [FreeBSD] (direct dependency removed: openssl)
        vde2-2.3.2_4 [poudriere]
        xorg-server-1.20.9_1,1 [FreeBSD] (direct dependency changed: mesa-libs)
        ydiff-1.2,1 [FreeBSD] (options changed)

Number of packages to be installed: 6
Number of packages to be upgraded: 4
Number of packages to be reinstalled: 29

The process will require 128 MiB more space.
209 MiB to be downloaded.

Proceed with this action? [y/N]: 
[12/20/2020 12:14:18 kirby /ports]# 

When I try to upgrade a single one of those packages in the UPGRADED section, with pkg -d, I get the following:

[12/20/2020 12:15:35 kirby /ports]# pkg -d upgrade audacious-plugins
DBG(1)[71712]> pkg initialized
Updating FreeBSD repository catalogue...
DBG(1)[71712]> PkgRepo: verifying update for FreeBSD
DBG(1)[71712]> Pkgrepo, begin update of '/var/db/pkg/repo-FreeBSD.sqlite'
DBG(1)[71712]> Request to fetch pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest/meta.conf
DBG(1)[71712]> opening libfetch fetcher
DBG(1)[71712]> Fetch > libfetch: connecting
DBG(1)[71712]> Fetch: fetching from: http://pkgmir.geo.freebsd.org/FreeBSD:12:amd64/latest/meta.conf with opts "i"
DBG(1)[71712]> Request to fetch pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest/meta.txz
DBG(1)[71712]> opening libfetch fetcher
DBG(1)[71712]> Fetch > libfetch: connecting
DBG(1)[71712]> Fetch: fetching from: http://pkgmir.geo.freebsd.org/FreeBSD:12:amd64/latest/meta.txz with opts "i"
DBG(1)[71712]> Request to fetch pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest/packagesite.txz
DBG(1)[71712]> opening libfetch fetcher
DBG(1)[71712]> Fetch > libfetch: connecting
DBG(1)[71712]> Fetch: fetching from: http://pkgmir.geo.freebsd.org/FreeBSD:12:amd64/latest/packagesite.txz with opts "i"
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
DBG(1)[71712]> PkgRepo: verifying update for poudriere
DBG(1)[71712]> Pkgrepo, begin update of '/var/db/pkg/repo-poudriere.sqlite'
DBG(1)[71712]> Request to fetch file:///usr/local/poudriere/data/packages/local-default/meta.conf
DBG(1)[71712]> Fetch: fetcher chosen: file
DBG(1)[71712]> Request to fetch file:///usr/local/poudriere/data/packages/local-default/meta.txz
DBG(1)[71712]> Fetch: fetcher chosen: file
DBG(1)[71712]> Request to fetch file:///usr/local/poudriere/data/packages/local-default/packagesite.txz
DBG(1)[71712]> Fetch: fetcher chosen: file
poudriere repository is up to date.
All repositories are up to date.
DBG(1)[71712]> want to get an advisory lock on a database
DBG(1)[71712]> removing pkg from the request as it is the same as local
DBG(1)[71712]> cannot find local packages that provide library libGL.so.1 required for qt5-declarative
DBG(1)[71712]> cannot find remote packages that provide library libGL.so.1 required for qt5-declarative
DBG(1)[71712]> cannot find local packages that provide library libEGL.so.1 required for cairo
DBG(1)[71712]> cannot find remote packages that provide library libEGL.so.1 required for cairo
DBG(1)[71712]> cannot find local packages that provide library libGLESv2.so.2 required for mesa-demos
DBG(1)[71712]> cannot find remote packages that provide library libGLESv2.so.2 required for mesa-demos
The following 9 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        avahi-app: 0.7_3 [FreeBSD]
        blas: 3.5.0_6 [FreeBSD]
        lapack: 3.5.0_8 [FreeBSD]
        libdaemon: 0.14_1 [FreeBSD]
        libglvnd: 1.3.2 [FreeBSD]
        libgphoto2: 2.5.23_1 [FreeBSD]
        metis: 5.1.0_8 [FreeBSD]
        tbb: 2020.3 [FreeBSD]

Installed packages to be UPGRADED:
        audacious-plugins: 4.0.5_2 -> 4.0.5_3 [FreeBSD]

Number of packages to be installed: 8
Number of packages to be upgraded: 1

The process will require 195 MiB more space.
21 MiB to be downloaded.

Proceed with this action? [y/N]: 
DBG(1)[71712]> release an advisory lock on a database
DBG(1)[71712]> Cleaning up cachedir
[12/20/2020 12:15:50 kirby /ports]# 

(I did not show pkg -d upgrade only because the output includes a lot of messages about packages being removed from the request.)

I've thus far been unable to figure out if the reason for libglvnd wanting to be installed really is because of those debug lines saying it can't find packages providing those OpenGL libraries, or if there is some other reason. It could also possibly be a problem in the pkg_jobs_universe_process_shlibs function of libpkg, but I have been unable to figure out how to get gdb or lldb to apply a breakpoint to that function to trace through it.

The poudriere packages were built on the same machine I'm running the upgrade on, which is running FreeBSD 12.2-RELEASE, amd64.

CyberBotX commented 3 years ago

I haven't seen anything happen with this issue yet, but something I should probably point out is that libglvnd is no longer a factor in this, however most of what seems to be happening above is still happening. In addition, to point out, when those extra packages get installed, if I run a pkg autoremove immediately afterwards, all of those packages come up for removal. Perhaps there is something wrong in the solver causing this, but if any other information is required, I can provide it.

bapt commented 4 months ago

overcome by events, I guess