make[1]: Entering directory `/usr/local/tmp/portage/ruby-1.8.0_pre6/work/ruby-1.8.0/ext/curses' gcc -fPIC -mieee -mcpu=ev67 -O2 -pipe -g3 -fPIC -I. -I/usr/local/tmp/portage/ruby-1.8.0_pre6/work/ruby-1.8.0 -I/usr/local/tmp/portage/ruby-1.8.0_pre6/work/ruby-1.8.0 -I/usr/local/tmp/portage/ruby-1.8.0_pre6/work/ruby-1.8.0/ext/curses -DHAVE_NCURSES_H -DHAVE_ISENDWIN -DHAVE_UNGETCH -DHAVE_BEEP -DHAVE_GETNSTR -DHAVE_WGETNSTR -DHAVE_DOUPDATE -DHAVE_FLASH -DHAVE_DELETELN -DHAVE_WDELETELN -DHAVE_KEYPAD -DHAVE_KEYNAME -DHAVE_INIT_COLOR -DHAVE_WRESIZE -DHAVE_RESIZETERM -c curses.c gcc -shared -Wl,--no-undefined -L"/usr/local/tmp/portage/ruby-1.8.0_pre6/work/ruby-1.8.0" -L"/usr/lib" -o curses.so curses.o -lruby -lncurses -ltermcap -ldl -lcrypt -lm -lc /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLOR_PAIRS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLOR_PAIRS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLOR_PAIRS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLOR_PAIRS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLORS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLOR_PAIRS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLOR_PAIRS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLOR_PAIRS /usr/bin/ld: /usr/lib/libncurses.a(lib_color.o): gp-relative relocation against dynamic symbol COLOR_PAIRS collect2: ld returned 1 exit status distcc[13729] ERROR: compile on localhost failed with exit code 1 make[1]: *** [curses.so] Error 1 make[1]: Leaving directory `/usr/local/tmp/portage/ruby-1.8.0_pre6/work/ruby-1.8.0/ext/curses' make: *** [all] Error 1 !!! ERROR: dev-lang/ruby-1.8.0_pre6 failed. !!! Function src_compile, Line 52, Exitcode 2 !!! emake failed
The problem was in the ncurses ebuild, which needs to inherit eutils to be able to use gen_usr_ldscript. There were really two problems: (1) the lack of inheritance and (2) the lack of error-checking in the ncurses ebuild (aka || die). I've fixed both.