Dear Marc,<div><br></div><div>Now had the occasion to go through if Gambit termination works on different GCC & G++ versions in OpenBSD 5.2 AMD64 default.</div><div><br></div><div>I did not check with the "-latest" aka snapshot OBSD release this time, that could of course provide additional information, though sponaneously I would guess that the issue with eg++ (GCC) 4.7.1 in the default release as described below has the same underlying cause, as the output looks exactly the same.</div>



<div><br></div><div>This test make clear that there is a way to get Gambit going without issues on OBSD, so,</div><div><br></div><div>As far as I'm personally concerned this is a solved issue.</div><div><br></div><div>



<br></div><div><br></div><div>For completeness, here are the results:</div><div><br></div><div>Correct behavior of Gambit termination for different GCC & G++ versions on OBSD 5.2 AMD64 non-snapshot is as follows:</div>



<div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>gcc (GCC) 4.2.1 20070719 (this is the bundled version): Worked. (also ./configure --enable-single-host worked)</div><div>g++ (GCC) 4.2.1 20070719 (this is the bundled version): Worked.</div>



<div><br></div><div>egcc (GCC) 4.6.3: Worked.</div><div>eg++ (GCC) 4.6.3: Worked.</div><div><br></div><div>egcc (GCC) 4.7.1: Worked.</div><div>eg++ (GCC) 4.7.1: FAIL</div></div><div><br></div></blockquote></div><div><div>



For GCC compilation, ./configure --enable-single-host --enable-debug was used.</div><div>For G++ compilation, ./configure --enable-single-host --enable-debug --enable-cplusplus was used.</div><div><br></div><div>For invocation of the non-default version, CC=/usr/local/bin/egcc or CXX=/usr/local/bin/eg++ respectively was</div>



<div>added as prefix to the ./configure command line, in bash.</div><div><br></div><div>make clean was used to reset the GCC directory between compilations. The g++ 4.6.3 compilation was also double-checked by also compiling from a fresh Gambit source copy.</div>



</div><div><br></div><div>Gambit compiled with eg++ (GCC) 4.7.1 produces the following in response to ,q :</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="courier new, monospace">Gambit v4.6.6</font></div>



<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">> ,q</font></div><div><font face="courier new, monospace">terminate called after throwing an instance of '___throw_struct'</font></div>



<div><font face="courier new, monospace">terminate called recursively</font></div><div><font face="courier new, monospace">Abort trap (core dumped)</font></div></div></blockquote></div><div><br></div><div><br></div><div>


If I recall right, on the snapshot OBSD AMD64 release, this failure behavior was on both the 4.6 and 4.7 G++, and I did not try the 4.2 release at all due to ./configure's warning about excessive RAM consumption.</div>


<div><br></div><div><br></div><div><div>The only hint I picked up as regards the source of this issue, is that it might have to do with that 4.7.1 perhaps brings an alternative libstdc++ package (libstdc++ 4.7.1 it's called) while perhaps the other ones don't. I would guess this was not an issue though - it would make no sense for them to publish a problematic package without making the installer print a warning or alike. #openbsd seems to have nothing to say on the topic.</div>

</div><div><br></div><div><br></div>
<div><br></div><div>If there would be any checks I could do for completeness at some point, feel free to mention them.</div><div><br></div><div>Thanks and with best regards,</div><div>Mikael</div><div><br><div class="gmail_quote">



2013/1/3 Mikael <span dir="ltr"><<a href="mailto:mikael.rcv@gmail.com" target="_blank">mikael.rcv@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Hi Marc,<div><br></div><div>Thank you so much for having a look.<br><div><br><div class="gmail_quote"><div>2013/1/3 Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span><br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can't reproduce this bug with OpenBSD 5.2 and the g++ 4.2.1 which comes with it.  My guess is that the problem is related to a bug in the versions of g++ you have used.  Can you install an older g++ and see if that solves the problem?  Can you also try to compile using gcc (i.e. don't use --enable-cplusplus)?<br>




</blockquote><div><br></div></div><div>Aha funny.</div><div><br></div><div>Just for reference, in the test you made, was the OS compiled for the AMD64 architecture?</div><div><br></div><div><br></div><div>I did not use 5.2 but "current" a.k.a. "snapshot" for AMD64, as found on <a href="http://www.mirrorservice.org/pub/OpenBSD/snapshots/amd64/" target="_blank">http://www.mirrorservice.org/pub/OpenBSD/snapshots/amd64/</a> . Except for regarding exiting Gambit, this version of the system has shown to perfectly stable in every way I checked, so this is why I was so surprised to see any issue about Gambit's execution on it.</div>




<div><br></div><div>And right, I tried with <span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">G++ 4.7.2 and 4.6.3. On your 5.2 installation, installing this would look something like:</span></div>




<div><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></span></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>
<div class="gmail_quote"><div><font face="courier new, monospace"><span><font color="#222222">PKG_PATH=</font></span><font color="#222222"><a href="http://www.mirrorservice.org/pub/OpenBSD/5.2/packages/amd64/" target="_blank">http://www.mirrorservice.org/pub/OpenBSD/5.2/packages/amd64/</a></font></font></div>




</div></div></div><div><div class="gmail_quote"><div><font face="courier new, monospace"><font color="#222222">pkg_add </font>g++-4.6.3p6</font></div></div></div><div><div class="gmail_quote"><div><br></div></div></div><div>




<div class="gmail_quote"><div>(or just <font face="courier new, monospace">pkg_add <a href="http://www.mirrorservice.org/pub/OpenBSD/5.2/packages/amd64/g++-4.6.3p6.tgz" target="_blank">http://www.mirrorservice.org/pub/OpenBSD/5.2/packages/amd64/g++-4.6.3p6.tgz</a></font> )</div>




<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">rm /usr/bin/g++</font></div><div><font face="courier new, monospace">ln -s /usr/local/bin/eg++ /usr/bin/g++</font></div></div>




</div></blockquote><div><div class="gmail_quote"><div><br></div><div>I believe I did not try 4.2.1 til now because ./configure warned me that that GCC version is broken or slow or something.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




[..]<div><div>> But if so, why is not an uncaught exception error printed at gsc termination on every platform (which is g++'s default behavior)???<br>
<br>
</div>No, the runtime system should catch this exception in the ___BEGIN_TRY / ___END_TRY macros which are called in lib/setup.c (in only 2 places, so it should be easy to verify that the exception is actually caught by adding some printfs in the code).<br>




</div></blockquote><div><br></div><div>Right, so that's really funny.</div><div><br></div><div><br></div><div><div><br></div><div>Quite soon I'll try compiling Gambit on the 5.2 and maybe snapshot with different versions of both GCC and G++ including 4.2.1, and report the results here.</div>




</div><div><br></div><div><br></div><div>Best regards,</div><div>Mikael</div><div><br></div></div></div>
</blockquote></div><br></div>