Bug 393307 - Krita is looking for the unversioned libpython3.so instead of the versioned one
Summary: Krita is looking for the unversioned libpython3.so instead of the versioned one
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (show other bugs)
Version: 4.0.1
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-19 19:41 UTC by Aleksey Samoilov
Modified: 2018-05-29 09:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksey Samoilov 2018-04-19 19:41:24 UTC
Krita's Python scripting not working without libpython3.6m.so, which is contained in libpython3.6-dev (development files). Without it Python scripting is not available in Tools > Scripting menu, and error is:

Loading Python plugin
 "" false
 ()
 ()
 ()
 Could not create /usr/lib/x86_64-linux-gnu/libpython3.6m.so
 "Cannot load Python library"

Downstream bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896098
Comment 1 Lisandro Damián Nicanor Pérez Meyer 2018-04-19 22:59:54 UTC
In other words: the app seems to be using the unversioned .so file, which should only be present in a developer's machine. Instead it should look for the versioned file.
Comment 2 Pino Toscano 2018-05-27 08:40:56 UTC
Opened a review with a potential fix:
https://phabricator.kde.org/D13144
Comment 3 Pino Toscano 2018-05-29 08:46:06 UTC
Git commit 1553c12637e15d77168e6ddad287ccbf0c53075b by Pino Toscano.
Committed on 29/05/2018 at 08:45.
Pushed by pino into branch 'master'.

Fix loading of the Python library

Summary:
Instead of assuming the unversioned .so symlink will exist also at
runtime (which is not the case for binary distros), use the QLibrary
features: the SONAME of the Python library is "1.0", so use the
unsuffixed filename of Python library with it.

Additionally, this extends the loading also to Unices platforms
different than macOS (since Boud excluded it in a previous commit),
and destroy the QLibrary in case of loading failure.
Fixed-In: 4.0.4

Reviewers: rempt

Reviewed By: rempt

Subscribers: rempt

Differential Revision: https://phabricator.kde.org/D13144

M  +7    -31   plugins/extensions/pykrita/plugin/utilities.cpp

https://commits.kde.org/krita/1553c12637e15d77168e6ddad287ccbf0c53075b
Comment 4 Pino Toscano 2018-05-29 09:35:42 UTC
Git commit 8b59bf27b4af54203dd4e0caaec9d81c9957d8a9 by Pino Toscano.
Committed on 29/05/2018 at 09:35.
Pushed by pino into branch 'krita/4.0'.

Fix loading of the Python library

Summary:
Instead of assuming the unversioned .so symlink will exist also at
runtime (which is not the case for binary distros), use the QLibrary
features: the SONAME of the Python library is "1.0", so use the
unsuffixed filename of Python library with it.

Additionally, this extends the loading also to Unices platforms
different than macOS (since Boud excluded it in a previous commit),
and destroy the QLibrary in case of loading failure.
Fixed-In: 4.0.4

Reviewers: rempt

Reviewed By: rempt

Subscribers: rempt

Differential Revision: https://phabricator.kde.org/D13144

(cherry picked from commit 1553c12637e15d77168e6ddad287ccbf0c53075b)

M  +7    -31   plugins/extensions/pykrita/plugin/utilities.cpp

https://commits.kde.org/krita/8b59bf27b4af54203dd4e0caaec9d81c9957d8a9