Summary: | sys-apps/util-linux: cross build fails due to using -L/usr/lib64 and not finding libncursesw.so.6 and libtinfow.so.6 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Joe Harvell <landshark> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aladjev.andrew, herrtimson, slyfox |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | ARM | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=653938 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
output of sudo armv7a-pip-linux-gnueabi-emerge --info
output of sudo emerge --info build.log build-.arm.log config.log configure total hack I used to make it work util-linux-2.35.ebuild.patch |
Description
Joe Harvell
2018-04-25 03:20:44 UTC
Created attachment 528476 [details]
output of sudo emerge --info
Created attachment 528478 [details]
build.log
Created attachment 528480 [details]
build-.arm.log
Created attachment 528482 [details]
config.log
Created attachment 528484 [details]
configure
Created attachment 528486 [details, diff]
total hack I used to make it work
installed successfully with this hack
I found, that this is triggered by missing "armv6j-hardfloat-linux-gnueabi-ncursesw6-config" file from ncurses package. Because of missing file it uses ncursesw6-config from original system: -------------------------------------------------------------------------- configure:20489: checking for armv6j-hardfloat-linux-gnueabi-ncursesw6-config configure:20519: result: no configure:20529: checking for ncursesw6-config configure:20545: found /usr/bin/ncursesw6-config configure:20556: result: ncursesw6-config -------------------------------------------------------------------------- (In reply to filbar from comment #7) > I found, that this is triggered by missing > "armv6j-hardfloat-linux-gnueabi-ncursesw6-config" file from ncurses package. > Because of missing file it uses ncursesw6-config from original system: > -------------------------------------------------------------------------- > configure:20489: checking for armv6j-hardfloat-linux-gnueabi-ncursesw6-config > configure:20519: result: no > configure:20529: checking for ncursesw6-config > configure:20545: found /usr/bin/ncursesw6-config > configure:20556: result: ncursesw6-config > -------------------------------------------------------------------------- I wouldn't say the problem is that the ncurses package is "missing" that file. If ncurses (when cross-compiled) installed a file with that name, it would be installed at /usr/armv6j-hardfloat-linux-gnueabi/usr/bin/armv6j-hardfloat-linux-gnueabi-ncursesw6-config. And in that case the build would not find it, since cross-emerge does not prepend /usr/armv6j-hardfloat-linux-gnueabi/usr/bin to PATH. It looks like the problem is that this ebuild should be searching in SYSROOT (/usr/armv6j-hardfloat-linux-gnueabi in your case) for an executable named ncursesw6-config. Take a look at the minor patch I made in https://bugs.gentoo.org/show_bug.cgi?id=653938. That ebuild was looing in SYSROOT, just in /bin instead of /usr/bin. As a workaround I create symlink as: "ln -s /usr/armv6j-hardfloat-linux-gnueabi/usr/bin/ncursesw6-config /usr/bin/armv6j-hardfloat-linux-gnueabi-ncursesw6-config" Yes, that would also work. Thanks. I already worked around with the patch I attached. Still there... :-( The idea of using a softlink from #9 is pretty solid stuff. It works for me. The bug is still there. Fun fact: ebuild already attempted to fix it by mangling ncursesw6-config into pkg-config ncursesw: # Undo bad ncurses handling by upstream. #601530 sed -i -E \ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \ configure || die But it does not do anything due to updated ./configure: NCURSES_LIBS=`$NCURSESW6_CONFIG --libs` NCURSES_CFLAGS=`$NCURSESW6_CONFIG --cflags` Happened in https://github.com/karelzak/util-linux/commit/862326451184bb0fe9c2b2b110fcfc986f9b1734 The following change makes util-linux to cross-compile successfully for me: diff --git a/sys-apps/util-linux/util-linux-2.35_rc1.ebuild b/sys-apps/util-linux/util-linux-2.35_rc1.ebuild index cfaef772324..f1759d4eb6c 100644 --- a/sys-apps/util-linux/util-linux-2.35_rc1.ebuild +++ b/sys-apps/util-linux/util-linux-2.35_rc1.ebuild @@ -92,12 +92,6 @@ src_prepare() { eautoreconf fi - # Undo bad ncurses handling by upstream. #601530 - sed -i -E \ - -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \ - -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \ - configure || die - elibtoolize } @@ -144,6 +138,10 @@ multilib_src_configure() { export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486 export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042 + # Undo bad ncurses handling by upstream. Fall back to pkg-config. #601530 + export NCURSES6_CONFIG=false NCURSES5_CONFIG=false + export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false + # configure args shared by python and non-python builds local commonargs=( --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" Created attachment 602812 [details, diff]
util-linux-2.35.ebuild.patch
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c84572164618637ab7528a9a95946b6bc39d0eb5 commit c84572164618637ab7528a9a95946b6bc39d0eb5 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-01-10 11:21:32 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2020-01-10 11:21:49 +0000 sys-apps/util-linux: Fixed cross-compilation Closes: https://bugs.gentoo.org/654034 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> sys-apps/util-linux/util-linux-2.33.2.ebuild | 10 ++++------ sys-apps/util-linux/util-linux-2.34-r3.ebuild | 10 ++++------ sys-apps/util-linux/util-linux-2.35_rc2.ebuild | 10 ++++------ sys-apps/util-linux/util-linux-9999.ebuild | 10 ++++------ 4 files changed, 16 insertions(+), 24 deletions(-) confirmed, working now. Thank you very much! :-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0defa5f02f34b540eafcfd9b8ec9faaa80189cde commit 0defa5f02f34b540eafcfd9b8ec9faaa80189cde Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-01-10 20:08:15 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-01-10 20:08:15 +0000 dev-lang/ghc: add powerpc64le binary for ghc-8.8.1 Bug: https://bugs.gentoo.org/654034 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-lang/ghc/Manifest | 1 + dev-lang/ghc/ghc-8.8.1.ebuild | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae822c6a643103428de23fa18fa0be867983cbcd commit ae822c6a643103428de23fa18fa0be867983cbcd Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-01-11 18:55:06 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-01-11 18:58:09 +0000 dev-lang/ghc: add powerpc64le binary for ghc-8.6.5 Bug: https://bugs.gentoo.org/654034 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-lang/ghc/Manifest | 1 + dev-lang/ghc/ghc-8.6.5.ebuild | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) (In reply to Larry the Git Cow from comment #18) > The bug has been referenced in the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=ae822c6a643103428de23fa18fa0be867983cbcd > > commit ae822c6a643103428de23fa18fa0be867983cbcd > Author: Sergei Trofimovich <slyfox@gentoo.org> > AuthorDate: 2020-01-11 18:55:06 +0000 > Commit: Sergei Trofimovich <slyfox@gentoo.org> > CommitDate: 2020-01-11 18:58:09 +0000 > > dev-lang/ghc: add powerpc64le binary for ghc-8.6.5 Gah, wrong bug. Sorry for the spam. |