Skip to content

centos7 /lib64/libc.so.6: version `GLIBC_2.18' not found #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
qxqxq opened this issue May 18, 2022 · 2 comments
Closed

centos7 /lib64/libc.so.6: version `GLIBC_2.18' not found #711

qxqxq opened this issue May 18, 2022 · 2 comments

Comments

@qxqxq
Copy link

qxqxq commented May 18, 2022

[root@192 ~]# cat /proc/version
Linux version 3.10.0-1160.36.2.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Wed Jul 21 11:57:15 UTC 2021
[root@192 ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core

[root@192 mnt]# uname -m
x86_64
[root@192 mnt]# uname -s
Linux
[root@192 mnt]# ldd --version
ldd (GNU libc) 2.17
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

rustc --print target-list

x86_64-unknown-linux-gnu
x86_64-unknown-linux-gnux32
x86_64-unknown-linux-musl

I don't know how to choose an ABI.

Triples are usually formatted as follows: {arch}-{vendor}-{sys}-{abi}. For example, the triple arm-unknown-linux-gnueabihf refers to the systems that share these characteristics:

architecture: arm.
vendor: unknown. In this case, no vendor was specified and/or is not important.
system: linux.
ABI: gnueabihf. gnueabihf indicates that the system uses glibc as its C standard library (libc) implementation and has hardware accelerated floating point arithmetic (i.e. an FPU).
[root@192 ~]# rustup target list
...
x86_64-unknown-linux-gnu (installed)
x86_64-unknown-linux-gnux32
x86_64-unknown-linux-musl
...
[root@192 ~]# 

cross build --target x86_64-unknown-linux-gnu --release

[root@192 ~]# ./main
./main: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./main)

@qxqxq qxqxq changed the title How to select target? centos7 /lib64/libc.so.6: version `GLIBC_2.18' not found May 18, 2022
@qxqxq
Copy link
Author

qxqxq commented May 18, 2022

x86_64-unknown-linux-gnu 2.15 4.6.2 N/A

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jun 3, 2022

This happens regularly if you have an existing build for a target, the image changes or some other modification, and then the file is rebuilt. Simply run cargo clean and then re-build the image. This likely has to do something with fingerprint invalidation, which is a separate issue. This is related to #724.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants