Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 700780 - app-arch/zstd-1.4.4-r1: legacy 32-bit library path in 64-bit pkg-config
Summary: app-arch/zstd-1.4.4-r1: legacy 32-bit library path in 64-bit pkg-config
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard: Keeping this bug open until an offici...
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2019-11-20 14:54 UTC by Jan Ziak (atomsymbol)
Modified: 2020-03-20 19:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix the issue (pkg-config.patch,411 bytes, patch)
2019-11-20 14:55 UTC, Jan Ziak (atomsymbol)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (atomsymbol) 2019-11-20 14:54:03 UTC
Hi. zstd 1.4.4 installs a pkg-config file which contains -L${libdir}. Gentoo's 64-bit libraries are located in /usr/lib64, but zstd's pkg-config file always returns /usr/lib irrespective of whether building a 32-bit or 64-bit application which uses zstd.

Reproducible: Always

Steps to Reproduce:
1. pkg-config --libs libzstd
Actual Results:  
-L/usr/lib -lzstd

Expected Results:  
-lzstd
Comment 1 Jan Ziak (atomsymbol) 2019-11-20 14:55:00 UTC
Created attachment 596892 [details, diff]
Patch to fix the issue
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2019-11-20 15:31:41 UTC
The patch maybe fixes your problem but shouldn't be applied.
The correct solution is to set correct libdir in pc file.
Comment 3 Jan Ziak (atomsymbol) 2019-11-20 15:38:27 UTC
(In reply to Thomas Deutschmann from comment #2)
> The patch maybe fixes your problem but shouldn't be applied.
> The correct solution is to set correct libdir in pc file.

Both options (mine patch and your suggestion) have caveats. If pkg-config outputs -L then it will also apply to libraries unrelated to zstd, such as:

LDFLAGS=$(pkg-config --libs libzstd) $(pkg-config --libs ncurses)

yields:

LDFLAGS=-L/usr/lib -lzstd -lncurses -ltinfo
Comment 4 Larry the Git Cow gentoo-dev 2019-11-20 15:49:34 UTC
The bug has been referenced in the following commit(s):

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

commit a1d7f9a6df4f818df3f203524d7c82cf2e4b3f7c
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2019-11-20 15:48:57 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-11-20 15:49:28 +0000

    app-arch/zstd: Revbump to fix libdir in pkgconfig file
    
    Revert questionable upstream commit until they come with a hopefully
    better fix.
    
    Reported-by: Jan Ziak <0xe2.0x9a.0x9b@gmail.com>
    Upstream-bug: https://github.com/facebook/zstd/issues/1900
    Bug: https://bugs.gentoo.org/700780
    Package-Manager: Portage-2.3.79, Repoman-2.3.18
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch | 67 ++++++++++++++++++++++
 .../{zstd-1.4.4-r1.ebuild => zstd-1.4.4-r2.ebuild} |  4 ++
 2 files changed, 71 insertions(+)
Comment 5 Matt Turner gentoo-dev 2020-03-20 18:36:43 UTC
I was confused with this bug, but here's what's going on:


Issue 2001 was filed upstream and fixed by https://github.com/facebook/zstd/commit/147cfbfb40ff929c96f46676fe520e6fbbbee8cc

But that commit was reverted, and as such it appears upstream master is still broken.
Comment 6 Larry the Git Cow gentoo-dev 2020-03-20 19:03:14 UTC
The bug has been closed via the following commit(s):

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

commit 164363f78449fd945fc67228409ea94fd66dc882
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2020-03-20 19:02:18 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2020-03-20 19:02:18 +0000

    app-arch/zstd: Use upstream fix for pkgconfig libdir
    
    - Shortened make43 patch name
    - Simplified ebuild a bit
    
    Closes: https://bugs.gentoo.org/700780
    Package-Manager: Portage-2.3.94, Repoman-2.3.21
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 ...ix-usage-1987.patch => zstd-1.4.4-make43.patch} |   0
 app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch |  67 -------
 .../zstd/files/zstd-1.4.4-pkgconfig_libdir.patch   | 215 +++++++++++++++++++++
 app-arch/zstd/zstd-1.4.4-r3.ebuild                 |  12 +-
 4 files changed, 220 insertions(+), 74 deletions(-)