<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1476103199352_8077">I've ran into the same issue on windows using msys2 and made the same mistake. The path passed to configure must be a classic windows path with the drive letter and colon like "C:". The path separators can be forward or back slashes though. You can also run into problems in your code when opening files using an absolute path obtained from msys2 (as a commandline argument for example). I use the procedure below to sanitize any paths that could come from outside my code.</div><div id="yui_3_16_0_1_1476103199352_8078"><br id="yui_3_16_0_1_1476103199352_8079"></div><div id="yui_3_16_0_1_1476103199352_8080">I have not seen the segfault issue, but I discovered the problem when loading/including code and didn't try compiling anything before it was fixed.</div><div id="yui_3_16_0_1_1476103199352_8081"><br id="yui_3_16_0_1_1476103199352_8082"></div><div id="yui_3_16_0_1_1476103199352_8083"><br id="yui_3_16_0_1_1476103199352_8084"></div><div id="yui_3_16_0_1_1476103199352_8085">;; if running in msys and bash passed in a /c/... absolute path</div><div id="yui_3_16_0_1_1476103199352_8086">;; instead of C:/ then patch if so gambit can open the path</div><div id="yui_3_16_0_1_1476103199352_8087">(define (patch-mingw-path path)</div><div id="yui_3_16_0_1_1476103199352_8088"> (let* ((path path)</div><div id="yui_3_16_0_1_1476103199352_8089"> (stype (system-type))</div><div id="yui_3_16_0_1_1476103199352_8090"> (mingw (and (or (memq 'mingw32 stype)</div><div id="yui_3_16_0_1_1476103199352_8091"> (memq 'mingw64 stype))</div><div id="yui_3_16_0_1_1476103199352_8092"> #t))</div><div id="yui_3_16_0_1_1476103199352_8093"> (mingw-prefix (and (eq? (string-ref path 0) #\/)</div><div id="yui_3_16_0_1_1476103199352_8094"> (eq? (string-ref path 1) #\c)</div><div id="yui_3_16_0_1_1476103199352_8095"> (eq? (string-ref path 2) #\/))))</div><div id="yui_3_16_0_1_1476103199352_8096"> (if (and mingw mingw-prefix)</div><div id="yui_3_16_0_1_1476103199352_8097"> (begin</div><div id="yui_3_16_0_1_1476103199352_8098"> (string-set! path 0 #\C)</div><div id="yui_3_16_0_1_1476103199352_8099"> (string-set! path 1 #\:)))</div><div id="yui_3_16_0_1_1476103199352_8100"> path))</div><div id="yui_3_16_0_1_1476103199352_8101"><br id="yui_3_16_0_1_1476103199352_8102"></div><div id="yui_3_16_0_1_1476103199352_8103"><br id="yui_3_16_0_1_1476103199352_8104"></div><div id="yui_3_16_0_1_1476103199352_8105">Regards,</div><div id="yui_3_16_0_1_1476103199352_7941"></div><div id="yui_3_16_0_1_1476103199352_8106">Bob</div><div dir="ltr" id="yui_3_16_0_1_1476103199352_8107"><br id="yui_3_16_0_1_1476103199352_8108"></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Monday, October 10, 2016 10:01 PM, Marc Feeley <feeley@iro.umontreal.ca> wrote:<br></font></div> <br><br> <div class="y_msg_container">This is just a guess… I haven’t tried it… but the --prefix should use the Windows path (i.e. --prefix=C:\opt\gambit\bld) because on Windows, even with mingw, the Gambit runtime will call the WIN32 CreateFile function to open files and it expects a Windows path.<br clear="none"><br clear="none">I don’t understand why gsc would segfault however. Do you have more details? Can you try with gdb?<br clear="none"><br clear="none">Marc<br clear="none"><br clear="none">> On Oct 10, 2016, at 8:57 PM, Bill Six <<a shape="rect" ymailto="mailto:billsix@gmail.com" href="mailto:billsix@gmail.com">billsix@gmail.com</a>> wrote:<br clear="none">> <br clear="none">> I'm unable to figure out how to use Gambit on Windows successfully, and I'd like some help. (I'm plenty comfortable with Gambit on Linux/OSX). My general feeling is that I'm using configure's "prefix" argument incorrectly on Windows, which may be causing my problem.<br clear="none">> <br clear="none">> I can build gambit just fine using the msys2 environment with mingw64 as the compiler.<br clear="none">> <br clear="none">> (Here's the head of config.log<br clear="none">> "$ ./configure --prefix=/c/opt/gambit/bld --enable-single-host --enable-gcc-opts")<br clear="none">> <br clear="none">> I can do basic stuff in gsi, such as<br clear="none">> <br clear="none">> > (+ 1 2)<br clear="none">> 3<br clear="none">> <br clear="none">> But the following doesn't work:<br clear="none">> <br clear="none">> > (include "~~/lib/_gambit#.scm")<br clear="none">> *** ERROR IN (console)@2.1 -- Can't open file "\\c\\opt\\gambit\\bld\\lib/_gambit#.scm"<br clear="none">> <br clear="none">> and I can't get "gsc -exe foo.scm" (for some trivial foo.scm) to not segfault.<br clear="none">> <br clear="none">> Any ideas?<br clear="none">> <br clear="none">> Thanks,<br clear="none">> Bill<br clear="none">> _______________________________________________<br clear="none">> Gambit-list mailing list<br clear="none">> <a shape="rect" ymailto="mailto:Gambit-list@iro.umontreal.ca" href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br clear="none">> <a shape="rect" href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><div class="yqt8434120610" id="yqtfd42291"><br clear="none"><br clear="none">_______________________________________________<br clear="none">Gambit-list mailing list<br clear="none"><a shape="rect" ymailto="mailto:Gambit-list@iro.umontreal.ca" href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br clear="none"><a shape="rect" href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br clear="none"></div><br><br></div> </div> </div> </div></div></body></html>