Enable uninstalled ark build
Closed, InvalidPublic

Description

See https://community.kde.org/Guidelines_and_HOWTOs/Making_apps_run_uninstalled

If I try to do it (by bumping ecm to 5.38), there is weird crash when loading a cliplugin:

Thread 1 (Thread 0x7fa7dd4e6800 (LWP 19265)):
[KCrash Handler]
#5  0x00007fa7dd0d8865 in QVector<Kerfuffle::Archive::Entry*>::operator= (this=0x556fd1b5de20, v=...) at /usr/include/qt/QtCore/qvector.h:472
#6  0x00007fa7dd0d2ba2 in Kerfuffle::CliInterface::deleteFiles (this=0x556fd1b5dd30, files=...) at ../kerfuffle/cliinterface.cpp:252
#7  0x00007fa7dd0cfc4e in Kerfuffle::CliInterface::list (this=0x556fd1b5dd30) at ../kerfuffle/cliinterface.cpp:91
#8  0x00007fa7dd0a378c in Kerfuffle::LoadJob::doWork (this=0x556fd198d360) at ../kerfuffle/jobs.cpp:269
#9  0x00007fa7dd0aa78b in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (Kerfuffle::Job::*)()>::call(void (Kerfuffle::Job::*)(), Kerfuffle::Job*, void**) (f=&virtual table offset 136, o=0x556fd198d360, arg=0x7fff7da8a070) at /usr/include/qt/QtCore/qobjectdefs_impl.h:134
#10 0x00007fa7dd0aa6f3 in QtPrivate::FunctionPointer<void (Kerfuffle::Job::*)()>::call<QtPrivate::List<>, void>(void (Kerfuffle::Job::*)(), Kerfuffle::Job*, void**) (f=&virtual table offset 136, o=0x556fd198d360, arg=0x7fff7da8a070) at /usr/include/qt/QtCore/qobjectdefs_impl.h:167
#11 0x00007fa7dd0aa616 in QtPrivate::QSlotObject<void (Kerfuffle::Job::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x556fd1dcf760, r=0x556fd198d360, a=0x7fff7da8a070, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:396
#12 0x00007fa7d74f8534 in ?? () from /usr/lib/libQt5Core.so.5
#13 0x00007fa7d74ebefb in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#14 0x00007fa7d826a5dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#15 0x00007fa7d8271db6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007fa7d74bb1c0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#17 0x00007fa7d75162f8 in QTimerInfoList::activateTimers() () from /usr/lib/libQt5Core.so.5
#18 0x00007fa7d7516af2 in ?? () from /usr/lib/libQt5Core.so.5
#19 0x00007fa7d188fe38 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0x00007fa7d1890081 in ?? () from /usr/lib/libglib-2.0.so.0
#21 0x00007fa7d189010e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#22 0x00007fa7d7516ec1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#23 0x00007fa7cd23f672 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#24 0x00007fa7d74b991b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#25 0x00007fa7d74c2b68 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#26 0x0000556fd0e2a678 in main (argc=1, argv=0x7fff7da8b6b8) at ../app/main.cpp:328

strace says:

$ strace -e open ./ark
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/qt/plugins/platforms", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
open("/usr/lib/qt/plugins/xcbglintegrations", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 6
open("/usr/lib/qt/plugins/platformthemes", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 6
open("/usr/lib/qt/qml/QtQuick/Controls.2", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 6
open("/usr/lib/qt/plugins/platforminputcontexts", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 6
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 7
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 7
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/dev/dri", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 7
open("/dev/dri", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 7
open("/dev/dri", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 7
open("/usr/lib/qt/plugins/styles", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 8
open("/usr/lib/qt/plugins/iconengines", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 10
open("/etc/fonts/conf.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 10
open("/home/elvis/.config/fontconfig/conf.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 11
open("/usr/lib/qt/plugins/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 10
open("/home/elvis/dev/kde/ark/build/bin/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 10
open("/usr/lib/qt/plugins/imageformats", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 11
open("/usr/lib/qt/plugins/kerfuffle", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 11
open("/home/elvis/dev/kde/ark/build/bin/kerfuffle", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 11
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 11
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 11
open("/usr/lib/qt/plugins/kerfuffle", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 11
open("/home/elvis/dev/kde/ark/build/bin/kerfuffle", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 11
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20137, si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
open("/usr/lib/qt/plugins/kerfuffle", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 11
open("/home/elvis/dev/kde/ark/build/bin/kerfuffle", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 11
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL}

Indeed it does not crash if I uninstall the system-wide ark package.