'no sw_vers' Error during llvm source compilation in linux on rhel


I am trying to build llvm/clang as per http://clang.llvm.org/get_started.html . My gcc version is 4.7.2 (upgraded from an older version 3.4.6 thinking that was the problem). I get this error when i try to build llvm on my RHEL machine. I have followed the steps, checked out the latest llvm,clang,compiler-rt through svn, and ran configure and make in the build directory. After a while i get the following error.

make[4]: Entering directory /ws/apjoseph-bgl/src/llvm/build/tools/clang/runtime/compiler-rt' which: no sw_vers in (<PATH VARIABLE VALUES>) <br>make[5]: Entering directory /ws/apjoseph-bgl/src/llvm/llvm/projects/compiler-rt’
make/lib_platforms.mk:80: *** ‘make/platform/clang_darwin.mk’: must define one of ‘UniversalArchs’ and ‘Arch’. Stop.
make[5]: Leaving directory /ws/apjoseph-bgl/src/llvm/llvm/projects/compiler-rt'<br>make[4]: *** [BuildRuntimeLibraries] Error 2<br>make[4]: Leaving directory /ws/apjoseph-bgl/src/llvm/build/tools/clang/runtime/compiler-rt’
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory `/ws/apjoseph-bgl/src/llvm/build/tools/clang/runtime’
make[2]: *** [all] Error 1


Has any1 else seen this issue?


Hi Appu,

Which version are you building? If it is after r173465, try reverting
that and r173977. Otherwise, try updating to top of trunk.