[llvm-dev] Building LLVM 3.7.1 on OS X

Justin Bogner via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 25 09:16:13 PST 2016


Antoine Pitrou via llvm-dev <llvm-dev at lists.llvm.org> writes:
> Hello,
>
> I haven't found any relevant info in the docs about this. I'm trying to
> build LLVM 3.7.1 on OS X but it fails in the configuration phase. Here
> are the relevant parts of the output:
>
> $ cmake
> -DCMAKE_INSTALL_PREFIX=/Volumes/HD2/jenkins/workspace/LLVMDev/label/osxbuild/miniconda/envs/_build
> -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host
> -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_UTILS=OFF
> -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF ..
> -- The C compiler identification is AppleClang 4.1.0.4211166
> -- The CXX compiler identification is AppleClang 4.1.0.4211166
> [...]
> -- Looking for __atomic_fetch_add_4 in atomic
> -- Looking for __atomic_fetch_add_4 in atomic - not found
> CMake Error at cmake/modules/CheckAtomic.cmake:36 (message):
>   Host compiler appears to require libatomic, but cannot find it.
> Call Stack (most recent call first):
>   cmake/config-ix.cmake:291 (include)
>   CMakeLists.txt:360 (include)
>
>
> How is libatomic supposed to be installed on OS X?
> (perhaps it's somewhat of a newbie question - I'm not a OS X user...)

libatomic happens to be the first thing that cmake checks for, so this
is often the error message you get if your compiler isn't useable at all
for some reason.

You might be able to find more details about what's wrong by looking at
CMakeFiles/CMakeError.log in your build directory.

> Thank you,
>
> Antoine.
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list