Daemon fails to build with Linux < 2.6.24

DoneSubmitted by Matthias Wachs.
Details
2 participants
  • Ludovic Courtès
  • Matthias Wachs
Owner
unassigned
Severity
normal
M
M
Matthias Wachs wrote on 29 Aug 2013 15:54
guix 0.3 does not compile on fedora core 8 nodes
(address . bug-guix@gnu.org)
1377784471.3250.83.camel@fulcrum.net.in.tum.de
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: wachs@net.in.tum.de
--- 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAABAgAGBQJSH1KXAAoJEEFv6YGnAaM2FT8IAKoA7uWo8fpGqdBzIVG9/QGm
jGG5v3zkP8pZwUJTR+ARLixpMnZvdwlzVwSErp3c8JvHYoY3VecYs9l7O8Vqxrp/
IbGEuHQ8sh8yq3J5/SMgSH2i2N6tfszyaxvMN9DksjtC3Q6tua1Jn2LfBJrn9J9r
GdE03PldVeJyKnb4kn55tFbziw9AJi/FqurmAj9lqynuBdHCxHyQz+G+DZYvEN50
07LQP7mH2lyBkShZ8YrBKscfdqcNXMYETGh5FParXppOGJo3hjp32/MjrdRS6HrK
5dLDLbiK0kn2QWd8czAe2cRk3m9vBgO76anu5uLBMPM/m28Vqa1n1X4FCKv5SEw=
=QDm4
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 30 Aug 2013 09:16
(name . Matthias Wachs)(address . wachs@net.in.tum.de)(address . 15209@debbugs.gnu.org)
87a9jz4pij.fsf@gnu.org
Matthias Wachs <wachs@net.in.tum.de> skribis:

Toggle quote (13 lines)
> +#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

I’m reluctant to adding such a patch because (1) as was already
mentioned, these features are missing only on very old kernels, and
(2) if the libc headers don’t define these flag, chances are that
clone(2) doesn’t support them anyway.

WDYT?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 30 Dec 2013 17:03
(name . Matthias Wachs)(address . wachs@net.in.tum.de)
878uv2e375.fsf@gnu.org
tag 15209 wontfix
retitle 15209 Daemon fails to build with Linux < 2.6.24
thanks

ludo@gnu.org (Ludovic Courtès) skribis:

Toggle quote (22 lines)
> Matthias Wachs <wachs@net.in.tum.de> skribis:
>
>> +#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
>
> I’m reluctant to adding such a patch because (1) as was already
> mentioned, these features are missing only on very old kernels, and
> (2) if the libc headers don’t define these flag, chances are that
> clone(2) doesn’t support them anyway.
>
> WDYT?

Marking as ‘wontfix’. Let us know if this is a problem.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 30 Dec 2013 17:06
request
(address . request@debbugs.gnu.org)
874n5qe32e.fsf@gnu.org
close 15209
tag 15608 moreinfo
thanks
?
Your comment

This issue is archived.

To comment on this conversation send email to 15209@debbugs.gnu.org