Skip to content

Building aws-lc-sys under MSVC is brittle #780

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

Open
amyspark opened this issue Apr 15, 2025 · 3 comments
Open

Building aws-lc-sys under MSVC is brittle #780

amyspark opened this issue Apr 15, 2025 · 3 comments

Comments

@amyspark
Copy link
Contributor

amyspark commented Apr 15, 2025

Problem:

During the past few days, I've been wrestling build issues around upstream crates switching to aws-lc-rs.

This particular report concerns aws-lc-sys's usage of MSVC inside Docker:

Relevant details

AWS-LC for Rust versions or commit: 0.28.0

System information: for linux, below info can be collected by running uname -srvmp

  • CPU architecture: x86_64
  • CPU name: Unknown
  • OS: Windows Server LTSC 2022

Build log: https://gitlab.freedesktop.org/amyspark/cerbero/-/jobs/74703026#L678

Snippet
warning: [email protected]: Building with: CMake
warning: [email protected]: Symbol Prefix: Some("aws_lc_0_28_0")
warning: [email protected]: CMAKE environment variable set: cmake
warning: [email protected]: Compilation of 'c11.c' failed - Err(Error { kind: ToolExecError, message: "command did not execute successfully (status code exit code: 2): \"C:\\\\BuildTools\\\\VC\\\\Tools\\\\MSVC\\\\14.43.34808\\\\bin\\\\HostX64\\\\x64\\\\cl.exe\" \"-nologo\" \"-MD\" \"-O2\" \"-Z7\" \"-Brepro\" \"-WX\" \"-W4\" \"-FoC:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\aws-lc-sys-b18c77139095c247\\\\out\\\\out-c11\\\\e1bacabfea35bee3-c11.o\" \"-c\" \"C:\\\\Users\\\\Administrator\\\\runner\\\\builds\\\\amyspark\\\\cerbero\\\\cerbero-sources\\\\gst-plugins-rs\\\\cargo-vendor\\\\aws-lc-sys\\\\aws-lc\\\\tests\\\\compiler_features_tests\\\\c11.c\"" }).
error: failed to run custom build command for `aws-lc-sys v0.28.0`
Caused by:
  process didn't exit successfully: `C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\build\aws-lc-sys-9ba46f792b76eb48\build-script-main` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREGENERATING_BINDINGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_CFLAGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREBUILT_NASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_C_STD
  cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREGENERATED_SRC
  cargo:rustc-cfg=x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  default_for Target: 'x86_64-pc-windows-msvc'
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=Building with: CMake
  cargo:warning=Symbol Prefix: Some("aws_lc_0_28_0")
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=CMAKE environment variable set: cmake
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE
  OPT_LEVEL = Some(3)
  OUT_DIR = Some(C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\x86_64-pc-windows-msvc\release\build\aws-lc-sys-b18c77139095c247\out)
  TARGET = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=VCINSTALLDIR
  VCINSTALLDIR = Some(C:\BuildTools\VC\)
  cargo:rerun-if-env-changed=VSCMD_ARG_TGT_ARCH
  VSCMD_ARG_TGT_ARCH = Some(x64)
  PATH = Some(C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release;C:\Users\Administrator\runner\builds\amyspark\cerbero\cb\rust\rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib;C:\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64;C:\BuildTools\Common7\IDE\VC\VCPackages;C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\BuildTools\MSBuild\Current\bin\Roslyn;C:\BuildTools\Common7\IDE\Extensions\Microsoft\CodeCoverage.Console;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\BuildTools\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\BuildTools\Common7\IDE\;C:\BuildTools\Common7\Tools\;;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/dist/msvc_x86_64/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/cargo/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/build-tools/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/mingw/multilib/libexec/gcc/x86_64-w64-mingw32/14.2.0;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/mingw/multilib/bin;C:\msys64\ucrt64\bin;C:\msys64\ucrt64\bin\site_perl\5.38.2;C:\msys64\ucrt64\bin\vendor_perl;C:\msys64\ucrt64\bin\core_perl;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\Python311\Scripts;C:\Python311;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;C:\Program Files\Git LFS;C:\Program Files\WiX Toolset v5.0\bin;C:\Users\ContainerAdministrator\.cargo\bin;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps)
  HOST = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
  CC_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
  CC_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  DEBUG = Some(true)
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
  CFLAGS_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
  CFLAGS_x86_64-pc-windows-msvc = None
  CARGO_ENCODED_RUSTFLAGS = Some()
  OPT_LEVEL = Some(3)
  TARGET = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=VCINSTALLDIR
  VCINSTALLDIR = Some(C:\BuildTools\VC\)
  cargo:rerun-if-env-changed=VSCMD_ARG_TGT_ARCH
  VSCMD_ARG_TGT_ARCH = Some(x64)
  PATH = Some(C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release;C:\Users\Administrator\runner\builds\amyspark\cerbero\cb\rust\rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib;C:\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64;C:\BuildTools\Common7\IDE\VC\VCPackages;C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\BuildTools\MSBuild\Current\bin\Roslyn;C:\BuildTools\Common7\IDE\Extensions\Microsoft\CodeCoverage.Console;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\BuildTools\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\BuildTools\Common7\IDE\;C:\BuildTools\Common7\Tools\;;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/dist/msvc_x86_64/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/cargo/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/build-tools/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/mingw/multilib/libexec/gcc/x86_64-w64-mingw32/14.2.0;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/mingw/multilib/bin;C:\msys64\ucrt64\bin;C:\msys64\ucrt64\bin\site_perl\5.38.2;C:\msys64\ucrt64\bin\vendor_perl;C:\msys64\ucrt64\bin\core_perl;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\Python311\Scripts;C:\Python311;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;C:\Program Files\Git LFS;C:\Program Files\WiX Toolset v5.0\bin;C:\Users\ContainerAdministrator\.cargo\bin;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps)
  HOST = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
  CC_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
  CC_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  DEBUG = Some(true)
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
  CFLAGS_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
  CFLAGS_x86_64-pc-windows-msvc = None
  CARGO_ENCODED_RUSTFLAGS = Some()
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  c11.c
  C:\BuildTools\VC\Tools\MSVC\14.43.34808\include\vcruntime_c11_stdatomic.h(16): fatal error C1189: #error:  "C atomics require C11 or later"
  cargo:warning=Compilation of 'c11.c' failed - Err(Error { kind: ToolExecError, message: "command did not execute successfully (status code exit code: 2): \"C:\\\\BuildTools\\\\VC\\\\Tools\\\\MSVC\\\\14.43.34808\\\\bin\\\\HostX64\\\\x64\\\\cl.exe\" \"-nologo\" \"-MD\" \"-O2\" \"-Z7\" \"-Brepro\" \"-WX\" \"-W4\" \"-FoC:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\aws-lc-sys-b18c77139095c247\\\\out\\\\out-c11\\\\e1bacabfea35bee3-c11.o\" \"-c\" \"C:\\\\Users\\\\Administrator\\\\runner\\\\builds\\\\amyspark\\\\cerbero\\\\cerbero-sources\\\\gst-plugins-rs\\\\cargo-vendor\\\\aws-lc-sys\\\\aws-lc\\\\tests\\\\compiler_features_tests\\\\c11.c\"" }).
  cargo:rerun-if-env-changed=CC
  cargo:rerun-if-env-changed=CXX
  CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
  CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
  CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = Some("Ninja")
  CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
  CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-pc-windows-msvc = None
  CMAKE_x86_64_pc_windows_msvc = None
  HOST_CMAKE = None
  CMAKE = Some("cmake")
  running: "cmake" "C:\\Users\\Administrator\\runner\\builds\\amyspark\\cerbero\\cerbero-sources\\gst-plugins-rs\\cargo-vendor\\aws-lc-sys" "-G" "Ninja" "-DBUILD_SHARED_LIBS=0" "-DBORINGSSL_PREFIX=aws_lc_0_28_0_" "-DBORINGSSL_PREFIX_HEADERS=C:\\Users\\Administrator\\runner\\builds\\amyspark\\cerbero\\cerbero-sources\\gst-plugins-rs\\cargo-vendor\\aws-lc-sys\\generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DDISABLE_PERL=ON" "-DDISABLE_GO=ON" "-DCMAKE_C_STANDARD=99" "-DCMAKE_INSTALL_PREFIX=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\\x86_64-pc-windows-msvc\\release\\build\\aws-lc-sys-b18c77139095c247\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_COMPILER=C:/BuildTools/VC/Tools/MSVC/14.43.34808/bin/HostX64/x64/cl.exe" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_COMPILER=C:/BuildTools/VC/Tools/MSVC/14.43.34808/bin/HostX64/x64/cl.exe" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_COMPILER=C:/BuildTools/VC/Tools/MSVC/14.43.34808/bin/HostX64/x64/cl.exe" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "--no-warn-unused-cli"
  Not searching for unused variables given on the command line.
  -- The C compiler identification is MSVC 19.43.34808.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - failed
  -- Check for working C compiler: C:/BuildTools/VC/Tools/MSVC/14.43.34808/bin/HostX64/x64/cl.exe
  -- Check for working C compiler: C:/BuildTools/VC/Tools/MSVC/14.43.34808/bin/HostX64/x64/cl.exe - broken
  -- Configuring incomplete, errors occurred!
  --- stderr
  CMake Deprecation Warning at CMakeLists.txt:10 (cmake_policy):
    The OLD behavior for policy CMP0091 will be removed from a future version
    of CMake.
    The cmake-policies(7) manual explains that the OLD behaviors of all
    policies are deprecated and that a policy should be set to OLD only under
    specific short-term circumstances.  Projects should be ported to the NEW
    behavior and not rely on setting a policy to OLD.
  CMake Warning in C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b/x86_64-pc-windows-msvc/release/build/aws-lc-sys-b18c77139095c247/out/build/CMakeFiles/CMakeScratch/TryCompile-ybk60c/CMakeLists.txt:
    The object file directory
      C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b/x86_64-pc-windows-msvc/release/build/aws-lc-sys-b18c77139095c247/out/build/CMakeFiles/CMakeScratch/TryCompile-ybk60c/CMakeFiles/cmTC_a1a63.dir/./
    has 254 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file
      CMakeCCompilerABI.c.obj
    cannot be safely placed under this directory.  The build may not work
    correctly.
  CMake Warning in C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b/x86_64-pc-windows-msvc/release/build/aws-lc-sys-b18c77139095c247/out/build/CMakeFiles/CMakeScratch/TryCompile-ad00yp/CMakeLists.txt:
    The object file directory
      C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b/x86_64-pc-windows-msvc/release/build/aws-lc-sys-b18c77139095c247/out/build/CMakeFiles/CMakeScratch/TryCompile-ad00yp/CMakeFiles/cmTC_eabd9.dir/./
    has 254 characters.  The maximum full path to an object file is 250
    characters (see CMAKE_OBJECT_PATH_MAX).  Object file
      testCCompiler.c.obj
    cannot be safely placed under this directory.  The build may not work
    correctly.
  CMake Error at C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeTestCCompiler.cmake:67 (message):
    The C compiler
      "C:/BuildTools/VC/Tools/MSVC/14.43.34808/bin/HostX64/x64/cl.exe"
    is not able to compile a simple test program.
    It fails with the following output:
      Change Dir: 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b/x86_64-pc-windows-msvc/release/build/aws-lc-sys-b18c77139095c247/out/build/CMakeFiles/CMakeScratch/TryCompile-ad00yp'
      
      Run Build Command(s): C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/build-tools/bin/ninja.exe -v cmTC_eabd9
      [1/2] C:\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\cl.exe  /nologo   -nologo -MD -Brepro  /MDd /Ob0 /Od /RTC1 -Zi /showIncludes /FoCMakeFiles\cmTC_eabd9.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_eabd9.dir\ /FS -c C:\Users\Administrator\runner\builds\amyspark\cerbero\cb\sources\msvc_x86_64\gst-plugins-rs-0.14.0-alpha.1\b\x86_64-pc-windows-msvc\release\build\aws-lc-sys-b18c77139095c247\out\build\CMakeFiles\CMakeScratch\TryCompile-ad00yp\testCCompiler.c
      FAILED: CMakeFiles/cmTC_eabd9.dir/testCCompiler.c.obj 
      C:\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\cl.exe  /nologo   -nologo -MD -Brepro  /MDd /Ob0 /Od /RTC1 -Zi /showIncludes /FoCMakeFiles\cmTC_eabd9.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_eabd9.dir\ /FS -c C:\Users\Administrator\runner\builds\amyspark\cerbero\cb\sources\msvc_x86_64\gst-plugins-rs-0.14.0-alpha.1\b\x86_64-pc-windows-msvc\release\build\aws-lc-sys-b18c77139095c247\out\build\CMakeFiles\CMakeScratch\TryCompile-ad00yp\testCCompiler.c
      cl : Command line warning D9025 : overriding '/MD' with '/MDd'
      C:\Users\Administrator\runner\builds\amyspark\cerbero\cb\sources\msvc_x86_64\gst-plugins-rs-0.14.0-alpha.1\b\x86_64-pc-windows-msvc\release\build\aws-lc-sys-b18c77139095c247\out\build\CMakeFiles\CMakeScratch\TryCompile-ad00yp\testCCompiler.c: fatal error C1041: cannot open program database 'C:\Users\Administrator\runner\builds\amyspark\cerbero\cb\sources\msvc_x86_64\gst-plugins-rs-0.14.0-alpha.1\b\x86_64-pc-windows-msvc\release\build\aws-lc-sys-b18c77139095c247\out\build\CMakeFiles\CMakeScratch\TryCompile-ad00yp\CMakeFiles\cmTC_eabd9.dir\vc140.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS
      ninja: build stopped: subcommand failed.
      
      
    
    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:14 (enable_language)
  thread 'main' panicked at C:\Users\Administrator\runner\builds\amyspark\cerbero\cerbero-sources\gst-plugins-rs\cargo-vendor\cmake\src\lib.rs:1119:5:
  command did not execute successfully, got: exit code: 1
  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
     Running `C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name zerofrom --edition=2021 'C:\Users\Administrator\runner\builds\amyspark\cerbero\cerbero-sources\gst-plugins-rs\cargo-vendor\zerofrom\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto -C debuginfo=2 -C split-debuginfo=packed --cfg 'feature="alloc"' --cfg 'feature="derive"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("alloc", "default", "derive"))' -C metadata=e80d75dee39018f0 -C extra-filename=-957c7ff49abe7fc1 --out-dir 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\x86_64-pc-windows-msvc\release\deps' --target x86_64-pc-windows-msvc -L 'dependency=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\x86_64-pc-windows-msvc\release\deps' -L 'dependency=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps' --extern 'zerofrom_derive=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps\zerofrom_derive-bb1effcc141d4583.dll' --cap-lints allow`
     Running `C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name parking --edition=2018 'C:\Users\Administrator\runner\builds\amyspark\cerbero\cerbero-sources\gst-plugins-rs\cargo-vendor\parking\src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C linker-plugin-lto -C debuginfo=2 -C split-debuginfo=packed --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("loom"))' -C metadata=393e2d859dfb8467 -C extra-filename=-f27d8705525a8a73 --out-dir 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\x86_64-pc-windows-msvc\release\deps' --target x86_64-pc-windows-msvc -L 'dependency=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\x86_64-pc-windows-msvc\release\deps' -L 'dependency=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps' --cap-lints allow`
Error: CliError { error: Some(1 job failed), exit_code: 101 }
18:18:46 | 0:11:47.718000 ***** Error running 'package' command:
18:18:46 | 0:11:47.718000 Recipe 'gst-plugins-rs' failed at the build step 'compile'
Command Error: Running ['C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/cargo/bin/cargo.exe', 'cbuild', '--release', '--frozen', '--prefix', 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/dist/msvc_x86_64', '--libdir', 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/dist/msvc_x86_64/lib', '--library-type', 'staticlib', '--library-type', 'cdylib', '--verbose', '--offline', '--target', 'x86_64-pc-windows-msvc', '--target-dir', 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b', '-j31', '--features=glib/v2_74,gio/v2_74,gst-plugin-rav1e/asm,gst/v1_22,gst-app/v1_22,gst-audio/v1_22,gst-base/v1_22,gst-check/v1_22,gst-net/v1_22,gst-pbutils/v1_22,gst-plugin-tracers/v1_22,gst-rtp/v1_22,gst-sdp/v1_22,gst-utils/v1_22,gst-video/v1_22,gst-webrtc/v1_22,gst-plugin-webrtc/v1_22,gst-plugin-webrtc/aws,gst-plugin-webrtc/livekit', '-p', 'gst-plugin-audiofx', '-p', 'gst-plugin-aws', '-p', 'gst-plugin-cdg', '-p', 'gst-plugin-claxon', '-p', 'gst-plugin-closedcaption', '-p', 'gst-plugin-dav1d', '-p', 'gst-plugin-fallbackswitch', '-p', 'gst-plugin-ffv1', '-p', 'gst-plugin-fmp4', '-p', 'gst-plugin-gif', '-p', 'gst-plugin-gopbuffer', '-p', 'gst-plugin-hlsmultivariantsink', '-p', 'gst-plugin-hlssink3', '-p', 'gst-plugin-hsv', '-p', 'gst-plugin-inter', '-p', 'gst-plugin-json', '-p', 'gst-plugin-livesync', '-p', 'gst-plugin-lewton', '-p', 'gst-plugin-mpegtslive', '-p', 'gst-plugin-mp4', '-p', 'gst-plugin-ndi', '-p', 'gst-plugin-onvif', '-p', 'gst-plugin-originalbuffer', '-p', 'gst-plugin-quinn', '-p', 'gst-plugin-rav1e', '-p', 'gst-plugin-regex', '-p', 'gst-plugin-relationmeta', '-p', 'gst-plugin-reqwest', '-p', 'gst-plugin-raptorq', '-p', 'gst-plugin-png', '-p', 'gst-plugin-rtp', '-p', 'gst-plugin-rtsp', '-p', 'gst-plugin-streamgrouper', '-p', 'gst-plugin-textahead', '-p', 'gst-plugin-textwrap', '-p', 'gst-plugin-threadshare', '-p', 'gst-plugin-togglerecord', '-p', 'gst-plugin-tracers', '-p', 'gst-plugin-uriplaylistbin', '-p', 'gst-plugin-videofx', '-p', 'gst-plugin-webrtc', '-p', 'gst-plugin-webrtchttp'] returned 1
@amyspark
Copy link
Contributor Author

amyspark commented Apr 15, 2025

Regarding the broken CMake compiler detection, here's the associated build log: https://gitlab.freedesktop.org/amyspark/cerbero/-/jobs/74700636

Snippet
   Compiling aws-lc-sys v0.28.0
     Running `C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name build_script_main --edition=2021 'C:\Users\Administrator\runner\builds\amyspark\cerbero\cerbero-sources\gst-plugins-rs\cargo-vendor\aws-lc-sys\builder\main.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=packed -C debug-assertions=off --cfg 'feature="prebuilt-nasm"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("asan", "bindgen", "prebuilt-nasm", "ssl"))' -C metadata=06af6701196c01d8 -C extra-filename=-9ba46f792b76eb48 --out-dir 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\build\aws-lc-sys-9ba46f792b76eb48' -L 'dependency=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps' --extern 'cc=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps\libcc-b3fca8da8f6e02e5.rlib' --extern 'cmake=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps\libcmake-e92b7414c105af68.rlib' --extern 'dunce=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps\libdunce-2a7fdc6bbfb40ea3.rlib' --extern 'fs_extra=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps\libfs_extra-8fa9e5b8c1ce0b95.rlib' --cap-lints allow`
(...)
warning: [email protected]: Building with: CMake
warning: [email protected]: Symbol Prefix: Some("aws_lc_0_28_0")
warning: [email protected]: CMAKE environment variable set: cmake
warning: [email protected]: Compilation of 'c11.c' failed - Err(Error { kind: ToolExecError, message: "command did not execute successfully (status code exit code: 2): \"C:\\\\BuildTools\\\\VC\\\\Tools\\\\MSVC\\\\14.43.34808\\\\bin\\\\HostX64\\\\x64\\\\cl.exe\" \"-nologo\" \"-MD\" \"-O2\" \"-Z7\" \"-Brepro\" \"-WX\" \"-W4\" \"-FoC:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\aws-lc-sys-b18c77139095c247\\\\out\\\\out-c11\\\\e1bacabfea35bee3-c11.o\" \"-c\" \"C:\\\\Users\\\\Administrator\\\\runner\\\\builds\\\\amyspark\\\\cerbero\\\\cerbero-sources\\\\gst-plugins-rs\\\\cargo-vendor\\\\aws-lc-sys\\\\aws-lc\\\\tests\\\\compiler_features_tests\\\\c11.c\"" }).
error: failed to run custom build command for `aws-lc-sys v0.28.0`
Caused by:
  process didn't exit successfully: `C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\build\aws-lc-sys-9ba46f792b76eb48\build-script-main` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREGENERATING_BINDINGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_CFLAGS
  cargo:rerun-if-env-changed=AWS_LC_SYS_PREBUILT_NASM
  cargo:rerun-if-env-changed=AWS_LC_SYS_C_STD
  cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
  cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREGENERATED_SRC
  cargo:rustc-cfg=x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  default_for Target: 'x86_64-pc-windows-msvc'
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=Building with: CMake
  cargo:warning=Symbol Prefix: Some("aws_lc_0_28_0")
  cargo:rerun-if-env-changed=CMAKE
  cargo:warning=CMAKE environment variable set: cmake
  cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=CMAKE_TOOLCHAIN_FILE
  OPT_LEVEL = Some(3)
  OUT_DIR = Some(C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\x86_64-pc-windows-msvc\release\build\aws-lc-sys-b18c77139095c247\out)
  TARGET = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=VCINSTALLDIR
  VCINSTALLDIR = Some(C:\BuildTools\VC\)
  cargo:rerun-if-env-changed=VSCMD_ARG_TGT_ARCH
  VSCMD_ARG_TGT_ARCH = Some(x64)
  PATH = Some(C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release;C:\Users\Administrator\runner\builds\amyspark\cerbero\cb\rust\rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib;C:\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64;C:\BuildTools\Common7\IDE\VC\VCPackages;C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\BuildTools\MSBuild\Current\bin\Roslyn;C:\BuildTools\Common7\IDE\Extensions\Microsoft\CodeCoverage.Console;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\BuildTools\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\BuildTools\Common7\IDE\;C:\BuildTools\Common7\Tools\;;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/dist/msvc_x86_64/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/cargo/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/build-tools/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/mingw/multilib/libexec/gcc/x86_64-w64-mingw32/14.2.0;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/mingw/multilib/bin;C:\msys64\ucrt64\bin;C:\msys64\ucrt64\bin\site_perl\5.38.2;C:\msys64\ucrt64\bin\vendor_perl;C:\msys64\ucrt64\bin\core_perl;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\Python311\Scripts;C:\Python311;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;C:\Program Files\Git LFS;C:\Program Files\WiX Toolset v5.0\bin;C:\Users\ContainerAdministrator\.cargo\bin;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps)
  HOST = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
  CC_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
  CC_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  DEBUG = Some(true)
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
  CFLAGS_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
  CFLAGS_x86_64-pc-windows-msvc = None
  CARGO_ENCODED_RUSTFLAGS = Some()
  OPT_LEVEL = Some(3)
  TARGET = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=VCINSTALLDIR
  VCINSTALLDIR = Some(C:\BuildTools\VC\)
  cargo:rerun-if-env-changed=VSCMD_ARG_TGT_ARCH
  VSCMD_ARG_TGT_ARCH = Some(x64)
  PATH = Some(C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release\deps;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\release;C:\Users\Administrator\runner\builds\amyspark\cerbero\cb\rust\rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib;C:\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64;C:\BuildTools\Common7\IDE\VC\VCPackages;C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\BuildTools\MSBuild\Current\bin\Roslyn;C:\BuildTools\Common7\IDE\Extensions\Microsoft\CodeCoverage.Console;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\BuildTools\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\BuildTools\Common7\IDE\;C:\BuildTools\Common7\Tools\;;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/dist/msvc_x86_64/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/cargo/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/build-tools/bin;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/mingw/multilib/libexec/gcc/x86_64-w64-mingw32/14.2.0;C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/mingw/multilib/bin;C:\msys64\ucrt64\bin;C:\msys64\ucrt64\bin\site_perl\5.38.2;C:\msys64\ucrt64\bin\vendor_perl;C:\msys64\ucrt64\bin\core_perl;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\Python311\Scripts;C:\Python311;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;C:\Program Files\Git LFS;C:\Program Files\WiX Toolset v5.0\bin;C:\Users\ContainerAdministrator\.cargo\bin;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps)
  HOST = Some(x86_64-pc-windows-msvc)
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
  CC_x86_64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
  CC_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  DEBUG = Some(true)
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
  CFLAGS_x86_64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
  CFLAGS_x86_64-pc-windows-msvc = None
  CARGO_ENCODED_RUSTFLAGS = Some()
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  c11.c
  C:\BuildTools\VC\Tools\MSVC\14.43.34808\include\vcruntime_c11_stdatomic.h(16): fatal error C1189: #error:  "C atomics require C11 or later"
  cargo:warning=Compilation of 'c11.c' failed - Err(Error { kind: ToolExecError, message: "command did not execute successfully (status code exit code: 2): \"C:\\\\BuildTools\\\\VC\\\\Tools\\\\MSVC\\\\14.43.34808\\\\bin\\\\HostX64\\\\x64\\\\cl.exe\" \"-nologo\" \"-MD\" \"-O2\" \"-Z7\" \"-Brepro\" \"-WX\" \"-W4\" \"-FoC:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\\\\x86_64-pc-windows-msvc\\\\release\\\\build\\\\aws-lc-sys-b18c77139095c247\\\\out\\\\out-c11\\\\e1bacabfea35bee3-c11.o\" \"-c\" \"C:\\\\Users\\\\Administrator\\\\runner\\\\builds\\\\amyspark\\\\cerbero\\\\cerbero-sources\\\\gst-plugins-rs\\\\cargo-vendor\\\\aws-lc-sys\\\\aws-lc\\\\tests\\\\compiler_features_tests\\\\c11.c\"" }).
  cargo:rerun-if-env-changed=CC
  cargo:rerun-if-env-changed=CXX
  CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
  CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
  CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
  CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-pc-windows-msvc = None
  CMAKE_x86_64_pc_windows_msvc = None
  HOST_CMAKE = None
  CMAKE = Some("cmake")
  running: "cmake" "C:\\Users\\Administrator\\runner\\builds\\amyspark\\cerbero\\cerbero-sources\\gst-plugins-rs\\cargo-vendor\\aws-lc-sys" "-G" "Visual Studio 17 2022" "-Thost=x64" "-Ax64" "-DBUILD_SHARED_LIBS=0" "-DBORINGSSL_PREFIX=aws_lc_0_28_0_" "-DBORINGSSL_PREFIX_HEADERS=C:\\Users\\Administrator\\runner\\builds\\amyspark\\cerbero\\cerbero-sources\\gst-plugins-rs\\cargo-vendor\\aws-lc-sys\\generated-include" "-DBUILD_TESTING=OFF" "-DBUILD_LIBSSL=OFF" "-DDISABLE_PERL=ON" "-DDISABLE_GO=ON" "-DCMAKE_C_STANDARD=99" "-DCMAKE_INSTALL_PREFIX=C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b\\x86_64-pc-windows-msvc\\release\\build\\aws-lc-sys-b18c77139095c247\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_RELWITHDEBINFO= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_RELWITHDEBINFO= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "--no-warn-unused-cli"
  Not searching for unused variables given on the command line.
  -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.20348.
  -- The C compiler identification is unknown
  -- Configuring incomplete, errors occurred!
  --- stderr
  CMake Deprecation Warning at CMakeLists.txt:10 (cmake_policy):
    The OLD behavior for policy CMP0091 will be removed from a future version
    of CMake.
    The cmake-policies(7) manual explains that the OLD behaviors of all
    policies are deprecated and that a policy should be set to OLD only under
    specific short-term circumstances.  Projects should be ported to the NEW
    behavior and not rely on setting a policy to OLD.
  CMake Error at CMakeLists.txt:14 (enable_language):
    No CMAKE_C_COMPILER could be found.
  thread 'main' panicked at C:\Users\Administrator\runner\builds\amyspark\cerbero\cerbero-sources\gst-plugins-rs\cargo-vendor\cmake\src\lib.rs:1119:5:
  command did not execute successfully, got: exit code: 1
  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error: CliError { error: Some(1 job failed), exit_code: 101 }
17:26:59 | 0:06:53.733999 ***** Error running 'package' command:
17:26:59 | 0:06:53.733999 Recipe 'gst-plugins-rs' failed at the build step 'compile'
Command Error: Running ['C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/rust/cargo/bin/cargo.exe', 'cbuild', '--release', '--frozen', '--prefix', 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/dist/msvc_x86_64', '--libdir', 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/dist/msvc_x86_64/lib', '--library-type', 'staticlib', '--library-type', 'cdylib', '--verbose', '--offline', '--target', 'x86_64-pc-windows-msvc', '--target-dir', 'C:/Users/Administrator/runner/builds/amyspark/cerbero/cb/sources/msvc_x86_64/gst-plugins-rs-0.14.0-alpha.1/b', '-j31', '--features=glib/v2_74,gio/v2_74,gst-plugin-rav1e/asm,gst/v1_22,gst-app/v1_22,gst-audio/v1_22,gst-base/v1_22,gst-check/v1_22,gst-net/v1_22,gst-pbutils/v1_22,gst-plugin-tracers/v1_22,gst-rtp/v1_22,gst-sdp/v1_22,gst-utils/v1_22,gst-video/v1_22,gst-webrtc/v1_22,gst-plugin-webrtc/v1_22,gst-plugin-webrtc/aws,gst-plugin-webrtc/livekit', '-p', 'gst-plugin-audiofx', '-p', 'gst-plugin-aws', '-p', 'gst-plugin-cdg', '-p', 'gst-plugin-claxon', '-p', 'gst-plugin-closedcaption', '-p', 'gst-plugin-dav1d', '-p', 'gst-plugin-fallbackswitch', '-p', 'gst-plugin-ffv1', '-p', 'gst-plugin-fmp4', '-p', 'gst-plugin-gif', '-p', 'gst-plugin-gopbuffer', '-p', 'gst-plugin-hlsmultivariantsink', '-p', 'gst-plugin-hlssink3', '-p', 'gst-plugin-hsv', '-p', 'gst-plugin-inter', '-p', 'gst-plugin-json', '-p', 'gst-plugin-livesync', '-p', 'gst-plugin-lewton', '-p', 'gst-plugin-mpegtslive', '-p', 'gst-plugin-mp4', '-p', 'gst-plugin-ndi', '-p', 'gst-plugin-onvif', '-p', 'gst-plugin-originalbuffer', '-p', 'gst-plugin-quinn', '-p', 'gst-plugin-rav1e', '-p', 'gst-plugin-regex', '-p', 'gst-plugin-relationmeta', '-p', 'gst-plugin-reqwest', '-p', 'gst-plugin-raptorq', '-p', 'gst-plugin-png', '-p', 'gst-plugin-rtp', '-p', 'gst-plugin-rtsp', '-p', 'gst-plugin-streamgrouper', '-p', 'gst-plugin-textahead', '-p', 'gst-plugin-textwrap', '-p', 'gst-plugin-threadshare', '-p', 'gst-plugin-togglerecord', '-p', 'gst-plugin-tracers', '-p', 'gst-plugin-uriplaylistbin', '-p', 'gst-plugin-videofx', '-p', 'gst-plugin-webrtc', '-p', 'gst-plugin-webrtchttp'] returned 1

@justsmth
Copy link
Contributor

In particular, leaving cmake-rs to its own devices results in CMake setting Visual Studio 17 2022 as generator, and with our Build Tools installed in a non-standard location, results in a build failure.

Our build should succeed with whichever generator is automatically selected by cmake-rs (typically, it's "Ninja" or "Visual Studio 17 2022"). But if our build logic were to show a preference for "Ninja", wouldn't Ninja likewise be unable to locate your MSVC compiler given that your Build Tools are installed in a non-standard location? Or does the build environment provide context that allows for Ninja to find the compiler while cmake-rs does not?

This potentially could be an issue we could file with cmake-rs were it failing to locate require build tooling in an environment where it should be able to.

Neither CMake nor MSVC are LongPathAware; since our CI infrastructure builds inside an user-level folder, we are suddenly exceeding PATH_MAX

I'm not sure this is fixable given that the crypto operations in AWS-LC are written in C/Assembly. I'm assuming that compiling C-code to an *-windows-msvc target requires an MSVC compiler. (Is clang-cl also unable to handle longer paths?) Alternatively, you might try to build our library targeting *-windows-gnu?

@amyspark
Copy link
Contributor Author

Hi @justsmth !

Or does the build environment provide context that allows for Ninja to find the compiler while cmake-rs does not?

The build context is enough, we're already running under a developer shell. For some reason CMake (not cmake-rs) breaks down when trying to initialize the shell again, which happens when forcing the VS2022 generator as is currently done.

But if our build logic were to show a preference for "Ninja", wouldn't Ninja likewise be unable to locate your MSVC compiler given that your Build Tools are installed in a non-standard location?

Preferring Ninja would aid in debugging build failures, as the compiler line gets printed upon failure. It is easy to detect the developer shell and do so too, as in the linked CMake code.

Alternatively, you might try to build our library targeting *-windows-gnu?

We build both for MSVC and for MinGW. The MinGW build is prone to failure for multiple reasons: apart from the PATH_MAX issue, the use of Makefiles means also a hard require for a MSYS2 environment or similar. The workaround here was to force Ninja (as we have it available for all OSes, and we run with appropriate PATH entries set for each compiler) and compress the path to make extra space.

I'm not sure this is fixable given that the crypto operations in AWS-LC are written in C/Assembly.

The workaround was meant only to support CMake's setup process, while also cargo vendoring the source code in a build from the user folder.

C/Assembly works just fine, we have been able to continue targeting all platforms even with the recent changes, and NASM compilation has not introduced any issues either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants