KiCad 8.0 on Ubuntu 22.04: libpng issue

Hi all,
after ubuntu upgrade to 22.04, I installed a latest Kicad.
from PPA
ppa:kicad/kicad-8.0-releases

no issue during installation, but I’m getting runtime errors:
Application built with libpng-1.2.54 but running with 1.6.37
Couldn’t load a PNG image - file is corrupted or not enough memory.

libpng12 is already installed and other tools works fine

I check using ldd :
ldd /usr/bin/kicad | grep libpng
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f8ff0c52000)

It seems kicad is invoking libpng16 instead of libpng12 …

Any IDEA ?


Application info

Application: KiCad x86_64 on x86_64

Version: 8.0.0-8.0.0-1~ubuntu22.04.1, release build

Libraries:
wxWidgets 3.2.4
FreeType 2.11.1
HarfBuzz 2.7.4
FontConfig 2.13.1
libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16

Platform: Ubuntu 22.04.4 LTS, 64 bit, Little endian, wxGTK, X11, xubuntu, x11

Build Info:
Date: Feb 23 2024 14:30:25
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.6.3
Curl: 7.81.0
ngspice: 42
Compiler: GCC 11.4.0 with C++ ABI 1016

Build settings:

KiCad is built against 1.6.37. The question is what is somehow invoking 1.2

Hi Marekr,
ok fine, ldd doesn´t lie.
So may be is a shared lib loaded.
this is the error and you can see all the icons are missed …

If you are launching kicad from an icon, check that the correct executable is invoked.

What command do you see when you do a ps x? Hopefully /usr/bin/kicad and not something like /usr/local/bin/kicad or some old binary you have lying around.

What happens when you run /usr/bin/kicad from a terminal window?

Kicad executable is under /usr/bin and ps reports the correct one
5412 pts/0 Sl+ 0:01 /usr/bin/kicad

same behavior if run from shell

The only thing I can think of is python is running and loading a severely outdated pip package

Hi Mark
… pip … could be!
I installed some HamRadio stuffs ie chirp …
now i have to found the component :frowning:
thanks
will follow up

Hi Mark
pip is the latest and all the components are uptodated

any way to enable debug feature and get more info about the failure ?

Try running kicad under ltrace. You’ll need the -l filter to narrow down to calls to libpng*

ltrace -l 'libpng*' kicad

You probably also want to redirect the trace stderr output as it will scroll off the screen.

Incidentally a ltrace on my system shows the first call as from one of the libwx. So maybe you have old versions of those.

1 Like

Hi all

got the issue RC:
wrong /usr/local/lib libwx_ stuffs …

It was installed building ARRL (hamradio …) logs signature tools

just delete them fix the Kicad issues.

Many thanks to every one

regards
paolo (aka IU2OMT)

3 Likes