SUMMARY I am working with an esoteric system where the `ldd` command is very slow, and on which it is therefore desirable to avoid use of the `ldd` command in any way that possible. Unfortunately, this code in Ark is causing Dolphin file browser to freeze for a long time while running on that system the first time that right click is used after opening Dolphin. https://invent.kde.org/utilities/ark/-/blob/ad9d210081a6a8af0e600665bd50a5d5dc881c7a/kerfuffle/pluginmanager.cpp#L271 STEPS TO REPRODUCE 1. Build and reinstall glibc with this patch which simulates the presence of the system that has the slow `ldd` command ```diff --- a/elf/ldd.bash.in +++ b/elf/ldd.bash.in @@ -135,6 +135,7 @@ esac result=0 for file do + sleep 10 # We don't list the file name when there is only one. test $single_file = t || echo "${file}:" case $file in ``` Example code to do this on Arch Linux: ``` sudo pacman -Syyu sudo pacman -S base-devel devtools pkgctl repo clone --protocol=https glibc cd glibc git apply -v << 'EOF' --- a/PKGBUILD +++ b/PKGBUILD @@ -48,6 +48,8 @@ prepare() { [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc cd glibc + + patch -p1 < ../../ldd.patch } build() { @@ -134,6 +136,7 @@ _skip_test() { } check() ( + return 0 cd glibc-build # adjust/remove buildflags that cause false-positive testsuite failures diff --git a/ldd.patch b/ldd.patch new file mode 100644 index 0000000..c477e67 --- /dev/null +++ b/ldd.patch @@ -0,0 +1,12 @@ +diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in +index 2d3df6e57e..d8c7f337ba 100644 +--- a/elf/ldd.bash.in ++++ b/elf/ldd.bash.in +@@ -135,6 +135,7 @@ esac + + result=0 + for file do ++ sleep 10 + # We don't list the file name when there is only one. + test $single_file = t || echo "${file}:" + case $file in EOF makepkg -sifC ``` 2. Install both Ark and Dolphin, ```bash sudo pacman -S ark dolphin ``` 3. Close app running instances of Dolphin, then open Dolphin again and right click ```bash pkill dolphin dolphin ``` OBSERVED RESULT Dolphin freezes and does not respond for more than 10 seconds EXPECTED RESULT The presence or absence of LZO support in `libarchive` should be calculated some other way that does not involve the use of the `ldd` command, preferably at build-time rather than run-time if possible. SOFTWARE/OS VERSIONS Windows: Not tested macOS: Not tested Linux: Arch Linux KDE Plasma Version: 6.5.5 KDE Frameworks Version: 6.22.0 Qt Version: 6.10.2 `ldd` version: ldd (GNU libc) 2.42 (modified, crafted behavior) Graphics Platform: Wayland Dolphin version: 25.12.2 Ark version: 25.12.2 ADDITIONAL INFORMATION Esoteric system that has a slow `ldd` command is Android, specifically the Termux App package of `ldd` for Android
Correction: "in any way that possible" -> "in any way that freezes the GUI"