fitzsim created an issue (rpm-software-management/rpm#3667)

When packaging a proprietary program, I encountered a library file that 
contained both `RPATH` and `RUNPATH`.

`check-rpath-worker` reports this as an error as a side effect of not properly 
handling the fact that there are two entries.  The error message is as follows 
(library path redacted):

```
ERROR   0002: file '/[...]/lib[...].so' contains an invalid rpath
runpath '$ORIGIN
$ORIGIN' in [$ORIGIN
$ORIGIN]
```

I could not make `binutils ld.bfd` nor `LLVM lld` output both `RPATH` and 
`RUNPATH`.

I did create a minimal standlone library that replicates the issue using `GCC`, 
`binutils`, and the `Common Lisp` `elf` system, which I can provide steps for 
if necessary.

Such ELF files must be rare, and it is not clear whether `check-rpath-worker` 
should treat the presence of both fields as an error, or simply consider each 
of `RPATH` and `RUNPATH` separately.

In the affected library, both fields do contain valid values.

I looked at the history and found that the script used to handle the two fields 
independently prior to commit 5417bffe37a9dfbfd33734f3f46d82adb927463b.

I guess that was an optimization to avoid calling `readelf` twice.  But it 
should probably have checked if the `readelf` result contained two lines, then 
iterated over them.

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

Message ID: <rpm-software-management/rpm/issues/3...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to