Skip to content

Linker error with Webrtc on Windows #32731

Closed
Closed
@xulai1001

Description

@xulai1001

Summary

Linking zed.exe in windows failed with error: rust-lld: error: /failifmismatch: mismatch detected for 'RuntimeLibrary'

Description

rust-lld: error: /failifmismatch: mismatch detected for 'RuntimeLibrary':␍
          >>> libwebrtc_sys-35b9de37ab8692ab.rlib(0602fb52cb66f316-media_stream_track.o) has value MD_DynamicRelease␍
          >>> libwebrtc_sys-35b9de37ab8692ab.rlib(video_frame.obj) has value MT_StaticRelease␍

Steps to reproduce:

  1. Build zed root project with cargo build --release on Windows 11 x64
  2. The build step was successful ( with MSVC 143 Spectre migitation libs installed to prevent previous issues), but linking failed with such error.
  3. Using msvc link.exe to link (not rust-lld) also exited with the error above.

Expected result:
All parts of libwebrtc_sys should set to statically linked.

Other tries:
I have tried to upgrade the libwebrtc dependency in livekit_client/Cargo.toml to the latest version ( 0.3.11 ), but Zed failed to compile due to breaking changes in libwebrtc version 0.3.8.

Zed Version and System Specs

latest version of master branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions