GNU bug report logs -
#24862
guile 2.0.13 build error under macOS 10.12 Sierra
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24862 in the body.
You can then email your comments to 24862 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#24862
; Package
guile
.
(Wed, 02 Nov 2016 21:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Marius Schamschula <lists <at> schamschula.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Wed, 02 Nov 2016 21:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi all,
While building guile under macOS 10.12 I get a build error. This error has previously been reported by other MacPorts users:
https://trac.macports.org/ticket/52613
I’m attaching the entire build log
[guile-main.log.gz (application/x-gzip, attachment)]
[Message part 3 (text/plain, inline)]
Marius
Information forwarded
to
bug-guile <at> gnu.org
:
bug#24862
; Package
guile
.
(Tue, 08 Nov 2016 01:29:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 24862 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]
[sierra.patch (application/octet-stream, attachment)]
[Message part 4 (text/html, inline)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#24862
; Package
guile
.
(Tue, 08 Nov 2016 02:22:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 24862 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Using the same process as above I get the following on guile-2.0.12:
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"
wrote `ice-9/eval.go'
real 0m0.484s
user 0m0.357s
sys 0m0.051s
Also, the “env DYLD… echo $DYLD…” demo above is clearly broken. But I have verified that DYLD_LIBRARY_PATH is filters out of env copy in the shell.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#24862
; Package
guile
.
(Tue, 08 Nov 2016 02:25:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 24862 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Now I see this is broken. I don’ t know why 2.0.13 is showing up :( UGH.
> On Nov 7, 2016, at 6:21 PM, Matt Wette <mwette <at> alumni.caltech.edu> wrote:
>
> Using the same process as above I get the following on guile-2.0.12:
>
> 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"
> wrote `ice-9/eval.go'
>
> real 0m0.484s
> user 0m0.357s
> sys 0m0.051s
>
>
>
> Also, the “env DYLD… echo $DYLD…” demo above is clearly broken. But I have verified that DYLD_LIBRARY_PATH is filters out of env copy in the shell.
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#24862
; Package
guile
.
(Tue, 08 Nov 2016 02:29:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 24862 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Fixed:
mwette$ time build-env guild compile --target="x86_64-apple-darwin16.1.0" -Wunbound-variable -Warity-mismatch -Wformat -L "$DIR/module" -L "$DIR/guile-readline" -o "ice-9/eval.go" "ice-9/eval.scm"
wrote `ice-9/eval.go'
real 0m0.484s
user 0m0.358s
sys 0m0.049s
mwette$ echo $DIR
/Users/mwette/proj/scheme/guile/guile-2.0.12
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#24862
; Package
guile
.
(Thu, 10 Nov 2016 03:21:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 24862 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
(lldb) n
Process 85754 stopped
* thread #1: tid = 0xe66f2, 0x000000010002c03f guile`scm_i_mkstemp(tmpl=0x0000000104cd09a0, mode=0x0000000100ea34c0) + 238 at filesys.c:1490, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x000000010002c03f guile`scm_i_mkstemp(tmpl=0x0000000104cd09a0, mode=0x0000000100ea34c0) + 238 at filesys.c:1490
1487 }
1488
1489 SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
-> 1490 if (rv == -1)
1491 SCM_SYSERROR;
1492
1493 scm_substring_move_x (scm_from_locale_string (c_tmpl),
(lldb) p rv
(int) $8 = -1
(lldb)
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#24862
; Package
guile
.
(Fri, 11 Nov 2016 01:52:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 24862 <at> debbugs.gnu.org (full text, mbox):
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 */
Information forwarded
to
bug-guile <at> gnu.org
:
bug#24862
; Package
guile
.
(Wed, 01 Mar 2017 13:39:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 24862 <at> debbugs.gnu.org (full text, mbox):
Hi Matt :)
On Fri 11 Nov 2016 02:51, Matt Wette <mwette <at> alumni.caltech.edu> writes:
> 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
Thanks for doing this investigation. This patch is applied, thanks to
your efforts. Do you know if this bug has additional pending items or
is it resolved? If it is resolved, feel free to respond to the bug,
adding "-done" to the email address (e.g. 24862-done <at> debbugs.gnu.org).
Cheers,
Andy
Reply sent
to
Matt Wette <matt.wette <at> gmail.com>
:
You have taken responsibility.
(Sun, 19 Mar 2017 23:56:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Marius Schamschula <lists <at> schamschula.com>
:
bug acknowledged by developer.
(Sun, 19 Mar 2017 23:56:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 24862-done <at> debbugs.gnu.org (full text, mbox):
This should be closed. — Matt
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 17 Apr 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.