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
Created attachment 596892 [details, diff] Patch to fix the issue
The patch maybe fixes your problem but shouldn't be applied. The correct solution is to set correct libdir in pc file.
(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
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(+)
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.
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(-)