Git Product home page Git Product logo

Comments (6)

theomonnom avatar theomonnom commented on May 28, 2024 2

Related to: https://developercommunity.visualstudio.com/t/std::declval-cannot-output-character-str/10472732?space=62&q=AVX512&sort=newest

You need to use another msvc version or wait for a new release from Microsoft

from rust-sdks.

theomonnom avatar theomonnom commented on May 28, 2024

Hey,
Can you try building webrtc yourself using build_windows.cmd and see if you still have this issue?

from rust-sdks.

daniel-abramov avatar daniel-abramov commented on May 28, 2024

Hey, yeah, I've just tried it and it ended up with:

"Building LiveKit WebRTC - Windows"
"Arch: x64"
"Profile: release"
Checking patch tools_webrtc/libs/generate_licenses.py...
warning: tools_webrtc/libs/generate_licenses.py has type 100644, expected 100755
error: while searching for:
    # Compile time dependencies, no license needed:?
    'ow2_asm': [],?
    'jdk': [],?
}?
?
# Third_party library _regex_ to licences mapping. Keys are regular expression?

error: patch failed: tools_webrtc/libs/generate_licenses.py:86
error: tools_webrtc/libs/generate_licenses.py: patch does not apply
Checking patch BUILD.gn...
error: while searching for:
      "pc:rtc_pc",?
      "sdk",?
      "video",?
    ]?
?
    if (rtc_include_builtin_audio_codecs) {?

error: patch failed: BUILD.gn:517
error: BUILD.gn: patch does not apply
Checking patch build/config/compiler/BUILD.gn...
error: while searching for:
      # gethostbyname. Fires mostly in non-Chromium code. We probably?
      # want to remove this define eventually.?
      "_WINSOCK_DEPRECATED_NO_WARNINGS",?
    ]?
    if (!is_clang) {?
      # TODO(thakis): Remove this once?

error: patch failed: build/config/compiler/BUILD.gn:1424
error: build/config/compiler/BUILD.gn: patch does not apply
Checking patch rtc_base/boringssl_certificate.cc...
Hunk #1 succeeded at 261 (offset 8 lines).
Checking patch rtc_base/boringssl_certificate.h...
error: while searching for:
class BoringSSLCertificate final : public SSLCertificate {?
 public:?
  explicit BoringSSLCertificate(bssl::UniquePtr<CRYPTO_BUFFER> cert_buffer);?
?
  static std::unique_ptr<BoringSSLCertificate> Generate(?
      OpenSSLKeyPair* key_pair,?

error: patch failed: rtc_base/boringssl_certificate.h:33
error: rtc_base/boringssl_certificate.h: patch does not apply
Checking patch rtc_base/openssl_adapter.cc...
error: while searching for:
    return ssl_verify_invalid;?
  }?
?
  BoringSSLCertificate cert(bssl::UpRef(sk_CRYPTO_BUFFER_value(chain, 0)));?
  if (!ssl_cert_verifier_->Verify(cert)) {?
    RTC_LOG(LS_WARNING) << "Failed to verify certificate using custom callback";?
    return ssl_verify_invalid;?

error: patch failed: rtc_base/openssl_adapter.cc:822
error: rtc_base/openssl_adapter.cc: patch does not apply
Checking patch rtc_base/openssl_stream_adapter.cc...
error: while searching for:
  // Creates certificate chain.?
  std::vector<std::unique_ptr<SSLCertificate>> cert_chain;?
  for (CRYPTO_BUFFER* cert : chain) {?
    cert_chain.emplace_back(new BoringSSLCertificate(bssl::UpRef(cert)));?
  }?
  stream->peer_cert_chain_.reset(new SSLCertChain(std::move(cert_chain)));?
?

error: patch failed: rtc_base/openssl_stream_adapter.cc:1154
error: rtc_base/openssl_stream_adapter.cc: patch does not apply

If I continue installation, it copies a lot of files, so the out directory is created, but its lib is empty (only Γ¬nclude` files are copied).

from rust-sdks.

theomonnom avatar theomonnom commented on May 28, 2024

Hey, the patches are safe to ignore, I think you already applied them before, I think the error is after that but you didn't send it

from rust-sdks.

daniel-abramov avatar daniel-abramov commented on May 28, 2024

Ah ok, ran it again on a clean set up:

PS C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc> .\build_windows.cmd --arch x64
"Building LiveKit WebRTC - Windows"
"Arch: x64"
"Profile: release"
Checking patch tools_webrtc/libs/generate_licenses.py...
warning: tools_webrtc/libs/generate_licenses.py has type 100644, expected 100755
error: while searching for:
    # Compile time dependencies, no license needed:?
    'ow2_asm': [],?
    'jdk': [],?
}?
?
# Third_party library _regex_ to licences mapping. Keys are regular expression?

error: patch failed: tools_webrtc/libs/generate_licenses.py:86
error: tools_webrtc/libs/generate_licenses.py: patch does not apply
Checking patch BUILD.gn...
error: while searching for:
      "pc:rtc_pc",?
      "sdk",?
      "video",?
    ]?
?
    if (rtc_include_builtin_audio_codecs) {?

error: patch failed: BUILD.gn:517
error: BUILD.gn: patch does not apply
Checking patch build/config/compiler/BUILD.gn...
error: while searching for:
      # gethostbyname. Fires mostly in non-Chromium code. We probably?
      # want to remove this define eventually.?
      "_WINSOCK_DEPRECATED_NO_WARNINGS",?
    ]?
    if (!is_clang) {?
      # TODO(thakis): Remove this once?

error: patch failed: build/config/compiler/BUILD.gn:1424
error: build/config/compiler/BUILD.gn: patch does not apply
Checking patch rtc_base/boringssl_certificate.cc...
Hunk #1 succeeded at 261 (offset 8 lines).
Checking patch rtc_base/boringssl_certificate.h...
error: while searching for:
class BoringSSLCertificate final : public SSLCertificate {?
 public:?
  explicit BoringSSLCertificate(bssl::UniquePtr<CRYPTO_BUFFER> cert_buffer);?
?
  static std::unique_ptr<BoringSSLCertificate> Generate(?
      OpenSSLKeyPair* key_pair,?

error: patch failed: rtc_base/boringssl_certificate.h:33
error: rtc_base/boringssl_certificate.h: patch does not apply
Checking patch rtc_base/openssl_adapter.cc...
error: while searching for:
    return ssl_verify_invalid;?
  }?
?
  BoringSSLCertificate cert(bssl::UpRef(sk_CRYPTO_BUFFER_value(chain, 0)));?
  if (!ssl_cert_verifier_->Verify(cert)) {?
    RTC_LOG(LS_WARNING) << "Failed to verify certificate using custom callback";?
    return ssl_verify_invalid;?

error: patch failed: rtc_base/openssl_adapter.cc:822
error: rtc_base/openssl_adapter.cc: patch does not apply
Checking patch rtc_base/openssl_stream_adapter.cc...
error: while searching for:
  // Creates certificate chain.?
  std::vector<std::unique_ptr<SSLCertificate>> cert_chain;?
  for (CRYPTO_BUFFER* cert : chain) {?
    cert_chain.emplace_back(new BoringSSLCertificate(bssl::UpRef(cert)));?
  }?
  stream->peer_cert_chain_.reset(new SSLCertChain(std::move(cert_chain)));?
?

error: patch failed: rtc_base/openssl_stream_adapter.cc:1154
error: rtc_base/openssl_stream_adapter.cc: patch does not apply
Traceback (most recent call last):
  File "C:/Users/daniel/Documents/rust-sdks/webrtc-sys/libwebrtc/src/build/toolchain/win/setup_toolchain.py", line 316, in <module>
    main()
  File "C:/Users/daniel/Documents/rust-sdks/webrtc-sys/libwebrtc/src/build/toolchain/win/setup_toolchain.py", line 274, in main
    env = _LoadToolchainEnv(cpu, toolchain_root, win_sdk_path, target_store)
  File "C:/Users/daniel/Documents/rust-sdks/webrtc-sys/libwebrtc/src/build/toolchain/win/setup_toolchain.py", line 190, in _LoadToolchainEnv
    return _ExtractImportantEnvironment(variables)
  File "C:/Users/daniel/Documents/rust-sdks/webrtc-sys/libwebrtc/src/build/toolchain/win/setup_toolchain.py", line 68, in _ExtractImportantEnvironment
    raise Exception(
Exception: Path "C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" from environment variable "include" does not exist. Make sure the necessary SDK is installed.
ERROR at //build/toolchain/win/win_toolchain_data.gni:9:7: Script returned non-zero exit code.
      exec_script("//build/toolchain/win/setup_toolchain.py",
      ^----------
Current dir: C:/Users/daniel/Documents/rust-sdks/webrtc-sys/libwebrtc/src/out-x64-release/
Command: C:/Users/daniel/Documents/rust-sdks/webrtc-sys/libwebrtc/depot_tools/bootstrap-2@3_8_10_chromium_26_bin/python3/bin/python3.exe C:/Users/daniel/Documents/rust-sdks/webrtc-sys/libwebrtc/src/build/toolchain/win/setup_toolchain.py "C:\Program Files/Microsoft Visual Studio/2022/Community" "C:\Program Files (x86)\Windows Kits\10" "C:\WINDOWS\System32;C:\WINDOWS\SysWOW64;Arm64Unused" win x86 environment.x86
Returned 1.
See //build/toolchain/win/toolchain.gni:14:1: whence it was imported.
import("//build/toolchain/win/win_toolchain_data.gni")
^----------------------------------------------------
See //build/toolchain/win/BUILD.gn:6:1: whence it was imported.
import("//build/toolchain/win/toolchain.gni")
^-------------------------------------------
See //BUILD.gn:38:3: which caused the file to be included.
  group("default") {
  ^-----------------
'ninja.exe' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\.gclient_entries missing, .gclient file in parent directory C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc might not be the file you want to use.
C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\.gclient_entries missing, .gclient file in parent directory C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc might not be the file you want to use.
Traceback (most recent call last):
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 276, in <module>
    sys.exit(main())
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 272, in main
    builder.GenerateLicenseText(args.output_dir)
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 215, in GenerateLicenseText
    third_party_libs |= self._GetThirdPartyLibraries(buildfile, target)
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 201, in _GetThirdPartyLibraries
    output = json.loads(LicenseBuilder._RunGN(buildfile_dir, target))
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 196, in _RunGN
    output_json = subprocess.check_output(cmd, cwd=WEBRTC_ROOT).decode('UTF-8')
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\daniel\\Documents\\rust-sdks\\webrtc-sys\\libwebrtc\\depot_tools\\bootstrap-2@3_8_10_chromium_26_bin\\python3\\bin\\python3.exe', 'C:\\Users\\daniel\\Documents\\rust-sdks\\webrtc-sys\\libwebrtc\\src\\third_party\\depot_tools\\gn.py', 'desc', '--all', '--format=json', 'C:\\Users\\daniel\\Documents\\rust-sdks\\webrtc-sys\\libwebrtc\\src\\out-x64-release', ':default']' returned non-zero exit status 1.
The system cannot find the path specified.
        1 file(s) copied.
The system cannot find the file specified.
(..)

Edit: After reading the output, I assumed that perhaps ninja must be installed separately, so I installed it via chocolatey and ran it again, but unfortunately the error is still there, it's just the last part looks like this:

(..)
See //BUILD.gn:38:3: which caused the file to be included.
  group("default") {
  ^-----------------
ninja: error: loading 'build.ninja': The system cannot find the file specified.

ninja: Entering directory `src\out-x64-release'
The system cannot find the path specified.
C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\.gclient_entries missing, .gclient file in parent directory C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc might not be the file you want to use.
C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\.gclient_entries missing, .gclient file in parent directory C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc might not be the file you want to use.
Traceback (most recent call last):
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 276, in <module>
    sys.exit(main())
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 272, in main
    builder.GenerateLicenseText(args.output_dir)
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 215, in GenerateLicenseText
    third_party_libs |= self._GetThirdPartyLibraries(buildfile, target)
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 201, in _GetThirdPartyLibraries
    output = json.loads(LicenseBuilder._RunGN(buildfile_dir, target))
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\src\tools_webrtc\libs\generate_licenses.py", line 196, in _RunGN
    output_json = subprocess.check_output(cmd, cwd=WEBRTC_ROOT).decode('UTF-8')
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\daniel\Documents\rust-sdks\webrtc-sys\libwebrtc\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Users\\daniel\\Documents\\rust-sdks\\webrtc-sys\\libwebrtc\\depot_tools\\bootstrap-2@3_8_10_chromium_26_bin\\python3\\bin\\python3.exe', 'C:\\Users\\daniel\\Documents\\rust-sdks\\webrtc-sys\\libwebrtc\\src\\third_party\\depot_tools\\gn.py', 'desc', '--all', '--format=json', 'C:\\Users\\daniel\\Documents\\rust-sdks\\webrtc-sys\\libwebrtc\\src\\out-x64-release', ':default']' returned non-zero exit status 1.
The system cannot find the path specified.
        1 file(s) copied.
The system cannot find the file specified.
(..)

from rust-sdks.

daniel-abramov avatar daniel-abramov commented on May 28, 2024

Thanks @theomonnom, that helped indeed! πŸ‘ I have updated to the latest version of the MSVC and it solved the problem - both cargo check and .\build_windows.cmd work!

I've also checked one of the recent commits - does it mean that it also comes with an older version of the MSVC (the one that came with MSVS2019?). Are there any suggested particular versions or requirements so that it suceeeds in the future (something that we need to take into account when building something for production)?

NB: Closing the issue since the problem is solved, thanks a lot for your support! I'd also appreciate the feedback on the suggested MSVC version πŸ™‚ Also, I've created a follow-up: #277 as it is a separate issue.

from rust-sdks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.