<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
For some time, I'm having trouble compiling Gambit with SMP on Mac (running Catalina 10.15.4). I've tried with the Apple's clang, I've installed several compilers through Macports, several versions of gcc and clang and I have the same problem: segmentation
 faults during make modules. Source is<span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important"><span> </span>from git master, but I've tried going a few months back with no luck.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm running configure as</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">./configure --enable-single-host --enable-multiple-versions --enable-multiple-threaded-vms  --enable-smp   --enable-targets=js</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
(If I leave out one of the <span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">--enable-multiple-threaded-vms or --enable-smp flags then it builds ok)</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">and after the make -j && make modules I see stuff like this (in different modules):</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important"><span><br>
</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important"><span style="font-family:"Courier New",monospace">>>>> building module _match for C</span><span><br>
</span>
<div><span style="font-family:"Courier New",monospace">>>>> building module _match/match-expand for C</span><br>
</div>
<div><span style="font-family:"Courier New",monospace">/bin/sh: line 7: 65949 Segmentation fault: 11  ../../gsc/gsc -:~~bin=../../bin,~~lib=../../lib,~~include=../../include -f -e "(let ((x (##build-module \"$main_mod\" (quote $target) (quote ((module-ref $modref))))))
 (if (not x) (begin (println \"*** module failed to build\") (exit 1))))"</span><br>
</div>
<span></span><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
or</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">>>>> building module _test/verbose for js</span><span><br>
</span>
<div><span style="font-family:"Courier New",monospace">/bin/sh: line 7: 66835 Segmentation fault: 11  ../../gsc/gsc -:~~bin=../../bin,~~lib=../../lib,~~include=../../include -f -e "(let ((x (##build-module \"$main_mod\" (quote $target) (quote ((module-ref $modref))))))
 (if (not x) (begin (println \"*** module failed to build\") (exit 1))))"</span><br>
</div>
<span></span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Not sure how relevant this is, but if I build Gambit using <span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">
--enable-smp but without <span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">--enable-multiple-threaded-vms, I get a successful build, but then I have one failed test when running make check:</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important"><br>
</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important"><span style="font-family:Calibri,Arial,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">[</span><span style="font-variant-ligatures:no-common-ligatures; color:rgb(42,175,26); font-variant-ligatures:no-common-ligatures"><b>226</b></span><span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">|</span><span style="font-variant-ligatures:no-common-ligatures; color:rgb(176,33,23); font-variant-ligatures:no-common-ligatures"><b><span> 
</span>0</b></span><span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">]<span> 
</span>90% ##############.. 10.3s 13-modules/prim_exception.scm</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">*** FAILED 13-modules/prim_exception.scm WITH EXIT CODE HI=1 LO=0</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">(with-exception-handler ##list (lambda () (##cons 1 (##raise 123)))) in (include "~~lib/gambit/prim/exception#.scm") returned #<unbound-global-exception #2>
 but expected (1 123)</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">(with-exception-handler ##list (lambda () (##cons 1 (##raise 123)))) in (namespace ("##")) returned #<unbound-global-exception #3> but expected (1 123)</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">[</span><span style="font-variant-ligatures:no-common-ligatures; color:rgb(42,175,26); font-variant-ligatures:no-common-ligatures"><b>250</b></span><span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">|</span><span style="font-variant-ligatures:no-common-ligatures; color:rgb(176,33,23); font-variant-ligatures:no-common-ligatures"><b><span> 
</span>1</b></span><span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">] 100% ################ 11.3s</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">FAILED 1 UNIT TESTS OUT OF 251 (.4%)</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">gmake[2]: *** [makefile:186: ut] Error 1</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">gmake[2]: Leaving directory '/Users/ury/sources/gambit/tests'</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">gmake[1]: *** [makefile:183: test11] Error 2</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">gmake[1]: Leaving directory '/Users/ury/sources/gambit/tests'</span></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin:0px; font:13px Menlo; background-color:rgb(247,247,247); margin:0px; background-color:rgb(247,247,247)">
<span style="font-variant-ligatures:no-common-ligatures; font-variant-ligatures:no-common-ligatures">gmake: *** [makefile:208: check] Error 2</span></p>
<br>
</span></span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Maybe this problem sounds familiar, or at least maybe there is something I can try to fix or at least to debug it?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
(This is on an old Macbook, so I would've suspected faulty hardware, but I've tried some rather significant builds such as GTK3 or TeX and they run ok)</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I'm attaching the full compilation log (this time with GCC 10, but I had the same results with other versions).</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div>
<div id="Signature">
<div></div>
</div>
</div>
</body>
</html>