Which binary clang version I should use for CentOS

8

1

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?

q0987

Posted 2013-02-21T15:57:56.783

Reputation: 786

Please state whether you're using 32-bit or 64-bit CentOS. – allquixotic – 2013-02-21T16:01:50.450

Please see updated OP. – q0987 – 2013-02-21T16:04:03.257

Now they have pre-built binaries for Fedora, and it would work on CentOS. – Eonil – 2013-10-17T07:06:58.450

Answers

4

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.

allquixotic

Posted 2013-02-21T15:57:56.783

Reputation: 32 256

I cannot compile the clang from scratch. The issue I found yesterday is that the whole building process increases my VirtualBox disk space from 2GB to more than 9GB. I don't have enough space on my SSD. – q0987 – 2013-02-21T16:08:31.413

Then use the clang packages from ELRepo as I said. – allquixotic – 2013-02-21T16:18:27.207

Will check and update the post later. Many thanks:) – q0987 – 2013-02-21T16:20:36.487

4

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.

Jim Hunziker

Posted 2013-02-21T15:57:56.783

Reputation: 1 069