rustup requires newer GLIBC than rustc on some arches

Created on 4 Mar 2019  路  6Comments  路  Source: rust-lang/rustup

Problem
The distributed builds of rustup on some arches require relatively recent GLIBC symbols, newer than the baseline used by rustc itself. Especially, those that build rustup with ubuntu:18.04 cross-gcc will be tied to a similar OS ABI, while rustc supports older systems than that.

This bug is a continuation of #1339.

Steps
For example, on RHEL 7.6 ppc64:

$ rpm -q glibc
glibc-2.17-260.el7.ppc64
$ curl https://sh.rustup.rs -sSf | sh
info: downloading installer
/tmp/tmp.VElBcOx0vj/rustup-init: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /tmp/tmp.VElBcOx0vj/rustup-init)
/tmp/tmp.VElBcOx0vj/rustup-init: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /tmp/tmp.VElBcOx0vj/rustup-init)

Possible Solution(s)
Rust's own docker images use careful cross toolchains to maintain ABI, and I think rustup could just reuse those same docker images.

Notes
For the currently available linux-gnu binaries, I see:

$ for f in */rustup-init; do echo $f; eu-readelf -V $f | grep -o 'Name: GLIBC\S*' | sort -V | tail -n1; done
aarch64-unknown-linux-gnu/rustup-init
Name: GLIBC_2.17
arm-unknown-linux-gnueabihf/rustup-init
Name: GLIBC_2.16
arm-unknown-linux-gnueabi/rustup-init
Name: GLIBC_2.16
armv7-unknown-linux-gnueabihf/rustup-init
Name: GLIBC_2.16
i686-unknown-linux-gnu/rustup-init
Name: GLIBC_2.3.4
mips64el-unknown-linux-gnuabi64/rustup-init
Name: GLIBC_2.25
mips64-unknown-linux-gnuabi64/rustup-init
Name: GLIBC_2.25
mipsel-unknown-linux-gnu/rustup-init
Name: GLIBC_2.25
mips-unknown-linux-gnu/rustup-init
Name: GLIBC_2.25
powerpc64le-unknown-linux-gnu/rustup-init
Name: GLIBC_2.25
powerpc64-unknown-linux-gnu/rustup-init
Name: GLIBC_2.25
powerpc-unknown-linux-gnu/rustup-init
Name: GLIBC_2.25
s390x-unknown-linux-gnu/rustup-init
Name: GLIBC_2.25
x86_64-unknown-linux-gnu/rustup-init
Name: GLIBC_2.3.4

All of those requiring GLIBC_2.25 are problematic: mips, powerpc, and s390x.

Rust currently uses ubuntu:16.04 toolchains for all mips* targets, RHEL6-ish toolchains for powerpc, powerpc64, and s390x, and RHEL7-ish toolchains for powerpc64le.

bug

All 6 comments

Thanks for your report @cuviper - I guess that what we need to do is to consider the base docker images we use for our builds. Currently we simply use trusty but perhaps there's a still-supported Ubuntu option we might use instead? Otherwise I guess we need to customise the dist for each architecture.

If you could take a look at .travis.yml and make a suggestion (or even better, a PR) then I'd appreciate your input.

Thanks,

D.

Trusty (Ubuntu 16.04) will reach EOL on 17.04.2019 so this workaround will be temporary. Also it ships with glibc 2.19 so binaries still would not work on RHEL or CentOS.

I think that for non-tier 1 platforms, you're best course of action is to build from source. We would happily accept a PR if needed to help with that, but I don't think we have the bandwidth to improve things for our own distributions, sorry.

I'm intending to work on this, if you could leave it open...

The symbol versions for those arches look much better in the rustup 1.18 release:

$ for f in */rustup-init; do echo $f; eu-readelf -V $f | grep -o 'Name: GLIBC\S*' | sort -V | tail -n1; done
mips64el-unknown-linux-gnuabi64/rustup-init
Name: GLIBC_2.18
mips64-unknown-linux-gnuabi64/rustup-init
Name: GLIBC_2.18
mipsel-unknown-linux-gnu/rustup-init
Name: GLIBC_2.18
mips-unknown-linux-gnu/rustup-init
Name: GLIBC_2.18
powerpc64le-unknown-linux-gnu/rustup-init
Name: GLIBC_2.17
powerpc64-unknown-linux-gnu/rustup-init
Name: GLIBC_2.7
powerpc-unknown-linux-gnu/rustup-init
Name: GLIBC_2.7
s390x-unknown-linux-gnu/rustup-init
Name: GLIBC_2.7

Thanks @cuviper! I can confirm that installation on CentOS 7 ppc64le works out of the box now, without requiring the script I had mentioned in #1339.

Was this page helpful?
0 / 5 - 0 ratings