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

Reduce storage requirements for webrtc Canary #74

Open
lherman-cs opened this issue Oct 3, 2020 · 0 comments
Open

Reduce storage requirements for webrtc Canary #74

lherman-cs opened this issue Oct 3, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@lherman-cs
Copy link
Contributor

As of now, webrtc canary depends on AWS SDK and KVS Webrtc SDK. Since AWS SDK is monorepo, its size is about 500 MB.

To reduce this storage requirement, there are currently 2 solutions:

1. Create a static build and remove everything except the canary binary

This approach is the most preferable, but static builds are flaky, it's consistent across platforms. For example, OpenSSL static build fails only on ubuntu 18.04 not on other versions of ubuntu.

/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_lock_new':
threads_pthread.c:(.text+0x45): undefined reference to `pthread_rwlock_init'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_read_lock':
threads_pthread.c:(.text+0x75): undefined reference to `pthread_rwlock_rdlock'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_write_lock':
threads_pthread.c:(.text+0x95): undefined reference to `pthread_rwlock_wrlock'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_unlock':
threads_pthread.c:(.text+0xb5): undefined reference to `pthread_rwlock_unlock'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_lock_free':
threads_pthread.c:(.text+0xda): undefined reference to `pthread_rwlock_destroy'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_run_once':
threads_pthread.c:(.text+0x105): undefined reference to `pthread_once'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_init_local':
threads_pthread.c:(.text+0x125): undefined reference to `pthread_key_create'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_set_local':
threads_pthread.c:(.text+0x157): undefined reference to `pthread_setspecific'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_cleanup_local':
threads_pthread.c:(.text+0x177): undefined reference to `pthread_key_delete'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `openssl_init_fork_handlers':
threads_pthread.c:(.text+0x1d3): undefined reference to `pthread_once'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `fork_once_func':
threads_pthread.c:(.text+0x16): undefined reference to `pthread_atfork'
/tmp/amazon-kinesis-video-streams-webrtc-sdk-c/open-source/lib/libcrypto.a(threads_pthread.o): In function `CRYPTO_THREAD_get_local':
threads_pthread.c:(.text+0x143): undefined reference to `pthread_getspecific'

OpenSSL should include pthread as a part of binary (either dynamic or static link to pthread), but it somehow didn't get linked.

2. Create a dynamic build and remove just the source codes

This approach is OK, but we need to create a script that can understand the library dependencies and make sure that we don't end up deleting them. A tool like ldd will tell us these dependencies, but it gets ugly pretty quickly.

@MushMal MushMal added the enhancement New feature or request label Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants