On Wed, Nov 16, 2022 at 11:35 AM Richard W.M. Jones <rjones@redhat.com> wrote:
David (CC'd) is working on the Fedora RISC-V port and he noticed that
some *.pc files in Fedora contain incorrect paths.  For example[1]:

  $ pkgconf --libs libcares
  -L/usr/usr/lib64 -lcares

  $ pkgconf --libs libasyncns
  -L/usr/lib -lasyncns

On non-riscv64 this happens to work because the default search path
includes the right directory anyway (eg. /usr/lib64).

On riscv64 this causes build failures since meson seems to go off and
search for the *.so files and then tries to construct an absolute path
to them (I'm not sure if this isn't a bug in meson TBH).  For example:

  http://fedora.riscv.rocks/koji/taskinfo?taskID=1305782

This problem appears to be widespread.  I scanned just the *-devel
packages that I happen to have installed, results below.  Not sure how
to scan all *-devel packages in Fedora.

What should we do here?  Is it worth having an RPM build step that
checks for this problem?

Maybe it would make sense to have a brp check for that, so that the builds error out with invalid paths? Similar to e.g. how /usr/lib/rpm/check-rpaths is hooked into %__os_install_post in /usr/lib/rpm/redhat/macros

-- 
Kalev