Skip to content
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

The compiled binary relies on GLIBC_2.28 to work correctly. #223

Open
TENX-S opened this issue Sep 25, 2023 · 3 comments
Open

The compiled binary relies on GLIBC_2.28 to work correctly. #223

TENX-S opened this issue Sep 25, 2023 · 3 comments

Comments

@TENX-S
Copy link

TENX-S commented Sep 25, 2023

We are unable to run the binary compiled with xgo-1.21.1 on an older system (glibc 2.27). Is there any workaround to resolve this issue? Thank you!
image

@techknowlogick
Copy link
Owner

Thanks for the report @TENX-S which OS and version are you attempting to run the binary on? Can you provide the full build command you are using including the ldflags?

@TENX-S
Copy link
Author

TENX-S commented Sep 25, 2023

which OS and version are you attempting to run the binary on?

root@bd2093:~# ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1.2) 2.27
Copyright (C) 2018 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.
root@bd2093:~# cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@bd2093:~# uname -a
Linux bd2093 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Can you provide the full build command you are using including the ldflags?

xgo --targets=linux/arm-7 -ldflags='-s -w'  -go go-1.21.1 -x -v -dest=. -pkg="." -out=$1 .
xgo --targets=linux/arm64 -ldflags='-s -w'  -go go-1.21.1 -x -v -dest=. -pkg="." -out=$1 .
xgo --targets=linux/amd64 -ldflags='-s -w'  -go go-1.21.1 -x -v -dest=. -pkg="." -out=$1 .

@TENX-S
Copy link
Author

TENX-S commented Oct 10, 2023

Is there any workaround at this moment?

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

No branches or pull requests

2 participants