Can't compile ZED anymore using Vendor - error: failed to run custom build command for `webrtc-sys v0.3.5 #24512
Replies: 11 comments
-
|
Beta Was this translation helpful? Give feedback.
-
Os: OpenMandriva Cooker, but same problem is also on OpenSuse Tumbleweed.
And yes, trying to build it outside of internet (unfortunately this is the policy of many linux systems, where the build must be performed without access to the network, using only libraries from the repository or vendored rust crates). |
Beta Was this translation helpful? Give feedback.
-
See: https://github.com/zed-industries/livekit-rust-sdks/blob/060964da10574cd9bf06463a53bf6e0769c5c45e/webrtc-sys/build/src/lib.rs#L98-L112 |
Beta Was this translation helpful? Give feedback.
-
I believe that livekit's rust sdk is this way because it uses a patched libwebrtc. So it downloads a statically linked build of it to avoid needing to require all the build deps / build time of libwebrtc. I wrote some docs after figuring out how to build with a patched version of libwebrtc, should be exactly what you need to build offline / fully from source: https://github.com/livekit/rust-sdks/blob/main/webrtc-sys/libwebrtc/README.md It does seem pretty non-ideal to have a download of a precompiled binary as part of the build process. I'm not sure what a clean solution would look like (I don't yet know how vendoring C via crates works) I recommend you use Zed's patched version. For some inscrutable reason, for me port numbers were getting serialized to gibberish, and this patch fixed the issue?!?! : So Zed's fork of libwebrtc includes both LiveKit's patches and this patch. |
Beta Was this translation helpful? Give feedback.
-
I'm the maintainer of Zed for openSUSE Tumbleweed. As described by this bug report, Zed hasn't been building for a while with this exact error message because it isn't allowed to access the internet, which is a requirement to build in our build system. Whatever |
Beta Was this translation helpful? Give feedback.
-
@marv7000 I agree it's not good. One way to make progress on this might be to ask LiveKit to address this usecase - https://github.com/livekit/rust-sdks/ |
Beta Was this translation helpful? Give feedback.
-
@marv7000 @AngryPenguinPL I have found workaround for this. The build can be completed fully offline. Thanks to @mgsloan for writing that docs. That is the key to fix the build failing when offline. Thankfully, Livekit developers added a custom directory support as a fallback when building webrtc-sys. The gist is to include the SDKs in the build package itself. Add We can do this without touching Zed or the vendor files by adding the environment variable during build. I made a branch of the package here for reference: https://build.opensuse.org/package/show/home:hzu/zed |
Beta Was this translation helpful? Give feedback.
-
Neat, if you want you can create a submit request and I'll merge it. |
Beta Was this translation helpful? Give feedback.
-
This is the problem with windows as well, but it can be fixed by installing latest Windows 11 SDK |
Beta Was this translation helpful? Give feedback.
-
I don't know why this bug was closed and the conversation moved to discussion. The bug is still there and prevents Zed from being compiled on Linux distributions that care about security and can't use network access for compilation. |
Beta Was this translation helpful? Give feedback.
-
I have managed to build it fully offline, completely from source, including WebRTC. The catch? You need a ton of space and ton of time. Building Zed fully offline from source requires you to build WebRTC, which requires the whole of Chromium build toolchain.
If you don't mind using binaries, then you can simply preload the WebRTC binaries that was built by Zed and/or LiveKit and follow (1) only. However, I still couldn't get it to work with ARM64. I don't have an ARM64 device to test and I don't want to waste openSUSE's resources for this. The error is caused by Google's depot_tools. It could be because I packaged the Chromium build toolchain that is only suitable for x86_64. I'm not sure as I don't have many experience with the toolchain. |
Beta Was this translation helpful? Give feedback.
-
Check for existing issues
Describe the bug / provide steps to reproduce it
The last version of ZED that I managed to compile using the vendored rust crates was 0.164.2. Later versions give an error on compilation that says: failed to run custom build command for `webrtc-sys v0.3.5
Here is the error on Zed version 0.170.0-pre
Full build log: https://file-store.openmandriva.org/api/v1/file_stores/772278ed0f9367f6cf2c32e5396f4c7d272f3b49.log?show=true
I don't know what is visible in the livekit-rust-sdks log, but it is most likely not automatically added to the list of vendored rust dependencies.
In the vendor directory after executing "cargo vendor" I see only livekit, livekit-api, livekit-protocol and livekit-runtime, but there is no livekit-rust-sdk there...
The said webrtc-sys was vendored correctly.
I will add that I do not fully understand this error.
Does anyone know how to solve this?
Also looks like similar problem stopped opensuse package to build: https://build.opensuse.org/package/live_build_log/editors/zed/15.6/x86_64
Zed Version and System Specs
Zed from 0.166.0 to 0.170-pre
If applicable, add screenshots or screencasts of the incorrect state / behavior
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
Beta Was this translation helpful? Give feedback.
All reactions