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

Disable CGO for improved compatibility across distros #276

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

gpassini
Copy link
Contributor

@gpassini gpassini commented Oct 24, 2023

This PR disables CGO so we don't have any dependencies on C libraries expected to be found in the environment, in order to achieve a better compatibility across distros.

Tested by running make install before and after the changes and inspecting the produced binary from a Linux machine (Debian in this case).
Before

ldd $(which grpcui)
	linux-vdso.so.1 (0x00007ffe2cb2e000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fcc13946000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcc13924000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcc13750000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fcc1396a000)

After

ldd $(which grpcui)
	not a dynamic executable

Follow-up of the same changes in grpcurl: fullstorydev/grpcurl#420

@gpassini gpassini merged commit 73a517a into master Oct 24, 2023
2 checks passed
@gpassini gpassini deleted the disable_cgo branch October 24, 2023 18:26
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

Successfully merging this pull request may close these issues.

2 participants