wrong libc linked during build
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- linux, rust
- Domain
- build-system, operating-systems
Research direction
Start by reproducing cargo install ripgrep on CentOS 7 with Rust 1.32.0, then compare it with Rust 1.31.0 and inspect the generated /tmp/cargo-installkV0c2k/release/deps/libserde_derive-615594b83ebc865a.so using ldd. Done means the Rust 1.32 build no longer requires an incompatible system libc and the installation succeeds.
Written by the indexing model from the issue text.
Description
Problem
It's been just two months I have not touched Rust but today after upgrading to the most recent version I was no longer able to use cargo install.
Steps
- update to rust 1.32:
rustup update+rustup default stable cargo install ripgrep
at the end of compilation the error message shows up:
...
Compiling globset v0.4.2
Compiling grep-regex v0.1.1
Compiling grep-cli v0.1.1
Compiling ignore v0.4.6
Compiling grep-printer v0.1.1
error: /usr/lib64/libc.so.6: version `GLIBC_2.18' not found (required by /tmp/cargo-installkV0c2k/release/deps/libserde_derive-615594b83ebc865a.so)
--> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/grep-printer-0.1.1/src/lib.rs:81:1
|
81 | extern crate serde_derive;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: failed to compile `ripgrep v0.10.0`, intermediate artifacts can be found at `/tmp/cargo-installkV0c2k`
I think the problem happens at linking time so I don't know if the additional error message at the end was really helpful.
This should not happen because rustc is not supposed to link against /usr/lib64/libc.so.6:
➜ ~ ldd /tmp/cargo-installkV0c2k/release/deps/libserde_derive-615594b83ebc865a.so
linux-vdso.so.1 (0x00007fffe41ba000)
libdl.so.2 => /home/linuxbrew/.linuxbrew/lib/libdl.so.2 (0x00007ff1ce55a000)
librt.so.1 => /home/linuxbrew/.linuxbrew/lib/librt.so.1 (0x00007ff1ce352000)
libpthread.so.0 => /home/linuxbrew/.linuxbrew/lib/libpthread.so.0 (0x00007ff1ce135000)
libgcc_s.so.1 => /home/linuxbrew/.linuxbrew/lib/libgcc_s.so.1 (0x00007ff1cdf1e000)
libc.so.6 => /home/linuxbrew/.linuxbrew/lib/libc.so.6 (0x00007ff1cdb7f000)
/home/linuxbrew/.linuxbrew/Cellar/glibc/2.23/lib64/ld-linux-x86-64.so.2 (0x00007ff1cea71000)
and /home/linuxbrew/.linuxbrew/lib/libc.so.6 is an updated version of glibc:
➜ ~ strings /home/linuxbrew/.linuxbrew/lib/libc.so.6 | grep ^GLIBC_
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18
GLIBC_2.22
GLIBC_2.23
GLIBC_PRIVATE
GLIBC_2.23
GLIBC_2.8
GLIBC_2.5
GLIBC_2.9
GLIBC_2.7
GLIBC_2.6
GLIBC_2.18
GLIBC_2.11
GLIBC_2.16
GLIBC_2.10
GLIBC_2.17
GLIBC_2.13
GLIBC_2.2.6
Notes
Output of cargo version:
➜ ~ cargo version
cargo 1.32.0 (8610973aa 2019-01-02)
➜ ~ rustc --version
rustc 1.32.0 (9fda7c223 2019-01-16)
The platform I have is CentOS 7. And if I downgrade rust to 1.31.0, it works without any problem. So this should be related to the version update.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-lang/cargo
-
C-bug S-triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
A-completions C-bug S-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
C-bug S-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Command-fix
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
cargo remove prints "Removing X" for dependencies that never get removed when the command fails OpenC-bug Command-remove S-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100