-
Notifications
You must be signed in to change notification settings - Fork 110
fix: fix linux so link issue. #733
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
Conversation
Ultimately, the only way to reliably prevent such issues is to build libwebrtc from source during the Cargo build process. I have made good progress towards that in #730. I also have some work-in-progress locally that I haven't pushed yet to create a source code archive that compresses down to a 101 MB .tar.xz file instead of the ridiculous 9 GB that gclient downloads. I do not think adding more patches to try to make a prebuilt library that works everywhere (which is impossible) is a good direction to go in. |
hey @Be-ing, It seems that you have made good progress. Can you try to use the libwebrtc.a compiled by chromium-llvm (maybe gnu) to compile liblivekit_ffi.so in x86 and arm64 linux respectively? It would be great if you can link it correctly. |
I'll give that a try on x86-64. I don't have an ARM machine around to test with.
To clarify, if this branch fixes a specific, immediate problem, I don't think it's necessarily bad to merge it, but not a good direction to continue on in general. |
Building entirely from libwebrtc source is suitable for users who use the rust-sdk directly. For users who use the python/node sdk and build AI agents on top of it, they need to be able to deploy by just running |
The prebuilt libwebrtc can stay as an option alongside building libwebrtc from source. I think building from source should be the default for webrtc-sys. Yes, the build time will be longer, but
Do those call the Rust code in this repo or invoke libwebrtc's C++ APIs? |
The Python Node SDK actually relies on the precompiled In Python or Node distributions, there are explicit download commands pointing to the corresponding binary links. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅
|
Since rustc is not compatible with libwebrtc.a compiled from llvm clang, we must use gcc/g++ 14 to compile Rust-compatible static libraries. However, g++ 14 will force the GLIBC_USE_ISOC23 macro to be enabled, which forces linking to isoc23_xxx symbols. This causes some older Docker images (which do not support glibc_2.38) to fail to load ffi.so. This PR is used to fix this issue.