[gambit-list] Reduced: in 4.7.0 MSVC in C++ mode values passed Scheme<>C corrupt, should be tested on MSVC 2012 Re: Query re (load "file.o1") in MS Visual C w latest Gambit

Mikael mikael.rcv at gmail.com
Fri Sep 13 21:30:07 EDT 2013

Dear Marc,

(I'm presuming here that gambit.h should be constant between MSVC versions,
and that |compile-file| and |load| makes use of gsc and no more binary
beyond that in Gambit - to my best knowledge this is how it is so going
with this here:)

On 4.7.0 on MS Visual C, switching on C++ mode (cl.exe -TP) corrupts any
values passed to/from FFI, causing crash on return:


This is new since 4.6.6. This should be doublechecked on a MSVC 2012
machine, which is the MSVC version the prebuilt binary was made with. If
anyone on the list can test this on MSVC 2012 to doublecheck would be
great, otherwise I'll do this when I'll have it running.

This error brings light on (motivation for this in the presumption
statement above and the issue description):

How do you make a full Gambit build in MSVC?

More specifically, if you could clarify how to generate gambit.h and how to
make "make install" when on MSVC would be great.

There's no configure script to generate gambit.h etc. and the gambit.h
created by misc/vc*.bat doesn't work, so the only gambit.h I'm aware works
on MSVC, is the one bundled with the MSVC precompiled Gambit download - how
was that one generated?

Also, for building Gambit on MSVC indeed there's the misc/vc*.bat scripts,
however they don't do "make install" work. It would be great with separate
"_install.bat" scripts, or documentation covering also these aspects of how
make a full Gambit build on MSVC!

So, like, when you make a new MSVC precompiled binary based on the source
tree, if you can document the exact steps you take then, would cover this

Last, for a minor tweak: Regarding MSVC building in the Gambit repo: for
clarity the supported VC version name should be added to the related files
in the misc/directory i.e. rename vcproj.zip to vc2003proj.zip ,
vcexpress.bat to vc2005express.bat and vc2008.bat to vc2008_plus.bat
(prsuming it works not only in 2010 but also in 2012 of course), and update
the refs to these files in INSTALL.txt accordingly.
     This can be addressed later though and I'll be happy to do this - main
thing now is to make Gambit work fully on MSVC in C++ mode again.


2013/9/13 Mikael <mikael.rcv at gmail.com>

> Just wish to query if you know anything about the following problem, as
> I'm working with it since several hours so wanted to hear if you
> experienced anything like the same:
> Had MSVC-compiled 4.6.6 do (compile-file "file.scm") (load "file.o1")
> perfectly.
> Switching to MSVC-compiled 4.7.0 , the load in the same causes SIGSEGV.
> This is both with the precompiled gsc which is compiled with MSVC 2012
> (Express?), and with gsc compiled with MSVC 2005 Express.
> If the problem lasts I'll email a closer report.
> This must have an absolutely trivial cause. If figuring this out on my own
> I'll report the solution here.
> Brgds,
> Mikael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130914/75a14532/attachment.htm>

More information about the Gambit-list mailing list