mitchcurtis / slate

Pixel Art Editor
GNU General Public License v3.0
1.07k stars 103 forks source link

It's impossible to run Slate on Linux due to some lib files missing #130

Closed Gaarco closed 4 years ago

Gaarco commented 5 years ago

When I try to open Slate (version 0.8 but I tested also with the previous one and the outcome was the same) I get an error: error while loading shared libraries: libdouble-conversion.so.1: cannot open shared object file: No such file or directory, on my system I have libdouble-conversion.so.3.1.5 but it doesn't seem to work. Also building from source doesn't work, when I try to run Slate: error while loading shared libraries: libslate.so: cannot open shared object file: No such file or directory

mitchcurtis commented 5 years ago

I think I will solve this by just bundling that library with the app in the next release.

Gaarco commented 4 years ago

It's been a while, but I tried only now and I know it might be too late. Version 0.7 works, I don't know why but it works. 0.8 and 0.6 don't.

mitchcurtis commented 4 years ago

Oh, that's weird... thanks for letting me know.

cptx032 commented 4 years ago

Hi, I'm trying open Slate 0.8.0. First I get a message saying that libpng6 was not installed:

./Slate: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory

After installing it, now I get:

./Slate: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /xxxx/xxxx/xxxx/Slate-v0.8.0-linux/lib/libQt5Core.so.5)

Ive tryied download 0.7.0 and this dependency messages were not shown to me, but it raises an segfault.

My system info:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:    16.04
Codename:   xenial

Linux XXX 4.4.0-171-generic #200-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

Its possible include all these dependencies inside the executable? Would be nice :D

mitchcurtis commented 4 years ago

Its possible include all these dependencies inside the executable? Would be nice :D

If it works for the other distros (as well as newer Ubuntus), then it's no problem to include it. :) I'll just need to set aside some time to download e.g. Manjaro and Ubuntu 16 and test it.

mitchcurtis commented 4 years ago

I just set up Manjaro in a VM (from manjaro-xfce-18.1.5-191229-linux54.iso) and tried with the upcoming 0.9.0 release of Slate and it worked without problems, so I think what I'll do is upload that release and get you to try it again, @Gaarco. If it doesn't work for you, I will upload new binaries with libdouble-conversion.so.1 included.

I also tested it on a fresh Ubuntu 16.04, but there I get the xcb plugin error:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)

... which is similar to the one that @acoolstraw got after setting LD_LIBRARY_PATH, except that theirs was about it not being found, whereas in this case it finds it but can't load it for whatever reason. So I need to look into that.

mitchcurtis commented 4 years ago

When running Slate like this

QT_DEBUG_PLUGINS=1 ./Slate

I get this output:

QFactoryLoader::QFactoryLoader() checking directory path "/home/mitch/Downloads/Slate-v0.9.0-linux/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/mitch/Downloads/Slate-v0.9.0-linux/plugins/platforms/libqxcb.so"
Found metadata in lib /home/mitch/Downloads/Slate-v0.9.0-linux/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 331008
}

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/mitch/Downloads/Slate-v0.9.0-linux/platforms" ...
Cannot load library /home/mitch/Downloads/Slate-v0.9.0-linux/plugins/platforms/libqxcb.so: (/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/mitch/Downloads/Slate-v0.9.0-linux/plugins/platforms/../../lib/libsystemd.so.0))
QLibraryPrivate::loadPlugin failed on "/home/mitch/Downloads/Slate-v0.9.0-linux/plugins/platforms/libqxcb.so" : "Cannot load library /home/mitch/Downloads/Slate-v0.9.0-linux/plugins/platforms/libqxcb.so: (/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /home/mitch/Downloads/Slate-v0.9.0-linux/plugins/platforms/../../lib/libsystemd.so.0))"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)

That looks very similar to what @cptx032 ran into, except that was a missing dependency of libQt5Core.so.5 and not libsystemd.so.0.

Apparently running libc is enough to discover its version, so I did that on the Ubuntu 16.04 VM:

GNU C Library (Ubuntu GLIBC 2.23-0ubuntu11) stable release version 2.23, by Roland McGrath et al.
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 5.4.0 20160609.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.

So the version of the system libc is 2.23, and libsystemd.so.0 wants 2.25 (for reference, the machine that I built Slate on, the system libc is 2.27, and the Manjaro I'm using uses 2.30). Following this answer, I ran apt-get update and then apt-cache policy libc6 but there was no change in versions listed. If "yes" is actually the answer to this question, then I see two options: bundle libc with the app (if that's not an awful idea to begin with), or state that the Linux binaries I offer require Ubuntu 18.04.

mitchcurtis commented 4 years ago

I don't really want to bundle libc with the app, as it seems kinda dodgy to me - I don't see anyone else doing it and most of the advice on the Internet for people with glibc issues is: upgrade your OS. I spent a good deal of time trying to get 16.04 set up to build Slate (so that both 16.04 and 18.04 would (hopefully) be supported), but I've been working on this stuff all weekend and keep running into issues. I've run out of patience, sorry. :)

I will update the main page to state which OS the Linux binaries were built with and that other versions of that OS or other distros may or may not work.