Skip to content

Clarify that build needs to run from VS Developer shell for Windows builds#1056

Closed
lqdee wants to merge 2 commits intoaws:mainfrom
lqdee:patch-1
Closed

Clarify that build needs to run from VS Developer shell for Windows builds#1056
lqdee wants to merge 2 commits intoaws:mainfrom
lqdee:patch-1

Conversation

@lqdee
Copy link
Copy Markdown

@lqdee lqdee commented Mar 5, 2026

This is a minor addition to documentation for Windows builds.

I suspect that many people will only encounter aws-lc-rs as a dependency of a dependency of a dependency, say, they just wanted to use reqwest, and now their build fails. They will hopefully find this guide and install requirements, but their build will still fail since normally cargo can build from a regular shell, and this is what they've been doing.

I've added a note to the Troubleshooting section, but maybe this needs to be displayed more prominently.

Issues:

Does not address any open issues.

Description of changes:

No code changes. I hope this will save some time for those who are not direct users of the crate.

Call-outs:

No architecture or design changes.

Testing:

Verified that a build that fails when run from a regular shell is successful when run from VS Developer shell on Windows/aarch64 (the failure is during compilation of aws-lc-sys).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

I suspect that many people will only encounter aws-lc-rs as a dependency of a dependency of a dependency, say, they just wanted to use reqwest, and now their build fails. They will hopefully find this guide and install requirements, but their build will still fail since normally cargo can build from a regular shell.

I've added a note to the Troubleshooting section, but maybe this needs to be displayed more prominently.
@lqdee lqdee requested a review from a team as a code owner March 5, 2026 23:21
@justsmth
Copy link
Copy Markdown
Contributor

justsmth commented Mar 6, 2026

Thanks for the PR!

Verified that a build that fails when run from a regular shell ...

I think we should address this build failure directly, as few consumers will bother to look for our documentation.

In my experience, I've been able to get the build to succeed from a regular shell on Windows. I'm wondering if you can tell me more about what happens when it fails like this? What did the build error messaging indicate as the problem?

@lqdee
Copy link
Copy Markdown
Author

lqdee commented Mar 6, 2026

Yes, fixing it in the build would be best!

I did not find the build output very helpful, so I've attached most if it as a file. I've noticed that it misses a bunch of probably useful environment variables, but I may be completely misguided, so please take a look yourself.
build-session.txt

In case it helps, here's the list of variables I see in the regular Windows PowerShell shell of Terminal:

ALLUSERSPROFILE
APPDATA
CommonProgramFiles
CommonProgramFiles(Arm)
CommonProgramFiles(x86)
CommonProgramW6432
COMPUTERNAME
ComSpec
DriverData
HOMEDRIVE
HOMEPATH
LOCALAPPDATA
LOGONSERVER
NUMBER_OF_PROCESSORS
OneDrive
OneDriveConsumer
OS
Path
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
ProgramData
ProgramFiles
ProgramFiles(Arm)
ProgramFiles(x86)
ProgramW6432
PSModulePath
PUBLIC
SESSIONNAME
SystemDrive
SystemRoot
TEMP
TMP
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
windir
WSLENV
WT_PROFILE_ID
WT_SESSION

And for comparison, here's the list of variables I see in Developer PowerShell for VS 18 (note all LIB*, llvm*, and VC*/VS* variables appearing here, and Path may be different too):

__DOTNET_ADD_64BIT
__DOTNET_PREFERRED_BITNESS
__VSCMD_PREINIT_PATH
ALLUSERSPROFILE
APPDATA
CommandPromptType
CommonProgramFiles
CommonProgramFiles(Arm)
CommonProgramFiles(x86)
CommonProgramW6432
COMPUTERNAME
ComSpec
DevEnvDir
DriverData
ExtensionSdkDir
EXTERNAL_INCLUDE
Framework40Version
FrameworkDir
FrameworkDir64
FrameworkVersion
FrameworkVersion64
HOMEDRIVE
HOMEPATH
INCLUDE
is_x64_arch
LIB
LIBPATH
llvmArm64
llvmX64
llvmX86
LOCALAPPDATA
LOGONSERVER
NETFXSDKDir
NUMBER_OF_PROCESSORS
OneDrive
OneDriveConsumer
OS
Path
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
ProgramData
ProgramFiles
ProgramFiles(Arm)
ProgramFiles(x86)
ProgramW6432
PROMPT
PSModulePath
PUBLIC
SESSIONNAME
SystemDrive
SystemRoot
TEMP
TMP
UCRTVersion
UniversalCRTSdkDir
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
VCIDEInstallDir
VCINSTALLDIR
VCPKG_ROOT
VCToolsInstallDir
VCToolsRedistDir
VCToolsVersion
VisualStudioVersion
VS180COMNTOOLS
VSCMD_ARG_app_plat
VSCMD_ARG_HOST_ARCH
VSCMD_ARG_TGT_ARCH
VSCMD_VER
VSINSTALLDIR
windir
WindowsLibPath
WindowsSDK_ExecutablePath_x64
WindowsSDK_ExecutablePath_x86
WindowsSdkBinPath
WindowsSdkDir
WindowsSDKLibVersion
WindowsSdkVerBinPath
WindowsSDKVersion
WSLENV
WT_PROFILE_ID
WT_SESSION

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.67%. Comparing base (c358484) to head (f2d5cb0).
⚠️ Report is 346 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1056      +/-   ##
==========================================
- Coverage   95.80%   92.67%   -3.13%     
==========================================
  Files          61       71      +10     
  Lines        8143    10143    +2000     
  Branches        0    10143   +10143     
==========================================
+ Hits         7801     9400    +1599     
- Misses        342      450     +108     
- Partials        0      293     +293     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@justsmth
Copy link
Copy Markdown
Contributor

justsmth commented Apr 15, 2026

Hello! We just released aws-lc-rs v1.16.3 and aws-lc-sys v0.40.0, which we believe improves the build script's ability to locate the clang-cl compiler. See #1060 for details.

This PR will now be closed. Feel free to comment here or open an issue if you continue to have problems after upgrading. Thanks for your help with improving our library! 😄

@justsmth justsmth closed this Apr 15, 2026
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

Successfully merging this pull request may close these issues.

3 participants