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 link everything but libc #3392
Comments
Why do you think the |
Not so; static libs are only created if the top level cockroach build is static. EDIT: I only verified this with c-rocksdb, but I don't see why it would different for the other repos. |
Eh, |
nope:
where |
I guess I'm fuzzy on the semantics; I expect that libstdc++ is dynamically linked into cockroach as a result of rocksdb's inclusion (and how it was built), but perhaps that is incorrect. |
The decision to link libstdc++ statically or dynamically is made when the final cockroach binary is linked and is purely determine by the presence or absence of the |
My readings on the internet suggest that |
ldd cockroach linux-vdso.so.1 (0x00007ffe34163000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0eef3f7000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0eef1da000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0eeeed9000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0eeeb30000) /lib64/ld-linux-x86-64.so.2 (0x00007f0eef5ff000) Fixes #3392.
Right now, we are statically linking everything, including libc. This forces us to use musl, because statically linking glibc is insane.
We would like to statically link everything but libc, so that we aren't forced to use such an exotic configuration. This may require us to rethink our current collection of
c-*
repositories so that we can use upstream build systems to build static binaries which we link against, while letting thego
tool dynamically link everything else (which we hope is just libc).The text was updated successfully, but these errors were encountered: