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

Investigate dynamic libraries for 8.0.0-beta.3 #8765

Closed
zmb3 opened this issue Oct 27, 2021 · 2 comments
Closed

Investigate dynamic libraries for 8.0.0-beta.3 #8765

zmb3 opened this issue Oct 27, 2021 · 2 comments
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements go Issues related to Go builds/tooling

Comments

@zmb3
Copy link
Collaborator

zmb3 commented Oct 27, 2021

In Teleport 7.1.0 we dynamically linked to:

$ ldd teleport 
	linux-vdso.so.1 (0x00007ffde3310000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7695ff2000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7695fec000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7695dfa000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f769601f000)

With 8.0.0-beta.2 we have a few additions:

$ ldd teleport
	linux-vdso.so.1 (0x00007ffe161f5000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc386852000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc38684c000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc3866fd000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc3866e2000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc3864f0000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fc386881000)

Investigate whether libm and libgcc_s are actually required or if we can remove these dependencies.

@zmb3 zmb3 added feature-request Used for new features in Teleport, improvements to current should be #enhancements go Issues related to Go builds/tooling labels Oct 27, 2021
@xacrimon
Copy link
Contributor

xacrimon commented Nov 3, 2021

As far as I am aware, these are dependencies of glibc and these are pulled in by any substantial C/C++/Rust code and especially the Rust standard library. Statically linking these are technically possible but these libraries are LGPL licensed which excludes that option if I am not mistaken.

If we really need to avoid these dependencies, the only real solution is to use a MUSL based target for C/C++/Rust code. These are available but they come with the disadvantage of MUSL generally being slower (sometimes significantly) than glibc for core tasks.

@zmb3
Copy link
Collaborator Author

zmb3 commented Nov 17, 2021

See #9028 for a separate but related issue with libc compatibility.

@zmb3 zmb3 closed this as completed Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements go Issues related to Go builds/tooling
Projects
None yet
Development

No branches or pull requests

2 participants