View previous topic :: View next topic |
Author |
Message |
joeydumont n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 22 Dec 2024 Posts: 4
|
Posted: Sun Dec 22, 2024 4:26 pm Post subject: =sys-apps/util-linux-2.40.2 not building on Gentoo Prefix |
|
|
I'm seeing a build issue with =sys-apps/util-linux-2.40.2 on my Gentoo Prefix install. Specifically, the following error:
Code: |
libtool: link: x86_64-pc-linux-gnu-gcc -fsigned-char -fno-common -Wall -Wextra -Waddress-of-packed-member -Wdiscarded-qualifiers -Wformat-security -Wimplicit-function-declaration -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wno-missing-field-initializers -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wsign-compare -Wstrict-prototypes -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wvla -Walloca -Werror=sequence-point -I./libsmartcols/src -march=native -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=4 -fuse-linker-plugin -pipe -Wl,-O1 -Wl,-z -Wl,pack-relative-relocs -Wl,-O1 -Wl,-z -Wl,pack-relative-relocs -march=native -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=4 -fuse-linker-plugin -pipe -o .libs/lscpu sys-utils/lscpu-lscpu.o sys-utils/lscpu-lscpu-cputype.o sys-utils/lscpu-lscpu-cpu.o sys-utils/lscpu-lscpu-topology.o sys-utils/lscpu-lscpu-virt.o sys-utils/lscpu-lscpu-arm.o sys-utils/lscpu-lscpu-dmi.o -Wl,--as-needed ./.libs/libcommon.a ./.libs/libsmartcols.so -Wl,-rpath -Wl,/cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/lib64
/cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../lib64/libncursesw.so: undefined reference to symbol 'stdscr'
/cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/lib64/libtinfow.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
|
I am not sure I understand this error. libncursesw.so does have libtinfow.so as a DT_NEEEDED, and libtinfow.so does define the stdscr.
What should I look at next to troubleshoot this? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
joeydumont n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 22 Dec 2024 Posts: 4
|
Posted: Wed Feb 12, 2025 3:37 pm Post subject: Possible fix |
|
|
Seems like this was due to the split ncurses and tinfo setup. I added the following patch to my ebuild (it could be cleaner)
Code: |
valandil /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/var/db/repos/gentoo/sys-apps/util-linux $ diff -aur util-linux-2.40.4.ebuild util-linux-2.40.4-r1.ebuild
--- util-linux-2.40.4.ebuild 2025-01-14 21:46:29.882727886 -0500
+++ util-linux-2.40.4-r1.ebuild 2025-02-12 09:50:19.897900932 -0500
@@ -20,6 +20,7 @@
inherit autotools git-r3
else
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/karelzak.asc
+ inherit autotools
inherit verify-sig
if [[ ${PV} != *_rc* ]] ; then
@@ -102,6 +103,8 @@
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) su? ( pam )"
RESTRICT="!test? ( test )"
+PATCHES=("${FILESDIR}/util-linux-2.40.4-tinfo.patch")
+
pkg_pretend() {
if use su && ! use suid ; then
elog "su will be installed as suid despite USE=-suid (bug #832092)"
@@ -190,6 +193,8 @@
po/update-potfiles
eautoreconf
else
+ po/update-potfiles
+ eautoreconf
elibtoolize
fi
}
@@ -296,7 +301,7 @@
--enable-rename
--enable-rfkill
--enable-schedutils
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ --with-systemdsystemunitdir="${EPREFIX}/$(systemd_get_systemunitdir)"
--with-tmpfilesdir="${EPREFIX}"/usr/lib/tmpfiles.d
$(use_enable caps setpriv)
$(use_enable cramfs)
|
and the following Makemodule patch:
Code: |
valandil /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/var/db/repos/gentoo/sys-apps/util-linux $ cat files/util-linux-2.40.4-tinfo.patch
From 0a0476c388bba27aec0fa7b857dfa887f07df51a Mon Sep 17 00:00:00 2001
From: Joey Dumont <joey.dumont@gmail.com>
Date: Wed, 12 Feb 2025 07:06:06 -0500
Subject: [PATCH] Add tinfo libs explicitly.
---
sys-utils/Makemodule.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am
index 209b656..e6eac03 100644
--- a/sys-utils/Makemodule.am
+++ b/sys-utils/Makemodule.am
@@ -72,6 +72,8 @@ irqtop_LDADD += -lslang
else
irqtop_CFLAGS += $(NCURSES_CFLAGS)
irqtop_LDADD += $(NCURSES_LIBS)
+irqtop_CFLAGS += $(TINFO_CFLAGS)
+irqtop_LDADD += $(TINFO_LIBS)
endif
endif
--
2.48.1
|
I had a similar issue iwth procps but couldn't find a nice way of fixing. Ended up with
Code: |
valandil /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/var/db/repos/gentoo/sys-apps/util-linux $ cat ../../sys-process/procps/files/procps-4.0.4-fix-ncurses.patch
From 97a8ffeb5b5da16c524af74393262fa1772b5444 Mon Sep 17 00:00:00 2001
From: Joey Dumont <joey.dumont@gmail.com>
Date: Wed, 12 Feb 2025 10:25:10 -0500
Subject: [PATCH] Shove ltinfow in there.
---
Makefile.am | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index ddfc014..b852695 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -181,11 +181,11 @@ dist_man_MANS += \
man/slabtop.1
src_slabtop_SOURCES = src/slabtop.c local/strutils.c local/fileutils.c
src_slabtop_CFLAGS = @NCURSES_CFLAGS@
-src_slabtop_LDADD = $(LDADD) @NCURSES_LIBS@
+src_slabtop_LDADD = $(LDADD) @NCURSES_LIBS@ -ltinfow
endif
src_watch_SOURCES = src/watch.c local/strutils.c local/fileutils.c
src_watch_CFLAGS = @NCURSES_CFLAGS@
-src_watch_LDADD = @NCURSES_LIBS@ $(CYGWINFLAGS)
+src_watch_LDADD = @NCURSES_LIBS@ $(CYGWINFLAGS) -ltinfow
src_top_top_SOURCES = \
src/top/top.h \
src/top/top.c \
@@ -198,7 +198,7 @@ src_top_top_SOURCES += local/strverscmp.c
endif
src_top_top_CFLAGS = @NCURSES_CFLAGS@
-src_top_top_LDADD = $(LDADD) @NCURSES_LIBS@ $(DL_LIB)
+src_top_top_LDADD = $(LDADD) @NCURSES_LIBS@ $(DL_LIB) -ltinfow
endif
if BUILD_SKILL
--
2.48.1
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sam_ Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/7738740495f7d1acc45bdb.jpg)
Joined: 14 Aug 2020 Posts: 2150
|
Posted: Wed Feb 12, 2025 3:40 pm Post subject: |
|
|
NCURSES_LIBS should contain this already if it searches correctly for ncurses (... pkg-config). Please do file a bug for each issue w/ the patches too. Thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
joeydumont n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 22 Dec 2024 Posts: 4
|
Posted: Wed Feb 12, 2025 4:10 pm Post subject: |
|
|
Hmm, looking at this more closely while I'm opening the bug makes it clearer that it is a local issue. Here's the pkg-config from config.log
Code: |
configure:22458: checking for x86_64-pc-linux-gnu-pkg-config
configure:22481: found /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/bin/x86_64-pc-linux-gnu-pkg-config
configure:22494: result: /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/bin/x86_64-pc-linux-gnu-pkg-config
configure:22568: checking pkg-config is at least version 0.9.0
configure:22571: result: yes
<--snip-->
configure:31534: $PKG_CONFIG --exists --print-errors "tinfow"
Package tinfow was not found in the pkg-config search path.
Perhaps you should add the directory containing `tinfow.pc'
to the PKG_CONFIG_PATH environment variable
Package 'tinfow' not found
configure:31537: $? = 1
configure:31551: result: no
Package 'tinfow' not found
|
Looking at the behaviour of pkg-config on my machine:
Code: |
valandil /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/var/db/repos/gentoo/sys-process/procps $ /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/bin/x86_64-pc-linux-gnu-pkgconf --libs tinfow
Package tinfow was not found in the pkg-config search path.
Perhaps you should add the directory containing `tinfow.pc'
to the PKG_CONFIG_PATH environment variable
Package 'tinfow' not found
valandil /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/var/db/repos/gentoo/sys-process/procps $ which pkg-config
/cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/bin/pkg-config
valandil /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/var/db/repos/gentoo/sys-process/procps $ readlink -f $(which pkg-config)
/cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/bin/x86_64-pc-linux-gnu-pkgconf
valandil /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/var/db/repos/gentoo/sys-process/procps $ /cvmfs/software.dumont.ca/2021.02/compat/linux/x86_64/usr/bin/pkg-config --libs tinfow
-ltinfow
|
Looking at the strace -f output for both of these pkg-config calls, x86_64-pc-linux-gnu-pkgconf searches my local system paths rather than the Gentoo Prefix path, while pkg-config itself looks at the proper locations in the Prefix. I don't know why calling the same underlying binary from a different symlink causes this though. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
joeydumont n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 22 Dec 2024 Posts: 4
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|