<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 14, 2010, at 12:02 PM, 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; ">Indeed it works. Thanks ! <div>Is LLVM built with m32 by default ? </div></div></blockquote><div><br></div>Looks like it on your system,</div><div><br></div><div>-Chris</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Cheers,</div><div><br></div><div>Romain <br><div><div>On Mar 14, 2010, at 5:42 PM, Chris Lattner 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; "><br><div><div>On Mar 14, 2010, at 8:00 AM, 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></div></div></blockquote><div><br></div><div>This sounds like LLVM is being built as x86-32, but toy.cpp is being built as x86-64.  Try compiling toy.cpp with "-m32".</div></div><br><div>-Chris</div></div></blockquote></div><br></div></div></blockquote></div><br></body></html>