<div dir="ltr">Turns out I needed to use native paths, with a forward slashes instead of back slashes, and now everything appears to be working.  Thanks!  (sorry for the delay)</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 11, 2016 at 10:50 AM, Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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 href="http://stackoverflow.com/questions/12015348/msys-path-conversion-or-cygpath-for-msys" rel="noreferrer" target="_blank">http://stackoverflow.com/<wbr>questions/12015348/msys-path-<wbr>conversion-or-cygpath-for-msys</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Marc<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Oct 11, 2016, at 10:21 AM, Bob Coleman <<a href="mailto:bobcolem@yahoo.com">bobcolem@yahoo.com</a>> wrote:<br>
><br>
> 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>
><br>
> 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>
><br>
><br>
> ;; if running in msys and bash passed in a /c/... absolute path<br>
> ;; instead of C:/ then patch if so gambit can open the path<br>
> (define (patch-mingw-path path)<br>
>   (let* ((path path)<br>
>          (stype (system-type))<br>
>          (mingw (and (or (memq 'mingw32 stype)<br>
>                           (memq 'mingw64 stype))<br>
>                      #t))<br>
>          (mingw-prefix (and (eq? (string-ref path 0) #\/)<br>
>                             (eq? (string-ref path 1) #\c)<br>
>                             (eq? (string-ref path 2) #\/))))<br>
>     (if (and mingw mingw-prefix)<br>
>         (begin<br>
>           (string-set! path 0 #\C)<br>
>           (string-set! path 1 #\:)))<br>
>     path))<br>
><br>
><br>
> Regards,<br>
> Bob<br>
><br>
><br>
><br>
> On Monday, October 10, 2016 10:01 PM, Marc Feeley <<a href="mailto:feeley@iro.umontreal.ca">feeley@iro.umontreal.ca</a>> wrote:<br>
><br>
><br>
> 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>
><br>
> I don’t understand why gsc would segfault however.  Do you have more details?  Can you try with gdb?<br>
><br>
> Marc<br>
><br>
> > On Oct 10, 2016, at 8:57 PM, Bill Six <<a href="mailto:billsix@gmail.com">billsix@gmail.com</a>> wrote:<br>
> ><br>
> > 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>
> ><br>
> > I can build gambit just fine using the msys2 environment with mingw64 as the compiler.<br>
> ><br>
> > (Here's the head of config.log<br>
> > "$ ./configure --prefix=/c/opt/gambit/bld --enable-single-host --enable-gcc-opts")<br>
> ><br>
> > I can do basic stuff in gsi, such as<br>
> ><br>
> > > (+ 1 2)<br>
> > 3<br>
> ><br>
> > But the following doesn't work:<br>
> ><br>
> > > (include "~~/lib/_gambit#.scm")<br>
> > *** ERROR IN (console)@2.1 -- Can't open file "\\c\\opt\\gambit\\bld\\lib/_<wbr>gambit#.scm"<br>
> ><br>
> > and I can't get "gsc -exe foo.scm" (for some trivial foo.scm) to not segfault.<br>
> ><br>
> > Any ideas?<br>
> ><br>
> > Thanks,<br>
> > Bill<br>
> > ______________________________<wbr>_________________<br>
> > Gambit-list mailing list<br>
> > <a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
> > <a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://webmail.iro.umontreal.<wbr>ca/mailman/listinfo/gambit-<wbr>list</a><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Gambit-list mailing list<br>
> <a href="mailto:Gambit-list@iro.umontreal.ca">Gambit-list@iro.umontreal.ca</a><br>
> <a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://webmail.iro.umontreal.<wbr>ca/mailman/listinfo/gambit-<wbr>list</a><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>