bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FTBFS on GNU/Hurd


From: Ludovic Courtès
Subject: Re: FTBFS on GNU/Hurd
Date: Thu, 04 Jul 2013 16:23:44 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Matthew Lien <address@hidden> skribis:

> 2. nix/nix-daemon/guix-daemon.cc in git repo did not get patched, yet.
> Maybe you forgot to git push? (I patched it manually at my side before
> testing)

OK, will push.

The main problem is this error (while connecting to the build daemon
over a Unix-domain socket):

--8<---------------cut here---------------start------------->8---
In guix/store.scm:
 270: 1 [open-connection "/root/guix/test-tmp/var/1123/daemon-socket/socket" # 
#t]
In unknown file:
   ?: 0 [setsockopt #<input-output: socket 5> 65535 4098 12288]

ERROR: In procedure setsockopt:
ERROR: In procedure setsockopt: Protocol not available
--8<---------------cut here---------------end--------------->8---

I just checked, and pflocal (the Hurd’s translator that implements
AF_UNIX sockets) always returns ENOPROTOOPT for ‘setsockopt’
(aka. ‘socket_setopt’), hence this failure:

  http://git.savannah.gnu.org/cgit/hurd/hurd.git/tree/pflocal/socket.c#n456

Can you test the workaround below?

Thanks,
Ludo’.

diff --git a/guix/store.scm b/guix/store.scm
index 57e1ca0..343da91 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -266,8 +266,15 @@ operate, should the disk become full.  Return a server 
object."
              (socket PF_UNIX SOCK_STREAM 0)))
         (a (make-socket-address PF_UNIX file)))
 
+    (catch 'system-error
+      (lambda ()
         ;; Enlarge the receive buffer.
-    (setsockopt s SOL_SOCKET SO_RCVBUF (* 12 1024))
+        (setsockopt s SOL_SOCKET SO_RCVBUF (* 12 1024)))
+      (lambda args
+        ;; On the Hurd, the pflocal server's implementation of `socket_setopt'
+        ;; always returns ENOPROTOOPT.  Ignore it.
+        (unless (= (system-error-errno args) ENOPROTOOPT)
+          (apply throw args))))
 
     (catch 'system-error
       (cut connect s a)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]