The openrc build unconditionally adds -L/lib and -Wl,-rpath=/lib when linking. This causes problems when cross compiling (setting ROOT= for emerge), since it links against libraries in the main system rather than those in the target. In this specific instance, I am compiling on an x86_64-pc-linux-gnu system for an x86_64-pc-linux-uclibc one (I suspect the problem would not occur if the target arch was different). The build error is as follows: x86_64-pc-linux-uclibc-gcc -Wl,-O1 -L../librc -L../libeinfo -Wl,-rpath=/lib -L/lib -o rc checkpath.o fstabinfo.o mountinfo.o start-stop-daemon.o rc-applets.o rc-depend.o rc-logger.o rc-misc.o rc-plugin.o rc-service.o rc-status.o rc-update.o runscript.o rc.o -lutil -lrc -leinfo -lncurses -Wl,-Bdynamic -ldl /usr/libexec/gcc/x86_64-pc-linux-uclibc/ld: warning: libc.so.6, needed by /lib/libncurses.so, may conflict with libc.so.0 /usr/libexec/gcc/x86_64-pc-linux-uclibc/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS definition in /usr/x86_64-pc-linux-uclibc/lib/libc.so.0 section .bss /lib/libc.so.6: could not read symbols: Bad value collect2: ld returned 1 exit status
This is fixed upstream, thanks