Is there any reason why PREFIX is hardcoded to "/usr" instead of "EPREFIX"? https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/libmpack/libmpack-1.0.5.ebuild#n33 https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/libmpack/libmpack-1.0.5.ebuild#n48 This issues causes "dev-lua/mpack" to build with wrong symbols, because it picks up the libmpack from the host, instead of prefix. Specifically, dev-lua/mpack uses pkg-config to configure build flags: pkg-config --cflags mpack and this returns /usr/lib instead of EPREFIX/lib All this is related to building neovim in prefix. I'm getting: ${EPREFIX}/usr/lib64/lua/5.1/mpack.so: undefined symbol: luaL_prepbuffsize because dev-lua/mpack is built with host libmpack instead of the prefix.
I can confirm this issue (also for installing neovim). My symptom is the following (stemming from host stdio.h): ``` /usr/include/stdio.h:781:10: fatal error: bits/sys_errlist.h: No such file or directory 781 | #include <bits/sys_errlist.h> | ^~~~~~~~~~~~~~~~~~~~ ``` A possible workaround is to remove "USE_SYSTEM_MPACK=yes" from lua_src_compile @ mpack-1.0.9-r1.ebuild (which removes the erroneous -I/usr/include flag)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5556775b66ecf5de31e908b052967c03b8db9952 commit 5556775b66ecf5de31e908b052967c03b8db9952 Author: Conrad Kostecki <conikost@gentoo.org> AuthorDate: 2022-02-20 15:03:34 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2022-02-20 15:03:34 +0000 dev-libs/libmpack: fix prefix Closes: https://bugs.gentoo.org/831898 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> .../libmpack/{libmpack-1.0.5-r1.ebuild => libmpack-1.0.5-r2.ebuild} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Hi! I checked the setup, it still fails because after installation, pkgconfig is taken from LIBDIR/INCDIR variables provided from the eclass, and they point to host root, not to EPREFIX. The change that helped: ``` diff --git a/dev-libs/libmpack/libmpack-1.0.5-r2.ebuild b/dev-libs/libmpack/libmpack-1.0.5-r2.ebuild index b0bcd1ed763..116451d9c01 100644 --- a/dev-libs/libmpack/libmpack-1.0.5-r2.ebuild +++ b/dev-libs/libmpack/libmpack-1.0.5-r2.ebuild @@ -29,7 +29,8 @@ src_compile() { "PREFIX=${EPREFIX}/usr" "CC=$(tc-getCC)" "config=release" - "LIBDIR=/usr/$(get_libdir)" + "LIBDIR=${EPREFIX}/usr/$(get_libdir)" + "INCDIR=${EPREFIX}/usr/include" ) emake "${myemakeargs[@]}" lib-bin @@ -42,8 +43,9 @@ src_test() { src_install() { local myemakeargs=( "PREFIX=${EPREFIX}/usr" - "DESTDIR=${ED}" - "LIBDIR=/usr/$(get_libdir)" + "DESTDIR=${D}" + "LIBDIR=${EPREFIX}/usr/$(get_libdir)" + "INCDIR=${EPREFIX}/usr/include" "XLDFLAGS=-shared" ) ```
I can confirm that libmpack-1.0.5-r2 patch _does not_ fix the installation (now fails at QA with double prefix).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e97e5e3c03d2f1145b777341aafbb713436a842f commit e97e5e3c03d2f1145b777341aafbb713436a842f Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2022-07-14 19:41:27 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2022-07-14 19:43:02 +0000 dev-libs/libmpack-1.0.5-r3: fix for Prefix, bug #831898 Patch by Victor Ananyev in bug 831898#c3 Closes: https://bugs.gentoo.org/831898 Signed-off-by: Fabian Groffen <grobian@gentoo.org> dev-libs/libmpack/libmpack-1.0.5-r3.ebuild | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)