Summary: | sys-process/unixtop - ./machine/m_linux.c:71:10: fatal error: asm/page.h: No such file or directory | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jer |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Agostino Sarubbo
![]() Created attachment 642472 [details]
build.log
build log and emerge --info
A trivial patch would be: $ cat files/unixtop-3.8_beta1-linux-includes.patch --- a/machine/m_linux.c +++ b/machine/m_linux.c @@ -68,7 +68,7 @@ #include <sys/vfs.h> #include <sys/param.h> /* for HZ */ -#include <asm/page.h> /* for PAGE_SHIFT */ +#include <sys/user.h> /* for PAGE_SHIFT */ #if 0 #include <linux/proc_fs.h> /* for PROC_SUPER_MAGIC */ but I don't know how that holds up for various other targets. configure should probably check for the PAGE_SHIFT macro and . While compiling I found a sys-libs/ncurses[tinfo] issue as well: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -frecord-gcc-switches -g -pipe -O2 -Wall -march=amdfam10 -mtune=amdfam10 -fno-common -Wno-comment -Wl,-O1 -Wl ,--hash-style=gnu -Wl,--as-needed -o top color.o commands.o display.o hash.o screen.o top.o username.o utils.o version.o m_linux.o -lm -lelf /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: screen.o: in function `screen_getsize': /home/jer/portage/sys-process/unixtop-3.8_beta1-r3/work/top-3.8beta1/screen.c:207: undefined reference to `tgoto' [...] that could be easily fixed in the existing ncurses patch: diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch index a2da4b47da6..0578e74b80f 100644 --- a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch @@ -8,7 +8,7 @@ # -lmld -lmach AC_CHECK_LIB(mach, vm_statistics) -AC_SEARCH_LIBS(tgetent, termcap curses ncurses) -+AC_SEARCH_LIBS(tgetent, ncurses curses termcap) ++AC_SEARCH_LIBS(tgetent, ncurses tinfo curses termcap) AC_CHECK_LIB(m, exp) # check for libraries required by extension @rej: that seems like a change restricted to linux targets (m_linux). I don't think this package is keyworded at all for linux, but feel free to add the patch/fixes you propose. I'm not sure why one would like to use unixtop over top (procps), but ok. (In reply to Fabian Groffen from comment #3) > @rej: that seems like a change restricted to linux targets (m_linux).> I > don't think this package is keyworded at all for linux, but feel free to add > the patch/fixes you propose. unixtop-3.8_beta1-r3.ebuild : KEYWORDS -=- ~amd64-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris 1) That is one linuxen right there. 2) I didn't file this bug report - I just got interested. 3) The ncurses/tinfo fix is quite obvious but the m_linux patch is not evidently correct. > I'm not sure why one would like to use unixtop over top (procps), but ok. Neither do I. Ask the reporter. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed270e4a02b2450c9e18d01710baa7860478f1cc commit ed270e4a02b2450c9e18d01710baa7860478f1cc Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2020-05-30 10:12:53 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2020-05-30 10:13:08 +0000 sys-process/unixtop-3.8_beta1-r3: fix compilation on Linux #726052 Albeit not really keyworded, fix compilation on Linux, and add some other fixes too: - block sys-process/procps for conflicting /usr/bin/top - add resize crash patch - add patch to allow compilation on Linux - fix curses patch to work with ncurses[tinfo] Closes: https://bugs.gentoo.org/726052 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Fabian Groffen <grobian@gentoo.org> .../unixtop/files/unixtop-3.8_beta1-ncurses.patch | 3 ++- .../files/unixtop-3.8_beta1-recent-linux.patch | 13 +++++++++ .../files/unixtop-3.8_beta1-winch-segfault.patch | 31 ++++++++++++++++++++++ sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild | 7 +++-- 4 files changed, 51 insertions(+), 3 deletions(-) |