mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #278] [Windows/MSVC] Build fails with C3861: '__cpuidex' identifier not found — missing intrin.h #104
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#104
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @suprekt on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/278
The latest Project Maya engine failed to compile on Windows 11 using Visual Studio 2022 Build Tools.
The build stopped while compiling src/kernels/cpu/iq_avx512_one.cpp because MSVC could not find the declaration of __cpuidex.
I was able to resolve the issue by adding the missing <intrin.h> header. After this change, the engine compiled successfully.
System Information
OS: Windows 11 Pro
CPU: Intel Core i7-13700K
GPU: NVIDIA GeForce RTX 4080 16 GB
RAM: 192 GB DDR5
CUDA Toolkit: 13.0
Compiler: Visual Studio 2022 Build Tools (MSVC 14.44.35207)
Build configuration: Release, CUDA enabled
Error Log
[1/5] Building CXX object CMakeFiles\strata_kernels_cpu.dir\src\kernels\cpu\iq_avx512_one.cpp.obj
C:\Maya-GLM\src\kernels\cpu\iq_avx512_one.cpp(99):
error C3861: '__cpuidex': identifier not found
C:\Maya-GLM\src\kernels\cpu\iq_avx512_one.cpp(101):
error C3861: '__cpuidex': identifier not found
ninja: build stopped: subcommand failed.
Retrying the build produced the same errors.
Solution
In src/kernels/cpu/iq_avx512_one.cpp, add:
#ifdef _MSC_VER
#include <intrin.h>
#endif
This ensures that the __cpuidex intrinsic is properly declared when compiling with Microsoft Visual C++.
Result
After adding the header:
The previous C3861 errors disappeared.
The engine compiled successfully.
No changes to CUDA, Visual Studio, BIOS, or other build settings were required.
I had also successfully built an earlier version of Project Maya on the same machine, suggesting this may be a regression introduced by a recent source code change.
Suggested Fix
Consider adding the conditional <intrin.h> include upstream to ensure compatibility with MSVC on Windows.
Thanks for the work on Project Maya!
@mw00 commented on GitHub (Oct 20, 2026):
Fixed in v1.1.18 (
<intrin.h>for MSVC in iq_avx512_one.cpp). Thanks for the report and the fix!