https://bugs.kde.org/show_bug.cgi?id=398907

            Bug ID: 398907
           Summary: kdevelop! script can't load libraries (Ubuntu 16.04;
                    AppImage; zsh)
           Product: kdevelop
           Version: 5.2.4
          Platform: Appimage
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: wou...@simply-life.net
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to