GNU bug report logs - #24862
guile 2.0.13 build error under macOS 10.12 Sierra

Previous Next

Package: guile;

Reported by: Marius Schamschula <lists <at> schamschula.com>

Date: Wed, 2 Nov 2016 21:31:01 UTC

Severity: normal

Done: Matt Wette <matt.wette <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matt Wette <mwette <at> alumni.caltech.edu>
To: 24862 <at> debbugs.gnu.org
Subject: bug#24862: guile 2.0.13 build error under macOS 10.12 Sierra
Date: Thu, 10 Nov 2016 17:51:34 -0800
Here is a patch that gets mine working.  Not sure it solves all the Sierra issues.

*** libguile/filesys.c-orig     2016-11-05 07:49:09.000000000 -0700
--- libguile/filesys.c  2016-11-10 05:38:53.000000000 -0800
***************
*** 1486,1491 ****
--- 1486,1494 ----
        mode_bits = scm_i_mode_bits (mode);
      }
  
+ #ifdef __APPLE__
+   open_flags &= O_APPEND|O_SHLOCK|O_EXLOCK|O_CLOEXEC;
+ #endif
    SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
    if (rv == -1)
      SCM_SYSERROR;

The man page for mkstemp says the following:

     The mkostemp() function is like mkstemp() but allows specifying addi-
     tional open(2) flags (defined in <fcntl.h>).  The permitted flags are
     O_APPEND, O_SHLOCK, O_EXLOCK and O_CLOEXEC.


Note that macports includes another patch for Sierra:

--- libguile/stime.c
+++ libguile/stime.c
@@ -834,6 +834,10 @@ scm_init_stime()
 
 #ifdef HAVE_POSIX_CPUTIME
   {
+#ifdef __APPLE__
+    if (clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &posix_run_time_base) == 0)
+      get_internal_run_time = get_internal_run_time_posix_timer;
+#else
     clockid_t dummy;
     
     /* Only use the _POSIX_CPUTIME clock if it's going to work across
@@ -843,6 +847,7 @@ scm_init_stime()
       get_internal_run_time = get_internal_run_time_posix_timer;
     else
       errno = 0;
+#endif
   }
 #endif /* HAVE_POSIX_CPUTIME */
 #endif /* HAVE_CLOCKTIME */






This bug report was last modified 8 years and 116 days ago.

Previous Next


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