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

Statically linked build #42

Open
bsibaud opened this issue Feb 9, 2023 · 0 comments
Open

Statically linked build #42

bsibaud opened this issue Feb 9, 2023 · 0 comments

Comments

@bsibaud
Copy link

bsibaud commented Feb 9, 2023

The outdated binary from master https://github.com/huaweicloud/cloudeye-exporter/blob/master/cloudeye-exporter or the latest binary from v2.0.2 are dynamically linked.

Respectively:

ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=OaKW9im3nqCcTDlrXmSx/bnLnLWcQ0pq1HHkaCLCG/jFEzs41UtpKfd1I1xg9R/BaeFDiaJ9wchueQjaZ_c, not stripped
ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, Go BuildID=Zd9MUhcLdr5npg8T7wld/JGG57_j_D1xtu2imtic1/8Pd3NG3LG6NH4hNJ0Oj4/BpGSuRv3PQG_awhr-REP, BuildID[sha1]=ca49f23bf68174bfe2ac42708788a91c6474a76d, stripped

The provided v2.0.2 binary won't work on Alpine 3.17.1 (dockerhub alpine:3.17.1 ) for example (due to glibc symbol):

 ldd cloudeye-exporter
	/lib64/ld-linux-x86-64.so.2 (0x7f0a6c76c000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f0a6c76c000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f0a6c76c000)
Error relocating cloudeye-exporter: __vfprintf_chk: symbol not found
Error relocating cloudeye-exporter: __fprintf_chk: symbol not found

One solution could be to provide a statically linked binary (almost all prometheus exporters I know are statically built).
An other solution may be to provide a docker image or at least a Dockerfile.

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

1 participant