[Rpm-maint] [rpm-software-management/rpm] find-debuginfo can't handle mixed-architecture packages (Issue #3795)

lantw44 notifications at github.com
Sun Jun 8 07:14:38 UTC 2025


lantw44 created an issue (rpm-software-management/rpm#3795)

**Describe the bug**
If a package contains binaries of two architectures, `find-debuginfo` fails due to `gdb-add-index` errors. This can happen in a cross compiler package since it has to include both host and target binaries.

**To Reproduce**
Steps to reproduce the behavior:
1. Download my [aarch64-linux-gnu-gcc](https://copr.fedorainfracloud.org/coprs/lantw44/aarch64-linux-gnu-toolchain/package/aarch64-linux-gnu-gcc/) package.
2. Remove all `gdb-add-index` calls in the [spec file](https://github.com/lantw44/copr-rpm-spec/blob/a3bdd9eacc74f650552a04a648160f0536315f4d/arm-linux-gnueabi-toolchain/arm-linux-gnueabi-gcc/15/arm-linux-gnueabi-gcc.spec#L225-L237).
3. Build on x86_64 and see it aborts the build due to `gdb-add-index` errors.

**Expected behavior**
I am not sure what is the expected behavior. The issue comes from the inability of the x86_64 `objcopy` to handle aarch64 binaries. While `find-debuginfo` supports changing the `objcopy` command with the `OBJCOPY` environment variable, it can't switch between different `objcopy` for different binaries. Therefore, even if I set `OBJCOPY=aarch64-linux-gnu-objcopy`, it would fail with the same error because `aarch64-linux-gnu-objcopy` can't handle x86_64 binaries.

**Output**
```
ERROR:: GDB exited with exit status 1 during index generation.
```

**Environment**
 - OS / Distribution: Fedora 42
 - Version 4.20.1

**Additional context**
It can be worked around by manually running `gdb-add-index` before `find-debuginfo` sees them.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3795
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/3795 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250608/581a20c5/attachment.htm>


More information about the Rpm-maint mailing list