<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_11906"><span id="yui_3_16_0_1_1476103199352_11989">Excellent.  </span>That is a much better general solution than my hack.</div><div id="yui_3_16_0_1_1476103199352_11906"><span><br></span></div><div id="yui_3_16_0_1_1476103199352_11906"><span>Thanks!</span></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 Tuesday, October 11, 2016 10:49 AM, Marc Feeley <feeley@iro.umontreal.ca> wrote:<br></font></div>  <br><br> <div class="y_msg_container">I think it is preferable for the path conversion to happen outside of Gambit (what if you actually mean the path \c\… on your default drive, in other words C:\c is actually a directory?).  There’s a question on stackoverflow on how to do this… <a shape="rect" href="http://stackoverflow.com/questions/12015348/msys-path-conversion-or-cygpath-for-msys" target="_blank">http://stackoverflow.com/questions/12015348/msys-path-conversion-or-cygpath-for-msys</a><br clear="none"><br clear="none">Marc<br clear="none"><br clear="none">> On Oct 11, 2016, at 10:21 AM, Bob Coleman <<a shape="rect" ymailto="mailto:bobcolem@yahoo.com" href="mailto:bobcolem@yahoo.com">bobcolem@yahoo.com</a>> wrote:<br clear="none">> <br clear="none">> 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.<br clear="none">> <br clear="none">> 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.<br clear="none">> <br clear="none">> <br clear="none">> ;; if running in msys and bash passed in a /c/... absolute path<br clear="none">> ;; instead of C:/ then patch if so gambit can open the path<br clear="none">> (define (patch-mingw-path path)<br clear="none">>   (let* ((path path)<br clear="none">>          (stype (system-type))<br clear="none">>          (mingw (and (or (memq 'mingw32 stype)<br clear="none">>                           (memq 'mingw64 stype))<br clear="none">>                      #t))<br clear="none">>          (mingw-prefix (and (eq? (string-ref path 0) #\/)<br clear="none">>                             (eq? (string-ref path 1) #\c)<br clear="none">>                             (eq? (string-ref path 2) #\/))))<br clear="none">>     (if (and mingw mingw-prefix)<br clear="none">>         (begin<br clear="none">>           (string-set! path 0 #\C)<br clear="none">>           (string-set! path 1 #\:)))<br clear="none">>     path))<br clear="none">> <br clear="none">> <br clear="none">> Regards,<br clear="none">> Bob<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> On Monday, October 10, 2016 10:01 PM, Marc Feeley <<a shape="rect" ymailto="mailto:feeley@iro.umontreal.ca" href="mailto:feeley@iro.umontreal.ca">feeley@iro.umontreal.ca</a>> wrote:<br clear="none">> <br clear="none">> <br clear="none">> 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="yqt9345508169" id="yqtfd39198"><br clear="none">> <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">> <br clear="none">> <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>