Subject: util-vserver install fails on new gentoo box
From: Tor Rune Skoglund <trs@swi.no>
Date: Thu, 14 Nov 2013 17:59:03 +0100

I am installing a new Intel 64-bit box here. While the kernel
(vserver-sources-2.3.6.5) compiles OK, I cannot get util-vserver to
compile. It seems to be caused by a missing stpcpy function in dietclib.

Here's the relevant output from the util-vserver build log for
util-vserver-0.30.216_pre3025 :

[...]
libtool: link: diet -Os x86_64-pc-linux-gnu-gcc -O2 -pipe -std=c99 -Wall
-pedantic -W -funit-at-a-time -Wl,-O1 -Wl,--as-needed -o
src/secure-mount src/secure-mount.o  lib/libvserver.a
src/secure-mount.o: In function `mountSingle':
secure-mount.c:(.text+0x7d0): warning: warning: your code still has
assertions enabled!
/usr/diet/lib-x86_64/libc.a(assert_fail.o): In function `__assert_fail':
(.text+0x19a): undefined reference to `stpcpy'
collect2: error: ld returned 1 exit status
make[2]: *** [src/secure-mount] Error 1
[...]

And correctly, there's an assert() in secure-mount.c in that file in the
dietlibc distribution. (USE="debug" for dietlibc doesn't change anything.)

I've also tried unmasking newer versions of dietlibc
(dietlibc-0.33_pre20130103) and (util-vserver-0.30.216_pre3038) but no
success.

So; any good pointers? (Why does util-vserver use dietlibc in any case?)

- Tor Rune Skoglund, trs@swi.no