Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 887731

Summary: net-libs/miniupnpc-2.2.4: invalid libdir in pkgconfig file on 64 bits system
Product: Gentoo Linux Reporter: Jocelyn Mayer <l_indien>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: RESOLVED FIXED    
Severity: normal CC: l_indien
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 731004    
Attachments: Output from emerge --info =net-libs/miniupnpc-2.2.4
Ebuild patch proposal to fix miniupnpc.pc.in file and thus generate a correct miniupnpc.pc file

Description Jocelyn Mayer 2022-12-21 15:41:25 UTC
Created attachment 844533 [details]
Output from emerge --info =net-libs/miniupnpc-2.2.4

For miniupnpc package, libdir is hardcoded in miniupnpc.pc.in and not processed while generated miniupnpc.pc
This leads to an invalid path in the installed miniupnpc.pc into pkgconfig directory for 64 bits systems and would make dependency not properly detect miniupnpc and / or have an invalid link path.
This last point is particulary problematic on mulitlib distributions, as dependency links would have a /usr/lib and /usr/lib64 set on their link path. At least ld.lld (llvm toolchain linker) would then emit an error while linking.

Steps to reproduce:
» ebuild miniupnpc install (for safety) or emerge miniupnpc on a 64 bits system
» check the content of /usr/lib64/pkgconfig/miniupnpc.pc

Actual result:
libdir=${exec_prefix}/lib

Expected result:
libdir=${exec_prefix}/lib64
Comment 1 Jocelyn Mayer 2022-12-21 15:42:49 UTC
Created attachment 844535 [details]
Ebuild patch proposal to fix miniupnpc.pc.in file and thus generate a correct miniupnpc.pc file
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-02-11 17:09:50 UTC
I'm sorry, I have missed this bug.  Thanks for the patch, however it's cleaner to fix it via passing LIBDIR= to make.
Comment 3 Larry the Git Cow gentoo-dev 2024-02-11 17:10:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb7e3b58cb903f77ab5b97bec7e4a1e625755c76

commit bb7e3b58cb903f77ab5b97bec7e4a1e625755c76
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-02-11 17:10:14 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-02-11 17:10:14 +0000

    net-libs/miniupnpc: Fix libdir path in pkg-config file
    
    Closes: https://bugs.gentoo.org/887731
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 .../miniupnpc/{miniupnpc-2.2.6.ebuild => miniupnpc-2.2.6-r1.ebuild}     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)