Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520708 - sys-process/procps-3.3.9-r* will not build against sys-libs/ncurses-5.9-r3
Summary: sys-process/procps-3.3.9-r* will not build against sys-libs/ncurses-5.9-r3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-23 17:07 UTC by Steven Trogdon
Modified: 2014-09-04 07:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log (config.log,98.79 KB, text/plain)
2014-08-24 01:17 UTC, Steven Trogdon
Details
build.log (build.log,20.40 KB, text/plain)
2014-08-24 01:18 UTC, Steven Trogdon
Details
build.log for ncurses in prefix (ncurses.build.log.bz2,30.21 KB, application/x-bzip)
2014-08-26 22:39 UTC, Steven Trogdon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Trogdon 2014-08-23 17:07:35 UTC
The subject procps (and perhaps other versions) fails to build in Prefix when ncurses-5.9-r3 is installed. The failure presents as:

Making all in top
make[2]: Entering directory '/storage/strogdon/gentoo-redlizard/var/tmp/portage/sys-process/procps-3.3.9-r2/work/procps-ng-3.3.9/top'
  CC       top.o
  CC       top_nls.o
  CC       fileutils.o
top.c:28:20: fatal error: curses.h: No such file or directory
compilation terminated.
Makefile:478: recipe for target 'top.o' failed
make[2]: *** [top.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/storage/strogdon/gentoo-redlizard/var/tmp/portage/sys-process/procps-3.3.9-r2/work/procps-ng-3.3.9/top'
Makefile:1118: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/storage/strogdon/gentoo-redlizard/var/tmp/portage/sys-process/procps-3.3.9-r2/work/procps-ng-3.3.9'
Makefile:580: recipe for target 'all' failed
make: *** [all] Error 2

It appears that ncurses-5.9-r3 installs the required headers under $EPREFIX/usr/include/ncurses while top.c has

#include <curses.h>
Comment 1 Rafał Mużyło 2014-08-23 20:26:16 UTC
Attach both build log and config.log.
Comment 2 Steven Trogdon 2014-08-24 01:17:11 UTC
Created attachment 383490 [details]
config.log
Comment 3 Steven Trogdon 2014-08-24 01:18:46 UTC
Created attachment 383492 [details]
build.log
Comment 4 Steven Trogdon 2014-08-24 01:27:12 UTC
The variable NCURSES_CFLAGS is defined as

NCURSES_CFLAGS='-I/storage/strogdon/gentoo-redlizard/usr/include/ncurses '

and I believe this needs to be added to include paths in Makefile.in. Or perhaps Makefile.in needs to be regenerated? This issue will probably manifest itself on native Gentoo as well. I'm unable to test that at the moment.
Comment 5 Steven Trogdon 2014-08-26 22:34:45 UTC
This appears to be a prefix-only issue. On native gentoo ncurses-5.9-r3 installs headers under /usr/include and /usr/include/ncursesw. In the build log for ncurses there is

checking where we will install curses.h... ${prefix}/include
and
checking where we will install curses.h... /usr/include/ncursesw

while in prefix the headers are installed under ${EPREFIX}/usr/include/ncurses and ${EPREFIX}/usr/include/ncursesw . In the build log there is 

checking where we will install curses.h... ${prefix}/include/ncurses
and
checking where we will install curses.h... /storage/strogdon/gentoo-redlizard/usr/include/ncursesw

So it looks like the issue is with ncurses-5.9-r3
Comment 6 Steven Trogdon 2014-08-26 22:39:15 UTC
Created attachment 383766 [details]
build.log for ncurses in prefix
Comment 7 Steven Trogdon 2014-09-04 03:49:22 UTC
The following will allow ncurses-5.9-r3 to build correctly in prefix

--- ncurses-5.9-r3.ebuild.orig  2014-09-03 22:12:17.000000000 -0500
+++ ncurses-5.9-r3.ebuild       2014-09-03 22:14:01.000000000 -0500
@@ -62,7 +62,7 @@
 }
 
 multilib_src_configure() {
-       do_configure narrowc
+       do_configure narrowc --includedir="${EPREFIX}"/usr/include
        use unicode && do_configure widec --enable-widec --includedir="${EPREFIX}"/usr/include/ncursesw
 }

and doesn't affect building on Gentoo. Not sure if this is a fix or a symptom of the problem but prefix doesn't play nicely with the following "test" in the ncurses-5.9-r3 configure file:

echo "$as_me:19009: checking where we will install curses.h" >&5
echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
test "$with_overwrite" = no && \
test "x$includedir" = 'x${prefix}/include' && \
        includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
echo "$as_me:19014: result: $includedir" >&5
echo "${ECHO_T}$includedir" >&6
Comment 8 Fabian Groffen gentoo-dev 2014-09-04 07:27:47 UTC
Thanks, applied your fix!