nvdaHelper build: ARM64 and ARM64EC environments collide when building third-party deps under a native ARM64 Python interpreter
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cmake, python
- Domain
- build-system
Research direction
Start in nvdaHelper/archBuild_sconscript and trace how isNVDACoreArch is evaluated for the ARM64 and ARM64EC environments created in sconstruct. The issue identifies the proposed condition and the conflicting third-party dependency outputs; reproduce the native ARM64 Python build if available and confirm the environments no longer target the same outputs. The reporter says they have a working fix, so coordinate before starting.
Written by the indexing model from the issue text.
Description
Title
nvdaHelper build: ARM64 and ARM64EC environments collide when building third-party deps under a native ARM64 Python interpreter
Related issues, PRs or discussions
Related to #18570 (ARM64EC libraries for X64 support on ARM64), #16580 (architecture enumerations), #13914 (enable Windows ARM64 support). None of these cover running NVDA's own process as native ARM64 Python, which is where this bug surfaces.
What is the current state of the codebase?
nvdaHelper/archBuild_sconscript computes isNVDACoreArch as:
isNVDACoreArch = (
(PYTHON_PLATFORM == "win32" and TARGET_ARCH == "x86")
or (PYTHON_PLATFORM == "win-amd64" and TARGET_ARCH == "x86_64")
or (PYTHON_PLATFORM == "win-arm64" and TARGET_ARCH == "arm64")
)
envArm64EC (built in sconstruct) is envArm64.Clone() with isArm64EC = True — it keeps TARGET_ARCH == "arm64". The third condition above does not check isArm64EC, so when PYTHON_PLATFORM is actually "win-arm64" (i.e. SCons itself is running under a native ARM64 CPython interpreter, not x86/x64 emulated), both envArm64 and envArm64EC evaluate isNVDACoreArch as True simultaneously.
Third-party dependencies (espeak, liblouis, sonic, javaAccessBridge, uwp) are only built if isNVDACoreArch (same file, further down), and several of these (e.g. eSpeak NG via nvdaHelper/espeak/sconscript) use an absolute srcdir= outside any SCons variant_dir. With both arm64 and arm64ec environments believing they are the "core" arch, both try to build these third-party deps into the same output paths, with different compiler flags (/arm64EC vs none). SCons fails the build with:
scons: *** Two environments with different actions were specified for the same target:
<repo>\include\espeak\src\ucd-tools\src\case.obj
(action 1: cl ... (no /arm64EC flag))
(action 2: cl ... /arm64EC ...)
Why are changes required?
Today, nothing ever actually runs SCons under a native win-arm64 Python interpreter — NVDA's shipped builds run as x86/x64 Python, emulated on ARM64 Windows, so this branch of isNVDACoreArch is effectively dead code and the bug has never been exercised. It becomes reachable as soon as someone builds from source using the official python.org ARM64 CPython installer (available since 3.11) with a uv/pyproject.toml setup that resolves ARM64 wheels for NVDA's dependencies — which otherwise works today once this and two related build-script issues are fixed (see linked issues).
What technical changes are required?
Exclude the ARM64EC case from the arm64 branch of isNVDACoreArch:
isNVDACoreArch = (
(PYTHON_PLATFORM == "win32" and TARGET_ARCH == "x86")
or (PYTHON_PLATFORM == "win-amd64" and TARGET_ARCH == "x86_64")
or (PYTHON_PLATFORM == "win-arm64" and TARGET_ARCH == "arm64" and not isArm64EC)
)
This mirrors the existing isArm64EC flag already used elsewhere in the same file (e.g. for isNVDAHelperLocalArch and MIDL/CCFLAGS branches).
Are the proposed technical changes API breaking?
No.
Are there potential risks or issues with the proposed implementation?
Low risk — this only changes behavior for the previously-unreachable PYTHON_PLATFORM == "win-arm64" branch. x86/x64 builds (the only configurations NVDA currently ships) are unaffected, since neither of their isNVDACoreArch conditions involve isArm64EC.
I have a working fix and can open a PR once this issue is triaged, as part of getting a native ARM64 Python build of NVDA building from source end to end.
Investigated and drafted with AI assistance (Claude); I reviewed the technical content and built/tested the fix myself before filing this.
- Dominant language
- Python
- Stars
- 2.7k
- Forks
- 842
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 56
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvaccess/nvda
-
needs-technical-investigation p5 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
nvaccess/nvda#21085 · 7 comments ·
Maintainers usually reply within 1 day
-
Braille Viewer draws two braille patterns wrongly (U+28CC, U+2873) because of glyph errors in FreeMono-FixedBraille.ttfMay be free again A pull request for this issue was closed without being merged. Openaudience/a11y-tester good first issue p4 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
nvaccess/nvda#21022 · 3 comments ·
Maintainers usually reply within 1 day
-
api-breaking-change audience/nvda-dev p5 release/blocking release/blocking-beta triaged
Difficulty 2/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
p5 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
p3 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nvaccess/nvda#20823 · 6 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 89/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
smk762/argus-atlas#97 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
xdslproject/xdsl#6842 ·
Maintainers usually reply within 1 day
-
Device override creates the generic entity instead of the vendor-specific one (Light instead of HueLight, ForceOnLight, MinTransitionLight)Possibly taken @zigpy-review-bot claimed this today. Openbot: code audit
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day