On Mon, Nov 2, 2015 at 11:48 PM, Uros Bizjak <ubiz...@gmail.com> wrote: > >> I have committed a patch to libgo to update it to the Go 1.5 release. >> >> As usual for libgo updates, the actual patch is too large to attach to >> this e-mail message. I've attached the changes to the gccgo-specific >> files. >> >> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed >> to mainline. >> >> This may cause trouble on non-GNU/Linux operating systems. Please let >> me know about any problems you encounter. > > There is one new testsuite failure on CentOS 5.11 (kernel 2.6.18), > where namespaces are not supported: > > exec_linux_test.go:29:23: error: reference to undefined identifier > 'syscall.CLONE_NEWUSER' > Cloneflags: syscall.CLONE_NEWUSER, > ^ > FAIL: syscall > > The test would be skipped, since "/proc/self/ns/user" doesn't exist, > however, the test doesn't compile due to missing CLONE_NEWUSER define.
Thanks. I committed this patch which should fix the problem. Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 229686) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -28fbc7f42702ce081ef5f3ce9a1dbc1ed3f3c89e +10e0f935ac369f8403c198b05c909e42e565c1e5 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/mksysinfo.sh =================================================================== --- libgo/mksysinfo.sh (revision 229676) +++ libgo/mksysinfo.sh (working copy) @@ -1444,6 +1444,11 @@ grep '^type _inotify_event ' gen-sysinfo # The GNU/Linux CLONE flags. grep '^const _CLONE_' gen-sysinfo.go | \ sed -e 's/^\(const \)_\(CLONE_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} +# We need some CLONE constants that are not defined in older versions +# of glibc. +if ! grep '^const CLONE_NEWUSER ' ${OUT} > /dev/null 2>&1; then + echo "const CLONE_NEWUSER = 0x10000000" >> ${OUT} +fi # Struct sizes. set cmsghdr Cmsghdr ip_mreq IPMreq ip_mreqn IPMreqn ipv6_mreq IPv6Mreq \