Shinmera / qt-libs

Helper system to ensure the necessary library for CommonQt/Qtools development are available and deployable.
zlib License
18 stars 8 forks source link

In Ubuntu 17.10: libpng12.so.0: cannot open shared object file: No such file or directory #11

Open lispnik opened 6 years ago

lispnik commented 6 years ago

Hi, Thanks for putting qt-libs together! It really makes it easy to get started with commonqt.

On recent Ubuntu 17.10, libpng12 is no longer available and results in:

Unable to load foreign library (QTGUI).
  Error opening shared object "/home/lispnik/.roswell/lisp/quicklisp/dists/quicklisp/software/qt-libs-20171019-git/standalone/qtlibs!QtGui.so":
  libpng12.so.0: cannot open shared object file: No such file or directory.
   [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]
ldd '/home/lispnik/.roswell/lisp/quicklisp/dists/quicklisp/software/qt-libs-20171019-git/standalone/qtlibs!QtGui.so' |grep 'libpng12'
    libpng12.so.0 => not found
$ apt search ^libpng1
Sorting... 0%
Sorting... Done
Full Text Search... Done
libpng16-16/artful,now 1.6.34-1 amd64 [installed]
  PNG library - runtime (version 1.6)

I worked around this by installing the libpng12 .deb from the last LTS:

https://packages.ubuntu.com/xenial/libs/libpng12-0

Shinmera commented 6 years ago

The weird thing is that the libs seem to depend on both libpng12 and libpng16.

I'll have to see what's going on there.

Shinmera commented 6 years ago

So I did some tests compiling Qt from scratch with a minimal dependency set that doesn't include libpng12. Unfortunately it turns out that avoiding libpng12 avoids freetype, fontconfig, and other parts, and the resulting Qt renders text completely illegible. Thus it seems it's impossible for me to currently avoid this dependency. I'll see that I can ship libpng12 along with the Qt binaries in a future release, though.

Shinmera commented 6 years ago

Alright, I've updated the qt-libs releases for all binaries with freshly compiled ones and included libpng12 in the qt4 package. That should hopefully fix this.

To confirm, please uninstall the libpng12 package and run:

(ql:quickload :qt-libs)
(qt-libs:ensure-standalone-libs :force T)