[OBS/SDK] RPM environment does not pick up pkconfig files installed in /usr/lib64

REPRODUCIBILITY: 100%
OS VERSION: ALL
HARDWARE: N/A
UI LANGUAGE: N/A
REGRESSION: no

DESCRIPTION:

The rpmbuild tool, at the end of a build run scans the produced files, and can automatically assign Provides and Requires attributes to the RPM packages.

However, some paths are not scanned, and this autodetection fails, resulting in RPMs which do not “Provide” what they package.

I suppose the responsible package is: meego-rpm-config.

PRECONDITIONS:

Use the (Community) OBS, have software which installs a pkgconfig (.pc) file.
Have both a 32bit and a 64bit repository configured.

I have not checked whether this applies to the SDK builder as well, but it should if the configuration is similar.

STEPS TO REPRODUCE:

  1. configure the build to install a pkgconfig .pc file into %{_libdir}
  2. build for both 32bit and 64 bit architectures
  3. inspect the Provides attributes of the built RPMs
  4. Notice that the 64bit one does not list the pkgconfig name as Provides, while the 32bit version does.

EXPECTED RESULT:

Both RPMs should have an autodetected Provides field.

ACTUAL RESULT:

See steps to reproduce 4.

MODIFICATIONS:

N/A

ADDITIONAL INFORMATION:

Note, while many most build systems (Makefiles, cmake, others) use a separate path for packageonfig files, such as %{_prefix}/lib/pkgconfig/, others do use the LIBRARY_PATH, and so will use different install paths on 64 and 32 bit.
This is valid wrt. pkgconfig.

I have even seen recent pull requests in some projects explicitly changing behaviour from hardcoded lib/pkgconfig to LIBRARY_PATH

Note: The same, rpmbuild not searching all applicable paths for Provides, applies to e.g. cmake file which instead of /usr/share/cmake (%{_datadir}) use %{_libdir}/cmake as install location.

4 Likes