Bug 463856

Summary: AppImage fails to run: undefined symbol
Product: [Applications] kate Reporter: Charles Huber <genpfault>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: christoph
Priority: NOR    
Version: 22.12.0   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: LD_DEBUG=bindings run of kate-master-741-linux-gcc-x86_64.AppImage showing usage of system libKF5KIOFileWidgets.so

Description Charles Huber 2023-01-05 00:02:04 UTC
STEPS TO REPRODUCE
1. Grab AppImages:
    * Release: https://binary-factory.kde.org/job/Kate_Release_appimage-centos7/
    * Nightly https://binary-factory.kde.org/job/Kate_Nightly_appimage-centos7/
2. chmod +x
3. Attempt to run


OBSERVED RESULT
Kate fails to start with these messages:

# 'release' AppImages
genpfault@gpf:~/Tools/Kate$ ./kate-22.12.0-734-linux-gcc-x86_64.AppImage 
"applications.menu"  not found in  ("/home/genpfault/.config/menus", "/etc/xdg/menus")
/tmp/.mount_kate-2RdBrI9/AppRun.wrapped: symbol lookup error: /tmp/.mount_kate-2RdBrI9/usr/plugins/ktexteditor/katefilebrowserplugin.so: undefined symbol: _ZNK12KDirOperator6actionENS_6ActionE
genpfault@gpf:~/Tools/Kate$ ./kate-22.12.0-738-linux-gcc-x86_64.AppImage 
"applications.menu"  not found in  ("/home/genpfault/.config/menus", "/etc/xdg/menus")
/tmp/.mount_kate-2gyEUJB/AppRun.wrapped: symbol lookup error: /tmp/.mount_kate-2gyEUJB/usr/plugins/ktexteditor/katefilebrowserplugin.so: undefined symbol: _ZNK12KDirOperator6actionENS_6ActionE

# 'nightly' AppImage
genpfault@gpf:~/Tools/Kate$ ./kate-master-741-linux-gcc-x86_64.AppImage 
"applications.menu"  not found in  ("/home/genpfault/.config/menus", "/etc/xdg/menus")
/tmp/.mount_kate-muathby/AppRun.wrapped: symbol lookup error: /tmp/.mount_kate-muathby/usr/plugins/ktexteditor/katefilebrowserplugin.so: undefined symbol: _ZN12KDirOperator11setViewModeEN5KFile8FileViewE

Demangled symbols:

_ZNK12KDirOperator6actionENS_6ActionE ->
KDirOperator::action(KDirOperator::Action) const

_ZN12KDirOperator11setViewModeEN5KFile8FileViewE ->
KDirOperator::setViewMode(KFile::FileView)


EXPECTED RESULT
For Kate to launch successfully.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian Bullseye/Debian 11 amd64
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Comment 1 Charles Huber 2023-01-06 03:17:11 UTC
I get the same missing symbol error as the nightly AppImage when trying run kate after building with kdesrc-build:

genpfault@gpf:~/Workspace/kde/src$ kate --version
kate 23.03.70
genpfault@gpf:~/Workspace/kde/src$ kate
kate: symbol lookup error: /home/genpfault/Workspace/kde/usr/lib/x86_64-linux-gnu/plugins/ktexteditor/katefilebrowserplugin.so: undefined symbol: _ZN12KDirOperator11setViewModeEN5KFile8FileViewE

Demangled: KDirOperator::setViewMode(KFile::FileView)
Comment 2 Charles Huber 2023-01-06 03:20:46 UTC
Using the system kate (20.12.2) to disable the File System Browser plugin allows both the nightly AppImage and the kdesrc-build binary to successfully start.
Comment 3 Charles Huber 2023-01-06 03:37:26 UTC
Dropping the kdesrc-build version back to the last release tag (v22.12.1) doesn't help:

genpfault@gpf:~/Workspace/kde/src$ kate --version
kate 22.12.1
genpfault@gpf:~/Workspace/kde/src$ kate
kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but no Exec line
kf.service.sycoca: Invalid Service :  "/usr/share/applications/qemu.desktop"
Hspell: can't open /usr/share/hspell/hebrew.wgz.sizes.
kf.sonnet.clients.hspell: HSpellDict::HSpellDict: Init failed
kate: symbol lookup error: /home/genpfault/Workspace/kde/usr/lib/x86_64-linux-gnu/plugins/ktexteditor/katefilebrowserplugin.so: undefined symbol: _ZNK12KDirOperator6actionENS_6ActionE

Demangled: KDirOperator::action(KDirOperator::Action) const
Comment 4 Charles Huber 2023-01-06 03:56:05 UTC
Hmm, KDirOperator::action() is listed as "Since 5.100":

https://api.kde.org/frameworks/kio/html/classKDirOperator.html#ac33c8bcd26b115ee5cebbef81edbed19

...but CMakeLists.txt only specifies 5.90.0:

https://invent.kde.org/utilities/kate/-/blob/v22.12.1/CMakeLists.txt#L13
Comment 5 Charles Huber 2023-01-10 01:38:13 UTC
Created attachment 155168 [details]
LD_DEBUG=bindings run of kate-master-741-linux-gcc-x86_64.AppImage showing usage of system libKF5KIOFileWidgets.so

Using LD_DEBUG=bindings it looks like the AppImage is loading symbols from the distro-provided version of libKF5KIOFileWidgets.so instead of (I assume) the newer version in the AppImage.
Comment 6 Charles Huber 2023-01-10 01:51:36 UTC
Possibly related issues:
https://bugs.kde.org/show_bug.cgi?id=459682
https://bugs.kde.org/show_bug.cgi?id=461509
Comment 7 Christoph Cullmann 2023-01-14 20:57:29 UTC

*** This bug has been marked as a duplicate of bug 459682 ***