Problem linking with llvm on mac os 10.6

Hello all,

I am trying to build the kaleidoscope sample code on Mac os (10.6).
What I have done to get llvm libraries :

  1. Downloaded llvm-2.6 source code
  2. ./configure
    3)make
  3. make intall

Then I tried to build kaleidoscope as described in the tutorial:

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”.

-Chris

Indeed it works. Thanks !
Is LLVM built with m32 by default ?

Cheers,

Romain

Indeed it works. Thanks !
Is LLVM built with m32 by default ?

Looks like it on your system,

-Chris

I’m not sure why you are getting mixed architecture (bit size) results on 10.6.x but you can also build the examples
as part of the llvm build.

Set the environmental var BUILD_EXAMPLES to 1before executing the llvm make.

Garrison

LLVM 2.6 hadn't updated configure, and would build as 32-bit by
default. The easy fix is to always force the desired triple when
configuring, I generally use:
  configure --{build,host,target}=x86_64-apple-darwin10

- Daniel

Thank you for the tip,

I was indeed wondering why target default value was x86.

romain