vim.gtk3 won't run after 22.04 upgrade: “libpng12.so.0: cannot open shared object file”

Bug #1991525 reported by Smylers
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

After upgrading a system running Ubuntu 20.04 to 22.04, vim.gtk3 no longer runs:

  $ vim.gtk3
  vim.gtk3: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

(vim.basic still runs fine).

These are the vim packages we have installed, and their versions:

  vim:amd64/jammy-security 2:8.2.3995-1ubuntu2.1 uptodate
  vim-common:all/jammy-security 2:8.2.3995-1ubuntu2.1 uptodate
  vim-gtk3:amd64/jammy-security 2:8.2.3995-1ubuntu2.1 uptodate
  vim-gui-common:all/jammy-security 2:8.2.3995-1ubuntu2.1 uptodate
  vim-runtime:all/jammy-security 2:8.2.3995-1ubuntu2.1 uptodate
  vim-tiny:amd64/jammy-security 2:8.2.3995-1ubuntu2.1 uptodate

Previously I did have a PPA of Vim installed from http://ppa.launchpad.net/jonathonf/vim/ubuntu — but that has been purged, and as you can see all the vim packages now installed are official Ubuntu jammy versions.

libpng12 isn't in Ubuntu any more, so I think the problem is that vim is trying to use it, not that it's missing.

Attached is strace output of the failure.

Revision history for this message
Smylers (smylers) wrote :
description: updated
Revision history for this message
William Wilson (jawn-smith) wrote :

I'm unable to recreate this issue on a jammy system that has been upgraded from focal. Can you make sure all of your packages are up to date? After poking through the vim source code there are no references to libpng12, so it may be some dependency of vim that is out of date trying to read it.

Changed in vim (Ubuntu):
status: New → Incomplete
Revision history for this message
Smylers (smylers) wrote :

> Can you make sure all of your packages are up to date?

apt update and apt upgrade claim so. And:

  $ apt-show-versions | grep -v 'not installed\|uptodate'

doesn't list any packages as being out of date.

> it may be some dependency of vim that is out of date trying to read it.

It certainly seems like something is the wrong version. Is there any way I can trace which library or packages is truing to load libpng12?

Or a way of checking that all Vim's dependencies are at exactly the versions they should be for jammy?

Thanks.

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you share the output of

$ which vim.gtk3

$ ldd -r `which vim.gtk3`

Revision history for this message
Smylers (smylers) wrote :

Thank you! The ldd output included:

  libcairo-gobject.so.2 => /usr/local/lib/libcairo-gobject.so.2 (0x00007f9607200000)

It turns out that back in Ubuntu 16.04 we needed a newer libcairo to run some external software (WeasyPrint), so libcairo 1.16.0 was installed under /usr/local/. Deleting that makes vim.gtk work perfectly.

The libcairo now included in Ubuntu 22.04 is also version 1.16.0, but the Ubuntu-compiled one uses libpng16 (which still exists) rather than libpng12 (which doesn't).

Sorry for the incorrect bug report, and thank you for helping me to get a working system.

Changed in vim (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

no problem, glad that you figured it out!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.