Bug 1216862

Summary: libtirpc-devel pkg-config file has broken include path
Product: [openSUSE] openSUSE Distribution Reporter: Daniel Berrange <berrange>
Component: DevelopmentAssignee: E-mail List <screening-team-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: claudio.fontana, thomas.blume
Version: Leap 15.5   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Daniel Berrange 2023-11-03 12:52:20 UTC
The latest libtirpc-devel-1.3.4-150300.3.20.1.x86_64 rebase on leap 15.5 resulted in a broken include path for the pkg-config file cflags:

  # grep Cflag /usr/lib64/pkgconfig/libtirpc.pc 
  Cflags: -I${includedir}/tirpc

The headers are actually installed directly into ${includedir} not in a sub-dir.

The RPM spec for tumbleweed branch has addressed this:

  sed -i -e 's|${includedir}/tirpc|${includedir}|g' libtirpc.pc.in

And we can see it work:

  # grep Cflag /usr/lib64/pkgconfig/libtirpc.pc 
  Cflags: -I${includedir}


While the compiler can still find the headers, as they're directly in a system include dir, it can still result in either warnings, or errors depending on how the 'missing-include-dirs' option is used by the project

eg

# gcc -Werror=missing-include-dirs demo.c `pkg-config --cflags libtirpc`
cc1: error: /usr/include/tirpc: No such file or directory [-Werror=missing-include-dirs]
cc1: some warnings being treated as errors
Comment 1 Thomas Blume 2023-11-07 08:29:33 UTC
(In reply to Daniel Berrange from comment #0)
> The latest libtirpc-devel-1.3.4-150300.3.20.1.x86_64 rebase on leap 15.5
> resulted in a broken include path for the pkg-config file cflags:
> 
>   # grep Cflag /usr/lib64/pkgconfig/libtirpc.pc 
>   Cflags: -I${includedir}/tirpc
> 
> The headers are actually installed directly into ${includedir} not in a
> sub-dir.
> 
> The RPM spec for tumbleweed branch has addressed this:
> 
>   sed -i -e 's|${includedir}/tirpc|${includedir}|g' libtirpc.pc.in


Thanks for the hint.
Indeed, the sed command in the 15.5 specfile was not adapted to the change of:

https://git.linux-nfs.org/?p=steved/libtirpc.git;a=commitdiff;h=5c3da4972dbc8ff4cf7cf97b3df0e323af0000be;hp=60467de3c1207a1e1a37694b6c13ae5cf3b459aa

I'm preparing an update.
Comment 3 Thomas Blume 2023-11-14 11:12:29 UTC
fix has been submitted, closing
Comment 4 Maintenance Automation 2023-12-12 12:30:11 UTC
SUSE-RU-2023:4723-1: An update that has one fix can now be installed.

Category: recommended (moderate)
Bug References: 1216862
Sources used:
openSUSE Leap 15.3 (src): libtirpc-1.3.4-150300.3.23.1
openSUSE Leap Micro 5.3 (src): libtirpc-1.3.4-150300.3.23.1
openSUSE Leap Micro 5.4 (src): libtirpc-1.3.4-150300.3.23.1
openSUSE Leap 15.4 (src): libtirpc-1.3.4-150300.3.23.1
openSUSE Leap 15.5 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Micro for Rancher 5.3 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Micro 5.3 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Micro for Rancher 5.4 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Micro 5.4 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Micro 5.5 (src): libtirpc-1.3.4-150300.3.23.1
Basesystem Module 15-SP4 (src): libtirpc-1.3.4-150300.3.23.1
Basesystem Module 15-SP5 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Enterprise Storage 7.1 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Micro 5.1 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Micro 5.2 (src): libtirpc-1.3.4-150300.3.23.1
SUSE Linux Enterprise Micro for Rancher 5.2 (src): libtirpc-1.3.4-150300.3.23.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.