microsoft / microsoft/Windows-rust-driver-samples

Issue with fresh "cargo make"

Open
#12 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
356
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Hi!

I've tried to compile the example code on Windows 11 ARM, but it fails with the following error message:

As user:

**********************************************************************
** Enterprise Windows Driver Kit (WDK) build environment
** Version ni_release_svc_prod1.22621.2428
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.1.5
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
C:\Users\x\repos\Windows-rust-driver-samples>cargo make
[cargo-make] INFO - cargo make 0.37.10
[cargo-make] INFO - Execute Command: "rust-script" "target\\_cargo_make_temp\\persisted_scripts\\D4060E7434B3779E78A683E8BA00D06A5D08BE8C95BC432359E22F06CB30EF1C.rs"
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: default
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Running Task: workspace
C:\Users\x\repos\Windows-rust-driver-samples
[cargo-make][1] INFO - Execute Command: "rust-script" "C:\\Users\\x\\repos\\Windows-rust-driver-samples\\target\\_cargo_make_temp\\persisted_scripts\\D4060E7434B3779E78A683E8BA00D06A5D08BE8C95BC432359E22F06CB30EF1C.rs"
[cargo-make][1] INFO - Calling cargo metadata to extract project info
[cargo-make][1] INFO - Cargo metadata done
[cargo-make][1] INFO - Project: echoapp
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: default
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration
[cargo-make][1] INFO - Running Task: build
[cargo-make][1] INFO - Execute Command: "cargo" "build"
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
echoapp does not contain a package.metadata.wdk section in its manifest. Skipping package-driver task.
[cargo-make][1] INFO - Skipping Task: package-driver-flow
[cargo-make][1] INFO - Running Task: default
[cargo-make][1] INFO - Build Done in 1.14 seconds.
[cargo-make][1] INFO - Execute Command: "rust-script" "C:\\Users\\x\\repos\\Windows-rust-driver-samples\\target\\_cargo_make_temp\\persisted_scripts\\D4060E7434B3779E78A683E8BA00D06A5D08BE8C95BC432359E22F06CB30EF1C.rs"
[cargo-make][1] INFO - Calling cargo metadata to extract project info
[cargo-make][1] INFO - Cargo metadata done
[cargo-make][1] INFO - Project: echo-2
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: default
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration
[cargo-make][1] INFO - Running Task: build
[cargo-make][1] INFO - Execute Command: "cargo" "build"
   Compiling wdk-sys v0.2.0
memory allocation of 26306674688 bytes failed132: wdk-sys(build)
[cargo-make][1] ERROR - Error while executing command, exit code: -1073740791
[cargo-make][1] WARN - Build Failed.
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 8 - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.

I guessed that A required privilege is not held by the client. may mean that administrator rights are needed, to I re-ran it in an admin prompt.

As admin user:

**********************************************************************
** Enterprise Windows Driver Kit (WDK) build environment
** Version ni_release_svc_prod1.22621.2428
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.1.5
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

C:\Users\x\repos\Windows-rust-driver-samples>cargo make
[cargo-make] INFO - cargo make 0.37.10
[cargo-make] INFO - Execute Command: "rust-script" "target\\_cargo_make_temp\\persisted_scripts\\D4060E7434B3779E78A683E8BA00D06A5D08BE8C95BC432359E22F06CB30EF1C.rs"
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: default
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Running Task: workspace
C:\Users\x\repos\Windows-rust-driver-samples
[cargo-make][1] INFO - Execute Command: "rust-script" "C:\\Users\\x\\repos\\Windows-rust-driver-samples\\target\\_cargo_make_temp\\persisted_scripts\\D4060E7434B3779E78A683E8BA00D06A5D08BE8C95BC432359E22F06CB30EF1C.rs"
[cargo-make][1] INFO - Calling cargo metadata to extract project info
[cargo-make][1] INFO - Cargo metadata done
[cargo-make][1] INFO - Project: echoapp
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: default
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration
[cargo-make][1] INFO - Running Task: build
[cargo-make][1] INFO - Execute Command: "cargo" "build"
   Compiling proc-macro2 v1.0.78
   Compiling unicode-ident v1.0.12
   Compiling windows_aarch64_msvc v0.52.0
   Compiling once_cell v1.19.0
   Compiling windows-targets v0.52.0
   Compiling windows-sys v0.52.0
   Compiling quote v1.0.35
   Compiling syn v2.0.48
   Compiling uuid-macro-internal v1.7.0
   Compiling uuid v1.7.0
   Compiling echoapp v0.1.0 (C:\Users\x\repos\Windows-rust-driver-samples\general\echo\kmdf\exe)
    Finished dev [unoptimized + debuginfo] target(s) in 5.53s
echoapp does not contain a package.metadata.wdk section in its manifest. Skipping package-driver task.
[cargo-make][1] INFO - Skipping Task: package-driver-flow
[cargo-make][1] INFO - Running Task: default
[cargo-make][1] INFO - Build Done in 6.56 seconds.
[cargo-make][1] INFO - Execute Command: "rust-script" "C:\\Users\\x\\repos\\Windows-rust-driver-samples\\target\\_cargo_make_temp\\persisted_scripts\\D4060E7434B3779E78A683E8BA00D06A5D08BE8C95BC432359E22F06CB30EF1C.rs"
[cargo-make][1] INFO - Calling cargo metadata to extract project info
[cargo-make][1] INFO - Cargo metadata done
[cargo-make][1] INFO - Project: echo-2
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: default
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Skipping Task: legacy-migration
[cargo-make][1] INFO - Running Task: build
[cargo-make][1] INFO - Execute Command: "cargo" "build"
   Compiling proc-macro2 v1.0.78
   Compiling windows_aarch64_msvc v0.48.5
   Compiling windows_aarch64_msvc v0.52.0
   Compiling once_cell v1.19.0
   Compiling windows-targets v0.52.0
   Compiling windows-sys v0.52.0
   Compiling serde v1.0.196
   Compiling anstyle v1.0.6
...
   Compiling wdk-panic v0.2.0
   Compiling wdk v0.2.0
   Compiling echo-2 v0.1.0 (C:\Users\x\repos\Windows-rust-driver-samples\general\echo\kmdf\driver\DriverSync)
   Compiling wdk-sys v0.2.0
memory allocation of 26306674688 bytes failed132: wdk-sys(build)
[cargo-make][1] ERROR - Error while executing command, exit code: -1073740791
[cargo-make][1] WARN - Build Failed.
[cargo-make] ERROR - Error while running duckscript: Source: Unknown Line: 8 - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.

Any ideas what went wrong?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Makefile.toml and the echo-2 project under general/echo/kmdf/driver/DriverSync, then inspect the wdk-sys build step that fails during cargo make on Windows 11 ARM. Reproduce the build in the reported environment and compare the failing non-administrator and successful partial logs. Done means the cause is identified and the example builds successfully or the required environment limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.