Stream: general

Topic: LLVM error when building the compiler

Bhargav Voleti (Nov 08 2019 at 19:04, on Zulip):

Hi, I'm using to build the compiler but it's failing onint_endianness.h with the error message "Unable to determine endian". This error shows up on a freshly cloned repo and a fresh build. I'm running this on a RHEL 5.3 machine and this is the command I used to start the build: ./x,py build

Jake Goulding (Nov 12 2019 at 01:25, on Zulip):

5.3, also termed Update 3, January 20, 2009; 10 years ago (kernel 2.6.18-128)

That's... pretty old.

Laurențiu Nicola (Nov 12 2019 at 10:00, on Zulip):

See also @cuviper would know more, perhaps?

cuviper (Nov 12 2019 at 16:44, on Zulip):

@Bhargav Voleti what C compiler are you using? RHEL5's gcc is too old for LLVM. you may see rust/src/ci/docker/dist-x86_64-linux to see what we do to get sufficient toolchains on that centos:5 image

Bhargav Voleti (Nov 15 2019 at 17:30, on Zulip):

Yeah I think it's related to that @Philipp Hansch pointed out that it could be a compiler version issue. And I think it's GCC 4.4.6 Trying to update the version of GCC sort of borked the install. I'm just going to use my laptop running osx to build rustc.

Bhargav Voleti (Nov 15 2019 at 20:06, on Zulip):

Got the build working. I had to build the latest GCC from scratch and override the default cc symlink, but it works!

Bhargav Voleti (Nov 15 2019 at 22:32, on Zulip):

I celebrated prematurely. Looks like building LLVM requires an ancient version of GLIBCXX

Laurențiu Nicola (Nov 16 2019 at 11:50, on Zulip):

Docker might also work if you don't need binaries for CentOS or RHEL 5

cuviper (Nov 16 2019 at 18:18, on Zulip):

If you just need a working toolchain, the official binaries should be compatible with RHEL 5.

cuviper (Nov 16 2019 at 18:19, on Zulip):

If you're trying to modify the compiler, then I would choose a newer platform for development

Last update: Jun 04 2020 at 18:25UTC