The patch documented in bug 165617 contains # fix for bug #165617; thanks jieryn@gmail.com if ! use gpm; then sed -i 's/gpm_mousedriver_test=yes/gpm_mousedriver_test=no/' ${S}/configure.in fi I read this as 'if the use flag gpm is NOT set, patch something The patch currently (2011-05-31) in ebuild aalib-1.4_rc5.ebuild contains: # Fix bug #165617. use gpm && sed -i \ 's/gpm_mousedriver_test=yes/gpm_mousedriver_test=no/' "${S}/configure.in" I read this as 'if the use flag IS set, patch somethingµ When I try to: emerge -C gpm && USE=-gpm emerge -1 aalib, I get the error mentioned in bug 165617 (missing gpm.h) Reproducible: Always Steps to Reproduce: 1. emerge -C gpm 2. USE=-gpm emerge aalib 3. Actual Results: libtool: compile: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -march=pentium4 -O2 -pipe -fomit-frame-pointer -I/usr/include/ncurses -MT aafastre.lo -MD -MP -MF .deps/aafastre.Tpo -c aafastre.c -o aafastre.o >/dev/null 2>&1 aalinux.c:8:17: error: gpm.h: No such file or directory libtool: compile: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -march=pentium4 -O2 -pipe -fomit-frame-pointer -I/usr/include/ncurses -MT aalinuxkbd.lo -MD -MP -MF .deps/aalinuxkbd.Tpo -c aalinuxkbd.c -fPIC -DPIC -o .libs/aalinuxkbd.o aalinux.c: In function 'linux_getsize': aalinux.c:195: error: 'gpm_mx' undeclared (first use in this function) aalinux.c:195: error: (Each undeclared identifier is reported only once aalinux.c:195: error: for each function it appears in.) aalinux.c:196: error: 'gpm_my' undeclared (first use in this function) aalinux.c:172: warning: ignoring return value of 'fread', declared with attribute warn_unused_result aalinux.c: In function 'linux_gotoxy': aalinux.c:254: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result make[2]: *** [aalinux.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... mv -f .deps/aafastre.Tpo .deps/aafastre.Plo aalinuxkbd.c:26:17: error: gpm.h: No such file or directory aalinuxkbd.c:405: error: expected ')' before '*' token aalinuxkbd.c: In function 'linux_getchar': aalinuxkbd.c:410: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'e' aalinuxkbd.c:410: error: 'e' undeclared (first use in this function) aalinuxkbd.c:410: error: (Each undeclared identifier is reported only once aalinuxkbd.c:410: error: for each function it appears in.) aalinuxkbd.c:422: error: 'gpm_visiblepointer' undeclared (first use in this function) aalinuxkbd.c:425: error: 'gpm_fd' undeclared (first use in this function) aalinuxkbd.c:425: error: invalid lvalue in asm output 0 aalinuxkbd.c:430: error: memory input 2 is not directly addressable make[2]: *** [aalinuxkbd.lo] Error 1 make[2]: Leaving directory `/var/tmp/portage/media-libs/aalib-1.4_rc5/work/aalib-1.4.0/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/media-libs/aalib-1.4_rc5/work/aalib-1.4.0/src' make: *** [all-recursive] Error 1 emake failed * ERROR: media-libs/aalib-1.4_rc5 failed (compile phase): Expected Results: compilation without trying to include references to gpm.h When I adapt the ebuild to read # Fix the bug in bug #165617 by negating the condition use ! gpm && sed -i \ 's/gpm_mousedriver_test=yes/gpm_mousedriver_test=no/' "${S}/configure.in" aalib compiles again.
I don't understand your report. Can you please explain what are you trying to do and what is you actual problem?
Yes, what I am trying to do is compile media-libs/aalib-1.4_rc5 (because it is part of an @revdep-rebuild) without gpm (so the USE flag = -gpm) During compilation, I get the error that you can see in 'actual results' of this bug report: Even though I set flag -gpm, aalib seems to require gpm. This error is the same error as was reported with bug 165617, so that is why I refer to that bug. bug 165617 proposes a correction in the ebuild for the bug, which is claimed to be in the latest ebuild. However, when I compare the proposed solution in the error report with the actual solution in the current ebuild, I see their logic is different. When I change the ebuild to follow the proposed correction from the error report, aalib compiles with use flag -gpm. Therefore my proposal is to check these lines in the ebuild, compare them to what was proposed in bug 165617 and repair the ebuild.
Then, please use a more appropriate title in the future to describe your problem. Can you attach your emerge --info and the whole build.log please?
Sorry about the Summary change. I have just gone and set USE=-gpm globally on a test system, then unmerged sys-libs/gpm and then tried to build aalib with both USE=gpm and USE=-gpm, but it doesn't ever complain.
I am the bug submitter. The above change to the ebuild was required to get aalib compiling for me, but after it compiled once, returning to the original ebuild did not give me a compile error anymore. I am wondering if it could be some complicated interaction with circular references between libraries having been compiled under different circumstances (e.g. due to gcc upgrade). Such a circle might have broken by compiling once error-free. Anyway... just random thoughts. Therefore I assume that the bug report must be declared invalid, as I cannot reproduce it myself anymore. Sorry for the noise.
Pushed fix as: >*aalib-1.4_rc5-r3 (11 Feb 2012) > > 11 Feb 2012; Sergei Trofimovich <slyfox@gentoo.org> +aalib-1.4_rc5-r3.ebuild, > -aalib-1.4_rc5-r2.ebuild: > Fix USE=gmp feature selection. It's a bug #369685 spotted by Jan Vereecke and > #385681 by Alec M. aka alecm_88 hosted on yahoo dotcom. Thanks for the detailed report, Jan! And the patience describing and redescribing obvious bug with inverted logic in the ebuild. Apologies for misunderstanding. Should not happen that way. Where the words fail the piece of code might help: > --- use gpm && sed -i 's/use_gmp=yes/use_gmp=no/' > +++ use gpm || sed -i 's/use_gmp=yes/use_gmp=no/' Thanks again!
*** Bug 385681 has been marked as a duplicate of this bug. ***