Solved chromium pkg is broken

phalange

Active Member

Reaction score: 106
Messages: 234

ld-elf.so.1: Shared object "libgbm.so.1" not found, required by "chrome"
 

mer

Well-Known Member

Reaction score: 286
Messages: 485

/usr/local/lib/libgbm.so.1 looks to be coming from mesa-libs, so what does pkg info | grep mesa show?
I'm not saying the package is not broken, because it should pull in runtime dependencies, but pkg install mesa-libs may fix your
problem.
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

I had a similar error recently, after upgrading my plasma5-plasma install from Q2 quarterly packages to Q3. In my case the missing file /usr/local/lib/libgbm.so.1 was detected when xorg tried to load the "radeon" driver (not the "radeonkms.ko" kernel module), and the missing file was reported in the /var/log/Xorg.0.log. The long and short of it was that my X windows desktop wouldn't start at all.

I fixed the immediate problem for myself by running a fresh plasma5-plasma install, using the Q3 quarterly package set, on another slice, and copying the file from the fresh new install to the upgraded install. After doing so, the upgraded system seems to work just fine, although I haven't really tested it too thoroughly.

Instead, I'm just using the new install, and have more-or-less abandoned the upgraded install. I have also avoided upgrading my other Q2 quarterly FreeBSD-13.0-RELEASE installs, of which I presently have 3, for the time being.

I presently only have so much time to devote to this pursuit. I would share my copy of the file with you, if someone here could link me to an internet site for sharing files. This forum software will not allow me to attach a file of this type. I would also report this problem to the people who maintain the upgrade software, but I presently don't know how, don't belong to any kind of FreeBSD support mailing lists, and, as I've just said, my time for pursuing such matters is just a bit limited right now.
 

mer

Well-Known Member

Reaction score: 286
Messages: 485

OP:
output of the following as root:

pkg info | grep -i mesa

if it does not show mesa-libs installed, do the following at root:

pkg install mesa-libs

Looking at what packages depend on mesa-libs:
pkg query %rn-%rv mesa-libs

on my system it shows xorg-server, mesa-dri, chromium, sdl2.

So perhaps mesa-libs didn't build correctly upstream?
 
OP
P

phalange

Active Member

Reaction score: 106
Messages: 234

OP:
output of the following as root:

pkg info | grep -i mesa

if it does not show mesa-libs installed, do the following at root:

pkg install mesa-libs

Looking at what packages depend on mesa-libs:
pkg query %rn-%rv mesa-libs

on my system it shows xorg-server, mesa-dri, chromium, sdl2.

So perhaps mesa-libs didn't build correctly upstream?

pkg info | grep -i mesa
mesa-dri-20.2.3_2 OpenGL hardware acceleration drivers for DRI2+
mesa-libs-20.2.3_1 OpenGL libraries that support GLX and EGL clients


Just for fun I checked this:


pkg install mesa-libs
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed
 

mer

Well-Known Member

Reaction score: 286
Messages: 485

Interesting.
How about
pkg which /usr/local/lib/libgbm.so.1

that should return mesa-libs.
ls -ltr /usr/local/lib/libgbm.so.1
just to make sure it exists.
 

Jose

Daemon

Reaction score: 903
Messages: 1,107

Interesting.
How about
pkg which /usr/local/lib/libgbm.so.1

that should return mesa-libs.
ls -ltr /usr/local/lib/libgbm.so.1
just to make sure it exists.
Code:
 pkg which /usr/local/lib/libgbm.so.1          /usr/local/lib/libgbm.so.1 was installed by package mesa-libs-20.2.3
I have an Nvidia card. Maybe it hasn't been swallowed by libglvnd yet.
 

mer

Well-Known Member

Reaction score: 286
Messages: 485

Code:
 pkg which /usr/local/lib/libgbm.so.1          /usr/local/lib/libgbm.so.1 was installed by package mesa-libs-20.2.3
I have an Nvidia card. Maybe it hasn't been swallowed by libglvnd yet.
Interesting, "this" system is Intel i915 and freebsd-version shows 13.0-RELEASE-p3 pkg info | grep chrom shows chromium-91.0.4472.114_1.
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

Code:
(wasat@plasma ~)$ pkg which /usr/local/lib/libgbm.so.1
/usr/local/lib/libgbm.so.1 was installed by package mesa-libs-20.2.3_1

(wasat@plasma ~)$ pkg query %rn-%rv mesa-libs
sdl2-2.0.12_5
xwayland-devel-21.0.99.1.42
xorg-server-1.20.11_3,1
mesa-dri-20.2.3_2

(wasat@plasma ~)$ ls -ltr /usr/local/lib/libgbm.so.1*
-rwxr-xr-x  1 root  wheel  60688 Jul  4 00:09 /usr/local/lib/libgbm.so.1.0.0
lrwxr-xr-x  1 root  wheel     15 Jul  4 00:09 /usr/local/lib/libgbm.so.1 -> libgbm.so.1.0.0

(wasat@plasma ~)$ pkg info mesa-libs |head -n 1
mesa-libs-20.2.3_1
(wasat@plasma ~)$ pkg search mesa-libs
mesa-libs-20.2.3_1             OpenGL libraries that support GLX and EGL clients

(wasat@plasma ~)$ freebsd-version -kru
13.0-RELEASE-p3
13.0-RELEASE-p3
13.0-RELEASE-p3
 

mer

Well-Known Member

Reaction score: 286
Messages: 485

Vull that's similar to what I've got on my system; exception is xwayland-devel.
OP looks to have mesa-libs installed so the libgbm should be there.
ls -ltr /usr/local/lib/libgbm*
would tell us.
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

Vull that's similar to what I've got on my system; exception is xwayland-devel.
OP looks to have mesa-libs installed so the libgbm should be there.
ls -ltr /usr/local/lib/libgbm*
would tell us.
This is what I got with a fresh install using 3rd quarter quarterly packages, but after upgrading my 2nd quarter quarterly package set, the file disappeared. The following is from a similar 2nd quarterly package set, in which I installed the full kde5 meta-port instead of a stripped down plasma5-plasma install --- and, notably, which I have not yet upgraded to the 3rd quarter packages:
Code:
root@plasma:~ # mount /dev/ada0p13 /mnt
root@plasma:~ # ls -ltr /mnt/usr/local/lib/libgbm*
-rwxr-xr-x  1 root  wheel  60688 Jun  3 00:06 /mnt/usr/local/lib/libgbm.so.1.0.0
lrwxr-xr-x  1 root  wheel     15 Jun  3 00:06 /mnt/usr/local/lib/libgbm.so.1 -> libgbm.so.1.0.0
lrwxr-xr-x  1 root  wheel     11 Jun  3 00:06 /mnt/usr/local/lib/libgbm.so -> libgbm.so.1
This is what leads me to believe that there was a problem with the upgrade. Here is what I had after the upgrade to 3rd quarter packages on my previous 2nd quarter plasma5-plasma install:
Code:
root@plasma:~ # umount /mnt
root@plasma:~ # mount /dev/ada0p12 /mnt
root@plasma:~ # ls -ltr /mnt/usr/local/lib/libgbm*
ls: No match.
root@plasma:~ #
As you can see, the indicated libgbm* files just disappeared after the upgrade.
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

mer,
Plus I'm assuming that the error message reported by OP shows us that his system is likely also missing these files, for whatever reason, and guessing that his problem might or might not be related.
 
  • Like
Reactions: mer

mer

Well-Known Member

Reaction score: 286
Messages: 485

Interesting. I've updated to Q3 pkgs and haven't seen the problem. just weird
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

Interesting. I've updated to Q3 pkgs and haven't seen the problem. just weird
It might be related to the timing of my upgrades. I've suspected for various reasons that I may have upgraded too soon after the start of the quarter, and before all of the packages involved had been added to the repo. For example, I upgraded three, and each time, additional packages appeared.

I'll try to upgrade my kde5 install right now and see what happens with it.
This file definitely belongs to mesa-libs. The solution appears to be to remove and reinstall graphics/mesa-libs (and nvidia-driver, if you use it).
I'll try that too on my broken plasma5-plasma install and report back ASAP.
 
OP
P

phalange

Active Member

Reaction score: 106
Messages: 234

Interesting.
How about
pkg which /usr/local/lib/libgbm.so.1

that should return mesa-libs.
ls -ltr /usr/local/lib/libgbm.so.1
just to make sure it exists.

Yeah it's there.

pkg which /usr/local/lib/libgbm.so.1
/usr/local/lib/libgbm.so.1 was installed by package mesa-libs-20.2.3_1


but

ls -ltr /usr/local/lib/libgbm.so.1
ls: /usr/local/lib/libgbm.so.1: No such file or directory
 
OP
P

phalange

Active Member

Reaction score: 106
Messages: 234

This file definitely belongs to mesa-libs. The solution appears to be to remove and reinstall graphics/mesa-libs (and nvidia-driver, if you use it).

Nice work Jose!


pkg install -f mesa-libs chromium
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
chromium-91.0.4472.114_1
mesa-libs-20.2.3_1

Number of packages to be reinstalled: 2

Proceed with this action? [y/N]: y
[1/2] Reinstalling mesa-libs-20.2.3_1...
[1/2] Extracting mesa-libs-20.2.3_1: 100%
[2/2] Reinstalling chromium-91.0.4472.114_1...
[2/2] Extracting chromium-91.0.4472.114_1: 100%


and Chromium is working again.
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

So just for the record...
  1. pkg install -f mesa-libs worked to resolve this issue for me, too, on both my kde5 and plasma5-plasma installs.
  2. When I upgraded my kde5 install just now, from Q2 quarterly packages to Q3, the upgrade problem I had encountered previously persisted -- the upgrade left me with no /usr/local/lib/libgbm.so.1 files, and consequently, no working X - Window system, because my xf86-video-ati provided "radeon" driver depends on this file. On the positive side, pkg install -f mesa-libs was sufficient to remedy the problem.
  3. If anyone reading this knows how to report this upgrade bug to the proper software maintainers, I would very much appreciate that. I've provided more bug-related details in my previous posts in this thread. Thanks.
 

Jose

Daemon

Reaction score: 903
Messages: 1,107

It's unfortunately not clear which package has the bug. Is it mesa-libs? One of the KDE packages? I'd ask on the freebsd-ports list.
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

It's unfortunately not clear which package has the bug. Is it mesa-libs? One of the KDE packages? I'd ask on the freebsd-ports list.
I know nothing about the freebsd-ports list, but can narrow it down a bit farther, now that I've just upgraded my headless server install without duplicating the error. Here's a short summary of what I learned or inferred from this latest upgrade:
  1. First I explicitly ran pkg upgrade mesa-libs which upgraded version 20.2.3 to 20.2.3_1 without duplicating the problem. This upgrade also added libglvnd without affecting libgbm.so.1 at all, so I now feel that the mesa-lib upgrade itself is very likely not the problem.
  2. Next I ran the full pkg upgrade without duplicating the problem, thereby more or less eliminating all my server-specific packages, including vim, from suspicion.
By comparing the packages installed on the headless server configuration against those installed on the plasma5-plasma installation, I can pretty well narrow it down to the following list of packages (and all their dependencies):
  • xorg
  • lightdm
  • lightdm-gtk-greeter
  • firefox
  • plasma5-plasma
  • konsole
  • dolphin
  • gwenview
  • kate
  • kcalc
  • spectacle
  • libreoffice
  • xf86-video-ati
  • drm-kmod
  • vlc
  • libdvdcss
I had also installed pulseaudio and pavucontrol on the affected systems, but they were both deleted with pkg delete followed by pkg autoremove before running the upgrades.

My prime suspect at this point is xf86-video-ati, for fairly obvious reasons. I'm assuming that it contains the radeon video driver (not to be confused with the radeonkms.ko kernel module), and the missing libgbm.so.1 file was detected by the radeon driver.

I still have one test install left which has not yet been upgraded to Q3 quarterly packages with which to experiment, and it has the Q2 version of the xf86-video-ati package, in use by the MATE DE. If I can find time this evening I'll see what I can learn using that install as my next guinea pig.
 

Vull

Aspiring Daemon

Reaction score: 369
Messages: 642

And the winner is: xf86-video-ati !

Here is a log of pkg upgrade xf86-video-ati | tee pkg-upgrade-xf86-video-ati-q3.log:

https://termbin.com/88zb

The following screen scrape shows where the libgbm files were missing after the above upgrade:
Code:
root@mate:~ # ls -l /usr/local/lib/libgbm*
ls: No match.
... and the steps then taken to reinstall them:
Code:
root@mate:~ # pkg install -f mesa-libs | tee pkg-install-mesa-libs-q3.log
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
    mesa-libs-20.2.3_1

Number of packages to be reinstalled: 1

Proceed with this action? [y/N]: y
[1/1] Reinstalling mesa-libs-20.2.3_1...
[1/1] Extracting mesa-libs-20.2.3_1: .......... done
root@mate:~ # ls -l /usr/local/lib/libgbm*
lrwxr-xr-x  1 root  wheel     11 Jul  4 00:09 /usr/local/lib/libgbm.so -> libgbm.so.1
lrwxr-xr-x  1 root  wheel     15 Jul  4 00:09 /usr/local/lib/libgbm.so.1 -> libgbm.so.1.0.0
-rwxr-xr-x  1 root  wheel  60688 Jul  4 00:09 /usr/local/lib/libgbm.so.1.0.0
root@mate:~ #
 

Jose

Daemon

Reaction score: 903
Messages: 1,107

All right. I'll try to report this accurately on freebsd-ports. Thanks for all the legwork on this.
 
Top