Subject: guix 0.3 does not compile on fedora core 8 nodes

From: Matthias Wachs <[email-masked]>
Date: Thu, 29 Aug 2013 15:54:31 +0200

Hi,

atm I am trying to install guix 0.3 on PlanetLab's fedora core 8 nodes. 
These nodes have a very old system, but in the end I got guix to
install, but had to fix one compile error:

make[2]: Entering directory `/home/tumple_gnunet_deployment/guix-0.3'
g++ -DHAVE_CONFIG_H -I. -I./nix  -I./nix -I./nix/libutil -I./nix
-I./nix/libstore -I./nix/libstore -DNIX_STORE_DIR=\"/nix/store\"
-DNIX_DATA_DIR=\"/usr/local/share\" -DNIX_STATE_DIR=\"/usr/local/var/nix
\" -DNIX_LOG_DIR=\"/usr/local/var/log/nix\" -DNIX_CONF_DIR=
\"/usr/local/etc/nix\" -DNIX_LIBEXEC_DIR=\"/usr/local/libexec\"
-DNIX_BIN_DIR=\"/usr/local/bin\" -DOPENSSL_PATH="\"openssl\""
-I/include -g -O2 -MT nix/libstore/libstore_a-build.o -MD -MP -MF
nix/libstore/.deps/libstore_a-build.Tpo -c -o
nix/libstore/libstore_a-build.o `test -f 'nix/libstore/build.cc' || echo
'./'`nix/libstore/build.cc
nix/libstore/build.cc: In member function 'void
nix::DerivationGoal::startBuilder()':
nix/libstore/build.cc:2036: error: 'CLONE_NEWPID' was not declared in
this scope
nix/libstore/build.cc:2036: error: 'CLONE_NEWNET' was not declared in
this scope
nix/libstore/build.cc:2036: error: 'CLONE_NEWIPC' was not declared in
this scope
nix/libstore/build.cc:2036: error: 'CLONE_NEWUTS' was not declared in
this scope
make[2]: *** [nix/libstore/libstore_a-build.o] Error 1

A patch for the problem is attached...

Matthias

-- 
Dipl.-Inf. Matthias Wachs
Free Secure Network Systems Group
Technische Universitaet Muenchen
Chair for Network Architectures and Services
Institute for Informatics / I8           Tel:    +49 89 289 18037
Boltzmannstr. 3 / Room 03.05.042         Fax:    +49 89 289 18033
D-85748 Garching b. Muenchen, Germany    Email: [email-masked]
--- nix/libstore/build.cc	2013-08-29 15:35:16.289717070 +0200
+++ nix/libstore/build_fix.cc	2013-08-29 15:35:29.109889561 +0200
@@ -43,6 +43,20 @@
 #include <sched.h>
 #endif
 
+#ifndef CLONE_NEWPID
+#define CLONE_NEWPID            0x20000000      /* New pid namespace */
+#endif
+#ifndef CLONE_NEWNET
+#define CLONE_NEWNET            0x40000000      /* New network namespace */
+#endif 
+#ifndef CLONE_NEWIPC
+#define CLONE_NEWIPC            0x08000000      /* New ipcs */
+#endif 
+#ifndef CLONE_NEWUTS
+#define CLONE_NEWUTS            0x04000000      /* New utsname group? */
+#endif 
+
+
 /* In GNU libc 2.11, <sys/mount.h> does not define `MS_PRIVATE', but
    <linux/fs.h> does.  */
 #if !defined MS_PRIVATE && defined HAVE_LINUX_FS_H