Bug 398907 - kdevelop! script can't load libraries (Ubuntu 16.04; AppImage; zsh)
Summary: kdevelop! script can't load libraries (Ubuntu 16.04; AppImage; zsh)
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 5.2.4
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-21 09:18 UTC by Wouter Haffmans
Modified: 2022-12-31 05:23 UTC (History)
0 users

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 Wouter Haffmans 2018-09-21 09:18:01 UTC
Using KDevelop 5.2.4 from the AppImage on Ubuntu 16.04 (running Plasma 5.8.9 from kubuntu-backports), trying to run the 'kdevelop!' script from within the konsole plugin shows:

/tmp/.mount_cLADEQ/usr/bin/kdevelop: error while loading shared libraries: libKDevPlatformShell.so.52: cannot open shared object file: No such file or directory
Error: Failed retrieving a pid.

It seems that when running from the AppImage, the environment for the Konsole plugin isn't set up correctly. Expected behavior is that the script would at least run without complaining about missing libraries.


The work-around I currently use is to use the APPDIR environment variable to determine if the script is running from an AppImage environment, then set up the environment correctly at the start of the script:

if [ ! -z $APPDIR ]; then
    export KDEV_BASEDIR=${APPDIR}/usr/bin

    export QML2_IMPORT_PATH=$APPDIR/usr/lib/qml:$QML2_IMPORT_PATH
    export LD_LIBRARY_PATH=$APPDIR/usr/lib/:$LD_LIBRARY_PATH
    export QT_PLUGIN_PATH=$APPDIR/usr/lib/qt5/plugins/
    export XDG_DATA_DIRS=$APPDIR/usr/share/:$XDG_DATA_DIRS
    export PATH=$APPDIR/usr/bin:$PATH
    export KDE_FORK_SLAVES=1
    export PYTHONHOME=$APPDIR/usr/
else
    export KDEV_BASEDIR=$(dirname $0)
fi


I also change KDEV_BASEDIR because in my case I've put a copy of the script in a directory which is in my PATH (see also bug #393091) - this might not actually be necessary if this change is integrated in the AppImage. This work-around currently allows me to control the session from the terminal as usual.

Note: I haven't tried the work-around version of this script on a regular package installation, because it's simply not necessary in that case.
Comment 1 Kevin Funk 2018-09-24 13:44:30 UTC
Note: bug 393091 seems to be related.
Comment 2 Justin Zobel 2022-12-01 04:34:50 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-12-16 05:13:43 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-12-31 05:23:53 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!