Thank you for the tip,<div><br></div><div>I was indeed wondering why target default value was x86.</div><div><br clear="all">romain<br>
<br><br><div class="gmail_quote">On Tue, Mar 16, 2010 at 1:33 AM, Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

LLVM 2.6 hadn't updated configure, and would build as 32-bit by<br>
default. The easy fix is to always force the desired triple when<br>
configuring, I generally use:<br>
  configure --{build,host,target}=x86_64-apple-darwin10<br>
<font color="#888888"><br>
 - Daniel<br>
</font><div><div></div><div class="h5"><br>
On Mon, Mar 15, 2010 at 4:22 AM, Garrison Venn <<a href="mailto:gvenn.cfe.dev@gmail.com">gvenn.cfe.dev@gmail.com</a>> wrote:<br>
> I'm not sure why you are getting mixed architecture (bit size) results on<br>
> 10.6.x but you can also build the examples<br>
> as part of the llvm build.<br>
> Set the environmental var BUILD_EXAMPLES to 1before executing the llvm make.<br>
> Garrison<br>
> On Mar 14, 2010, at 11:00, Romain Pechayre wrote:<br>
><br>
> Hello all,<br>
> I am trying to build the kaleidoscope sample code on Mac os (10.6).<br>
> What I have done to get llvm libraries :<br>
> 1) Downloaded llvm-2.6 source code<br>
> 2) ./configure<br>
> 3)make<br>
> 4) make intall<br>
> Then I tried to build kaleidoscope as described in the tutorial:<br>
><br>
> g++ -g -O3 toy.cpp `llvm-config --cppflags --ldflags --libs core` -o toy<br>
><br>
> I get  typical link time errors (undefined symbols: ...)  as if the linked<br>
> libraries were not found ( llvm-config seems to work fine)<br>
> The very first errors are the following:<br>
> ld: warning: in /usr/local/lib/libLLVMCore.a, file was built for unsupported<br>
> file format which is not the architecture being linked (x86_64)<br>
> ld: warning: in /usr/local/lib/libLLVMSupport.a, file was built for<br>
> unsupported file format which is not the architecture being linked (x86_64)<br>
> ld: warning: in /usr/local/lib/libLLVMSystem.a, file was built for<br>
> unsupported file format which is not the architecture being linked (x86_64)<br>
> Then I guess libraries are not linked and I get classical errors.<br>
> By the way, I get the same errors (apart from the first ones) if I build<br>
> like this (omitting libraries flags):<br>
> g++ -g -O3 toy.cpp -I/usr/local/include  -D_DEBUG -D_GNU_SOURCE<br>
> -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -o toy<br>
> There must be something wrong with the libraries and I assume I have not<br>
> compiled them the right way. Please let me know if you have any ideas.<br>
> Regards,<br>
> romain<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>