emerge gdb defaults to sys-devel/gdb-6.0 on x86. emerging gdb exited during the make process in gdb-6.0/gdb (not verbatim): No rule to make '../lib/libreadline.a', needed for gdb. Stop. The problem is that running 'make all' in gdb-6.0/readline (which make does enter before gdb-6.0/gdb) does nothing (Nothing to do for 'all'); you have to specify make libreadline.a, or add libreadline.a to the all rule. Reproducible: Always Steps to Reproduce: 1.(on x86) emerge sys-devel/gdb-6.0 Actual Results: 1. configure and make go until gdb-6.0/gdb and makes libgdb.a (?) there 2. next target is gdb, then make exits with error: No rule to make ../lib/libreadline.a. Stop. 3. emerge exits with error Expected Results: The easiest solution is to add libreadline.a to the all: target in gdb-6.0/readline
do you have a libreadline.a in your /usr/lib/ ?
Yes, /usr/lib/libreadline.a is present on my system.
any newer gdb's automagically resolve this ?
After revisiting this, it's a problem with EXTRA_ECONF="--disable-static", which seems to cause libreadline not to build at all. See #72186, where net-nds/openldap had a similar problem. The solution is to add --enable-static to the econf arguments, which are passed to configure after EXTRA_ECONF, and hence supersede them. I also mentioned some precedence for this. FWIW I tried this with several other versions with the same result.
EXTRA_ECONF exists for your sake to tweak things ... in the future, it should be moved after "$@" thus allows it to override everything passed from the ebuild
This isn't a problem with EXTRA_ECONF, but a bug with gdb packaging. It accepts an argument to configure that doesn't work. I use EXTRA_ECONF="--disable-shared" all the time, with very few difficulties. If a package is libtooled, it accepts it and works, if it's autoconf but no libtool it just ignores it. In those few times that emerge fails because of it, it's a flaw in the package which would otherwise go unnoticed. There are other such packages which I haven't taken the time to investigate the exact cause and solution, and so haven't filed bugs for yet. If you disagree, what is the reasoning of the other packages that I mentioned in bug 72186, among others, that specifically add --enable-shared --enable-static to econf?