unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <mwette@alumni.caltech.edu>
To: 24862@debbugs.gnu.org
Subject: bug#24862: guile 2.0.13 build error under macOS 10.12 Sierra
Date: Mon, 7 Nov 2016 17:28:47 -0800	[thread overview]
Message-ID: <B044833B-9953-4A8B-B29F-F23512ABCE85@alumni.caltech.edu> (raw)
In-Reply-To: <9169B1E8-84CD-45DF-ADDB-8C7AF0A9597C@schamschula.com>

[-- Attachment #1: Type: text/plain, Size: 2881 bytes --]

I am trying to work this.   I have a MacBook Pro running Sierra (Mac OS 10.12.1).  

I have macports installed, and was able to get guile 2.0.12 installed in the macports tree (/opt/local) using a custom macports file.

Note: Sierra seems to have issues running gdb.  Apparently the SIP needs to be turned off.  Instead I have been using the Xcode lldb debugger.

Note: Sierra has an issue with DYLD_LIBRARY_PATH.  Namely, it will not copy that env variable to sub-shells:

mwette$ export DYLD_LIBRARY_PATH=abc
mwette$ DYLD_LIBRARY_PATH=def echo $DYLD_LIBRARY_PATH
abc

I downloaded guile-2.0.13 and applied the macports sierra.patch (attached).  I used

CC=gcc-mp-6 CFLAGS=-g LDFLAGS=-g ./configure --prefix=/opt/local --enable-guile-debug --disable-shared

Build when trying to compile eval.scm => eval.go.  I set up the associated environment in my shell and found that executing in build-env or not makes a difference.  

mwette$ env | grep GUILE
GUILE=/Users/mwette/proj/scheme/guile/guile-2.0.13/libguile/guile
GUILE_LOAD_PATH=/Users/mwette/proj/scheme/guile/guile-2.0.13/module:/Users/mwette/proj/scheme/guile/guile-2.0.13/guile-readline:/Users/mwette/proj/scheme/guile/guile-2.0.13
GUILE_LOAD_COMPILED_PATH=/Users/mwette/proj/scheme/guile/guile-2.0.13/module:/Users/mwette/proj/scheme/guile/guile-2.0.13/guile-readline
GUILE_WARN_DEPRECATED=detailed
GUILE_INSTALL_LOCALE=1
GUILE_SYSTEM_PATH=
GUILE_AUTO_COMPILE=0
GUILE_SYSTEM_EXTENSIONS_PATH=

Within build-env it takes 12 seconds to crash.  Without build-env it returns immediately.  I don’t know if that means it is working or not: it does create a eval.go file.

mwette$ time build-env guild compile --target="x86_64-apple-darwin16.1.0" -Wunbound-variable -Warity-mismatch -Wformat  -L "/Users/mwette/proj/scheme/guile/guile-2.0.13/module" -L /Users/mwette/proj/scheme/guile/guile-2.0.13/module/  -L /Users/mwette/proj/scheme/guile/guile-2.0.13/guile-readline/  -o "ice-9/eval.go" "ice-9/eval.scm" 
Backtrace:
In unknown file:
   ?: 3 [apply-smob/1 #<boot-closure 106933000 (_ _ _)> #t ...]
   ?: 2 [apply-smob/1 #<catch-closure 107017ce0>]
   ?: 1 [primitive-eval ((@ # %) (begin # # #))]
   ?: 0 [mkstemp! "ice-9/eval.go.XXXXXX" "wb"]

ERROR: 
real	0m12.227s
user	0m12.598s
sys	0m0.098s


mwette$ time guild compile --target="x86_64-apple-darwin16.1.0" -Wunbound-variable -Warity-mismatch -Wformat  -L "/Users/mwette/proj/scheme/guile/guile-2.0.13/module" -L /Users/mwette/proj/scheme/guile/guile-2.0.13/module/  -L /Users/mwette/proj/scheme/guile/guile-2.0.13/guile-readline/  -o "ice-9/eval.go" "ice-9/eval.scm" 
;;; note: source file /Users/mwette/proj/scheme/guile/guile-2.0.13/module/system/base/target.scm
;;;       newer than compiled /opt/local/lib/guile/2.0/ccache/system/base/target.go
wrote `ice-9/eval.go'

real	0m0.420s
user	0m0.353s
sys	0m0.036s



[-- Attachment #2.1: Type: text/html, Size: 12170 bytes --]

[-- Attachment #2.2: sierra.patch --]
[-- Type: application/octet-stream, Size: 588 bytes --]

--- 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 */

[-- Attachment #2.3: Type: text/html, Size: 401 bytes --]

  reply	other threads:[~2016-11-08  1:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 21:18 bug#24862: guile 2.0.13 build error under macOS 10.12 Sierra Marius Schamschula
2016-11-08  1:28 ` Matt Wette [this message]
2016-11-08  2:21   ` Matt Wette
2016-11-08  2:24     ` Matt Wette
2016-11-08  2:28       ` Matt Wette
2016-11-11  1:51     ` Matt Wette
2017-03-01 13:38       ` Andy Wingo
2016-11-10  3:20 ` Matt Wette
2017-03-19 23:55 ` Matt Wette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B044833B-9953-4A8B-B29F-F23512ABCE85@alumni.caltech.edu \
    --to=mwette@alumni.caltech.edu \
    --cc=24862@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).