Which binary clang version I should use for CentOS

Based on http://llvm.org/releases/download.html

  • Clang Binaries for FreeBSD9/x86_64 (69M)(.sig)
  • Clang Binaries for Ubuntu-12.04/x86 (67M)(.sig)
  • Clang Binaries for Ubuntu-12.04/x86_64 (71M)(.sig)

My OS is CentOS 6.3 Gnome Desktop x86 from http://virtualboxes.org/images/centos/ Item 13.

Which version I should use for it?


The binaries for Ubuntu 12.04 x86 may work (may, not will); but if they don't, it's due to linkage to libraries which have changed incompatibly between 2010 and 2012.

The userspace of CentOS / Red Hat Enterprise Linux of the 6.x series is based on Fedora 12, from late 2009 / early 2010. Ubuntu 12.04 was released in April 2012, with most of its libraries using versions that were released in late 2011. So there's roughly 24 to 30 months of development work between CentOS 6.x and Ubuntu 12.x.

If anything in glibc (or libstdc++ especially) has changed notably since then, Clang or anything based on LLVM won't work if it was compiled for Ubuntu 12.04 and run on CentOS 6.x.

I can't say for sure because I haven't tested it.

What you should do instead is either compile LLVM and Clang yourself on CentOS 6.3, or look for a repository that ships Clang binaries for CentOS, like ELRepo.


Another place to look for Clang binaries is in EPEL. They have Clang 3.4 for RHEL 6 right now, which should work fine with CentOS 6.