Interesting. Does this extend beyond  llvm-gcc  to clang or non -O1 flags?  Does it happen with DragonEgg ( <a href="http://dragonegg.llvm.org/">http://dragonegg.llvm.org/</a> ) ?<br><br>best,<br>Jason<br><br><div class="gmail_quote">
On Mon, Aug 15, 2011 at 2:10 PM, Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca">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;">
<div><div></div><div class="h5"><br>
On 2011-07-31, at 7:50 AM, Marc Feeley wrote:<br>
<br>
><br>
> On 2011-07-31, at 1:59 AM, mikel evins wrote:<br>
><br>
>> A little more info about my failing attempts to build Gambit.<br>
>><br>
>> I tried a few variations (devel and non-devel) on downloading and configuring and updating; all failed to make it through a make check without a crash.<br>
>><br>
>> I can install the prebuilt Gambit 4.6.1 binaries, and in some quick, superficial testing, they appear to work correctly, but I can't build certain projects (including iOS projects), because I don't have the associated Gambit sources.<br>

>><br>
>> I'm using Lion (version 10.7) on an early 2008 24-inch iMac, with the developer tools provided through the App Store (XCode version 4.1, build 4B110).<br>
>><br>
>> Has anyone built Gambit using this build environment or something close to it? At this point, I'm sort of wondering whether I need to wipe the machine and do a clean reinstall of everything.<br>
>><br>
>><br>
>><br>
>> In case anyone wants more details, there's a lot more below:<br>
>><br>
><br>
> I have encountered this problem also (with Lion and the new Xcode).  The problem is due to LLVM gcc which is the default C compiler now and which does not compile the Gambit sources properly when the --enable-single-host configure option is given.  I've tried using gdb to find where the error is, but it is giving me an execution trace which doesn't correlate with the sources so I am confused in regards to the location of the error.<br>

><br>
> So to fix the problem temporarily I did<br>
><br>
>   CC="i686-apple-darwin11-gcc-4.2.1" ./configure --enable-single-host<br>
>   make<br>
>   make check<br>
><br>
> I also committed a patch to look for "i686-apple-darwin11-gcc-4.2.1" before "gcc", but that is not a long term solution.<br>
><br>
> My guess is that LLVM gcc is buggy, but I have not yet found a proof.<br>
<br>
</div></div>Indeed it is LLVM gcc that is buggy.  It generates incorrect code for taking the address of a label (for use in computed gotos) when the -O1 option is used.  The attached file exhibits the problem in a small C program.<br>

<br>
I have just submitted a bug report to the LLVM group.  I hate buggy compilers...<br>
<font color="#888888"><br>
Marc<br>
<br>
</font><br>_______________________________________________<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" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br>