GNU bug report logs - #39975
Shepherd 0.7.0 [PATCH] services: Support compilation on the Hurd.

Previous Next

Package: guix;

Reported by: Jan Nieuwenhuizen <janneke <at> gnu.org>

Date: Sat, 7 Mar 2020 15:10:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39975 in the body.
You can then email your comments to 39975 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#39975; Package guix. (Sat, 07 Mar 2020 15:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 07 Mar 2020 15:10:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: Shepherd 0.7.0 [PATCH] services: Support compilation on the Hurd.
Date: Sat, 07 Mar 2020 16:09:03 +0100
[Message part 1 (text/plain, inline)]
Hi,

Compilation on the Hurd fails with

--8<---------------cut here---------------start------------->8---
  GUILEC   modules/shepherd.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /gnu/store/wq6m0l53hffnf9qa9hwdjqskcw54amf6-guile-2.2.6/bin/guild
;;; WARNING: compilation of /gnu/store/wq6m0l53hffnf9qa9hwdjqskcw54amf6-guile-2.2.6/bin/guild failed:
;;; failed to create path for auto-compiled file "/gnu/store/wq6m0l53hffnf9qa9hwdjqskcw54amf6-guile-2.2.6/bin/guild"
Backtrace:
In ice-9/boot-9.scm:
   222:29 19 (map1 _)
   222:29 18 (map1 _)
   222:29 17 (map1 _)
   222:29 16 (map1 _)
   222:29 15 (map1 _)
   222:29 14 (map1 (((shepherd comm)) ((shepherd config)) ((# #))))
   222:29 13 (map1 (((shepherd config)) ((shepherd system))))
   222:17 12 (map1 (((shepherd system))))
  2800:17 11 (resolve-interface (shepherd system) #:select _ #:hide _ ?)
In ice-9/threads.scm:
    390:8 10 (_ _)
In ice-9/boot-9.scm:
  2726:13  9 (_)
In ice-9/threads.scm:
    390:8  8 (_ _)
In ice-9/boot-9.scm:
  2994:20  7 (_)
   2312:4  6 (save-module-excursion #<procedure 3de2b88 at ice-9/boo?>)
  3014:26  5 (_)
In unknown file:
           4 (primitive-load-path "shepherd/system" #<procedure 3d7e?>)
In ice-9/eval.scm:
   626:19  3 (_ #<directory (shepherd system) 3dd8230>)
   245:16  2 (_ #<directory (shepherd system) 3dd8230>)
In unknown file:
           1 (dynamic-func "prctl" #<dynamic-object #f>)
In ice-9/boot-9.scm:
   752:25  0 (dispatch-exception _ _ _)

ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
In procedure dynamic-pointer: Symbol not found: prctl
Makefile:2070: recipe for target 'modules/shepherd.go' failed
--8<---------------cut here---------------end--------------->8---

Find patch attached.

Greetings,
janneke

[0001-services-Support-compilation-on-the-Hurd.patch (text/x-patch, inline)]
From ac06193300aea17d6e6d1ad784585542815af94b Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke <at> gnu.org>
Date: Sat, 7 Mar 2020 16:04:27 +0100
Subject: [PATCH] services: Support compilation on the Hurd.

* modules/shepherd/system.scm.in (prctl): Catch compile-time error.
---
 modules/shepherd/system.scm.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/shepherd/system.scm.in b/modules/shepherd/system.scm.in
index 769404a..7def22d 100644
--- a/modules/shepherd/system.scm.in
+++ b/modules/shepherd/system.scm.in
@@ -1,6 +1,7 @@
 ;; system.scm -- Low-level operating system interface.
 ;; Copyright (C) 2013, 2014, 2016, 2018 Ludovic Courtès <ludo <at> gnu.org>
 ;; Copyright (C) 2018 Carlo Zancanaro <carlo <at> zancanaro.id.au>
+;; Copyright (C) 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;
 ;; This file is part of the GNU Shepherd.
 ;;
@@ -145,7 +146,9 @@ ctrlaltdel(8) and see kernel/reboot.c in Linux."
 (define PR_SET_CHILD_SUBREAPER @PR_SET_CHILD_SUBREAPER@)
 
 (define prctl
-  (if (dynamic-func "prctl" (dynamic-link))
+  (if (catch #t
+        (lambda _ (dynamic-func "prctl" (dynamic-link)))
+        (const #f))
       (let ((proc (syscall->procedure long "prctl" (list int int))))
         (lambda (process operation)
           "Perform an operation on the given process"
-- 
2.24.0

[Message part 3 (text/plain, inline)]
-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sat, 07 Mar 2020 21:06:02 GMT) Full text and rfc822 format available.

Notification sent to Jan Nieuwenhuizen <janneke <at> gnu.org>:
bug acknowledged by developer. (Sat, 07 Mar 2020 21:06:02 GMT) Full text and rfc822 format available.

Message #10 received at 39975-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Jan Nieuwenhuizen <janneke <at> gnu.org>
Cc: 39975-done <at> debbugs.gnu.org
Subject: Re: bug#39975: Shepherd 0.7.0 [PATCH] services: Support compilation
 on the Hurd.
Date: Sat, 07 Mar 2020 22:04:52 +0100
Hello!

Jan Nieuwenhuizen <janneke <at> gnu.org> skribis:

>  (define prctl
> -  (if (dynamic-func "prctl" (dynamic-link))
> +  (if (catch #t
> +        (lambda _ (dynamic-func "prctl" (dynamic-link)))
> +        (const #f))

I changed it to ‘false-if-exception’ and pushed, thanks!

There are exciting things going on here it seems.  :-)

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 05 Apr 2020 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.