<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm not sure why you are getting mixed architecture (bit size) results on 10.6.x but you can also build the examples<div>as part of the llvm build.</div><div><br></div><div>Set the environmental var BUILD_EXAMPLES to 1before executing the llvm make.</div><div><br></div><div>Garrison</div><div><br><div><div>On Mar 14, 2010, at 11:00, Romain Pechayre wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello all,<div><br></div><div>I am trying to build the kaleidoscope sample code on Mac os (10.6).</div><div>What I have done to get llvm libraries :</div><div><br></div><div>1) Downloaded llvm-2.6 source code</div><div>2) ./configure</div><div>3)make</div><div>4) make intall</div><div><br></div><div>Then I tried to build kaleidoscope as described in the tutorial:</div><div><span class="Apple-style-span" style="font-family: Times; "><pre>g++ -g -O3 toy.cpp `llvm-config --cppflags --ldflags --libs core` -o toy</pre></span><div>I get  typical link time errors (undefined symbols: ...)  as if the linked libraries were not found ( llvm-config seems to work fine)</div><div><br></div><div>The very first errors are the following:</div><div><div>ld: warning: in /usr/local/lib/libLLVMCore.a, file was built for unsupported file format which is not the architecture being linked (x86_64)</div><div>ld: warning: in /usr/local/lib/libLLVMSupport.a, file was built for unsupported file format which is not the architecture being linked (x86_64)</div><div>ld: warning: in /usr/local/lib/libLLVMSystem.a, file was built for unsupported file format which is not the architecture being linked (x86_64)</div><div><br></div><div>Then I guess libraries are not linked and I get classical errors.</div><div>By the way, I get the same errors (apart from the first ones) if I build like this (omitting libraries flags):</div><div><br></div><div>g++ -g -O3 toy.cpp -I/usr/local/include  -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -o toy</div><div><br></div><div>There must be something wrong with the libraries and I assume I have not compiled them the right way. Please let me know if you have any ideas.</div><div><br></div><div>Regards,</div><div><br></div><div>romain</div><div><br></div></div></div></div>_______________________________________________<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">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></div></body></html>