Fedora Account System
Red Hat Associate
Red Hat Customer
"gdb-add-index" uses "which" to locate the gdb executable. Without it the output is a gdb-add-index: Failed to find a useable GDB binary This can be reproduced easily on minimal systems that do not have "which" installed, e.g. "fedora" container images. This can also be seen in any supported Fedora version, starting from 39 up to the current Rawhide (and most likely it was an issue also in older versions). Example instructions using a Fedora Rawhide container image follow, including showing how installing "which" makes "gdb-add-index" functional: $ podman run -it --rm --pull=newer fedora:rawhide [root@acc9e7112292 /]# dnf --setopt install_weak_deps=False install -y debugedit Updating and loading repositories: Fedora rawhide openh264 (From Cisco) - x86_64 100% | 16.3 KiB/s | 6.0 KiB | 00m00s Fedora - Rawhide - Developmental packages for the next Fedora release 100% | 12.1 MiB/s | 21.7 MiB | 00m02s Repositories loaded. Package Arch Version Repository Size Installing: debugedit x86_64 5.1-1.fc42 rawhide 192.7 KiB Installing dependencies: binutils x86_64 2.43.50-5.fc42 rawhide 27.6 MiB dwz x86_64 0.15-8.fc42 rawhide 299.2 KiB elfutils x86_64 0.192-3.fc42 rawhide 2.7 MiB elfutils-debuginfod-client x86_64 0.192-3.fc42 rawhide 76.0 KiB gdb-minimal x86_64 15.2-1.fc42 rawhide 13.0 MiB jansson x86_64 2.14-1.fc42 rawhide 93.1 KiB xxhash-libs x86_64 0.8.2-4.fc42 rawhide 88.4 KiB Transaction Summary: Installing: 8 packages Total size of inbound packages is 12 MiB. Need to download 12 MiB. After this operation, 44 MiB extra will be used (install 44 MiB, remove 0 B). [1/8] dwz-0:0.15-8.fc42.x86_64 100% | 2.7 MiB/s | 139.1 KiB | 00m00s [2/8] elfutils-debuginfod-client-0:0.192-3.fc42.x86_64 100% | 2.8 MiB/s | 43.4 KiB | 00m00s [3/8] debugedit-0:5.1-1.fc42.x86_64 100% | 780.5 KiB/s | 78.1 KiB | 00m00s [4/8] jansson-0:2.14-1.fc42.x86_64 100% | 1.8 MiB/s | 45.3 KiB | 00m00s [5/8] elfutils-0:0.192-3.fc42.x86_64 100% | 2.5 MiB/s | 543.7 KiB | 00m00s [6/8] xxhash-libs-0:0.8.2-4.fc42.x86_64 100% | 1.8 MiB/s | 36.8 KiB | 00m00s [7/8] gdb-minimal-0:15.2-1.fc42.x86_64 100% | 15.2 MiB/s | 4.3 MiB | 00m00s [8/8] binutils-0:2.43.50-5.fc42.x86_64 100% | 17.5 MiB/s | 6.5 MiB | 00m00s -------------------------------------------------------------------------------------------------------------------------- [8/8] Total 100% | 11.8 MiB/s | 11.6 MiB | 00m01s Running transaction [ 1/10] Verify package files 100% | 98.0 B/s | 8.0 B | 00m00s [ 2/10] Prepare transaction 100% | 533.0 B/s | 8.0 B | 00m00s [ 3/10] Installing elfutils-debuginfod-client-0:0.192-3.fc42.x86_64 100% | 9.5 MiB/s | 78.2 KiB | 00m00s [ 4/10] Installing elfutils-0:0.192-3.fc42.x86_64 100% | 156.8 MiB/s | 2.7 MiB | 00m00s [ 5/10] Installing xxhash-libs-0:0.8.2-4.fc42.x86_64 100% | 21.9 MiB/s | 89.8 KiB | 00m00s [ 6/10] Installing gdb-minimal-0:15.2-1.fc42.x86_64 100% | 216.6 MiB/s | 13.0 MiB | 00m00s [ 7/10] Installing jansson-0:2.14-1.fc42.x86_64 100% | 18.5 MiB/s | 94.5 KiB | 00m00s [ 8/10] Installing binutils-0:2.43.50-5.fc42.x86_64 100% | 310.4 MiB/s | 27.6 MiB | 00m00s [ 9/10] Installing dwz-0:0.15-8.fc42.x86_64 100% | 58.7 MiB/s | 300.6 KiB | 00m00s [10/10] Installing debugedit-0:5.1-1.fc42.x86_64 100% | 3.1 MiB/s | 195.4 KiB | 00m00s Complete! [root@acc9e7112292 /]# gdb-add-index gdb-add-index: Failed to find a useable GDB binary [root@acc9e7112292 /]# bash -x gdb-add-index + OBJCOPY=objcopy + READELF=readelf + myname=gdb-add-index + test -z '' + for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb + which /usr/bin/gdb.minimal + continue + for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb + which gdb + continue + for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb + which /usr/libexec/gdb + continue + test -z '' + echo 'gdb-add-index: Failed to find a useable GDB binary' gdb-add-index: Failed to find a useable GDB binary + exit 1 [root@acc9e7112292 /]# dnf --setopt install_weak_deps=False install -y which Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: which x86_64 2.21-42.fc41 rawhide 80.2 KiB Transaction Summary: Installing: 1 package Total size of inbound packages is 42 KiB. Need to download 42 KiB. After this operation, 80 KiB extra will be used (install 80 KiB, remove 0 B). [1/1] which-0:2.21-42.fc41.x86_64 100% | 1.4 MiB/s | 41.6 KiB | 00m00s -------------------------------------------------------------------------------------------------------------------------- [1/1] Total 100% | 185.5 KiB/s | 41.6 KiB | 00m00s Running transaction [1/3] Verify package files 100% | 0.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 90.0 B/s | 1.0 B | 00m00s [3/3] Installing which-0:2.21-42.fc41.x86_64 100% | 2.5 MiB/s | 82.4 KiB | 00m00s Complete! [root@acc9e7112292 /]# gdb-add-index usage: gdb-add-index [-dwarf-5] FILE Reproducible: Always
I misfiled it for "debugedit", whereas the problem is actually in the "gdb-minimal" package; example reproducer using a Fedora Rawhide container as above: $ podman run -it --rm --pull=newer fedora:rawhide [root@9ff2ba5478f7 /]# dnf --setopt install_weak_deps=False install -y gdb-minimal Updating and loading repositories: Fedora rawhide openh264 (From Cisco) - x86_64 100% | 6.3 KiB/s | 6.0 KiB | 00m01s Fedora - Rawhide - Developmental packages for the next Fedora release 100% | 12.7 MiB/s | 21.6 MiB | 00m02s Repositories loaded. Package Arch Version Repository Size Installing: gdb-minimal x86_64 15.2-1.fc42 rawhide 13.0 MiB Installing dependencies: elfutils-debuginfod-client x86_64 0.192-3.fc42 rawhide 76.0 KiB xxhash-libs x86_64 0.8.2-4.fc42 rawhide 88.4 KiB Transaction Summary: Installing: 3 packages Total size of inbound packages is 4 MiB. Need to download 4 MiB. After this operation, 13 MiB extra will be used (install 13 MiB, remove 0 B). [1/3] elfutils-debuginfod-client-0:0.192-3.fc42.x86_64 100% | 1.2 MiB/s | 43.4 KiB | 00m00s [2/3] xxhash-libs-0:0.8.2-4.fc42.x86_64 100% | 875.6 KiB/s | 36.8 KiB | 00m00s [3/3] gdb-minimal-0:15.2-1.fc42.x86_64 100% | 20.8 MiB/s | 4.3 MiB | 00m00s -------------------------------------------------------------------------------------------------------------------------- [3/3] Total 100% | 5.6 MiB/s | 4.4 MiB | 00m01s Running transaction [1/5] Verify package files 100% | 107.0 B/s | 3.0 B | 00m00s [2/5] Prepare transaction 100% | 300.0 B/s | 3.0 B | 00m00s [3/5] Installing xxhash-libs-0:0.8.2-4.fc42.x86_64 100% | 11.0 MiB/s | 89.8 KiB | 00m00s [4/5] Installing elfutils-debuginfod-client-0:0.192-3.fc42.x86_64 100% | 8.5 MiB/s | 78.2 KiB | 00m00s [5/5] Installing gdb-minimal-0:15.2-1.fc42.x86_64 100% | 97.0 MiB/s | 13.0 MiB | 00m00s Complete! [root@9ff2ba5478f7 /]# gdb-add-index gdb-add-index: Failed to find a useable GDB binary [root@9ff2ba5478f7 /]# bash -x gdb-add-index + OBJCOPY=objcopy + READELF=readelf + myname=gdb-add-index + test -z '' + for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb + which /usr/bin/gdb.minimal + continue + for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb + which gdb + continue + for possible_gdb in /usr/bin/gdb.minimal gdb /usr/libexec/gdb + which /usr/libexec/gdb + continue + test -z '' + echo 'gdb-add-index: Failed to find a useable GDB binary' gdb-add-index: Failed to find a useable GDB binary + exit 1 [root@9ff2ba5478f7 /]# dnf --setopt install_weak_deps=False install -y which Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: which x86_64 2.21-42.fc41 rawhide 80.2 KiB Transaction Summary: Installing: 1 package Total size of inbound packages is 42 KiB. Need to download 42 KiB. After this operation, 80 KiB extra will be used (install 80 KiB, remove 0 B). [1/1] which-0:2.21-42.fc41.x86_64 100% | 1.3 MiB/s | 41.6 KiB | 00m00s -------------------------------------------------------------------------------------------------------------------------- [1/1] Total 100% | 73.8 KiB/s | 41.6 KiB | 00m01s Running transaction [1/3] Verify package files 100% | 0.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 83.0 B/s | 1.0 B | 00m00s [3/3] Installing which-0:2.21-42.fc41.x86_64 100% | 2.2 MiB/s | 82.4 KiB | 00m00s Complete! [root@9ff2ba5478f7 /]# gdb-add-index usage: gdb-add-index [-dwarf-5] FILE
... and already filed as bug 2323513, so closing this as duplicate. Sorry for the mess! *** This bug has been marked as a duplicate of bug 2323513 ***