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>
Attach both build log and config.log.
Created attachment 383490 [details] config.log
Created attachment 383492 [details] build.log
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.
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
Created attachment 383766 [details] build.log for ncurses in prefix
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
Thanks, applied your fix!