Skip to content
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

Windows ARM64 not support #88

Open
biduan opened this issue Dec 17, 2024 · 1 comment
Open

Windows ARM64 not support #88

biduan opened this issue Dec 17, 2024 · 1 comment
Assignees

Comments

@biduan
Copy link

biduan commented Dec 17, 2024

While running npm install segfault-handler on a Windows ARM64 computer, encountered the following error:

npm error C:\github\temp\sherpa-onnx\nodejs-examples\node_modules\segfault-handler\src\StackWalker.cpp(971,1): error C1189: #error: "Platform not supported!" [C:\github\temp\sherpa-onnx\nodejs-examples\node_modules\segfault-handler\build\segfault-handler.vcxproj]

The reason for this error is that StackWalker.cpp does not support Windows ARM64. A workaround is to modify the code by adding the following lines:

#elif _M_ARM64
imageType = IMAGE_FILE_MACHINE_ARM64;
s.AddrPC.Offset = c.Pc;
s.AddrPC.Mode = AddrModeFlat;
s.AddrFrame.Offset = c.Fp;
s.AddrFrame.Mode = AddrModeFlat;
s.AddrStack.Offset = c.Sp;
s.AddrStack.Mode = AddrModeFlat;
#else
#error "Platform not supported!"
#endif

This modification adds support for Windows ARM64 by defining the necessary values for the imageType, AddrPC, AddrFrame, and AddrStack fields.

@kneth
Copy link
Collaborator

kneth commented Dec 21, 2024

Thank you for request and suggestion on how to fix it. I see that it has been fixed in StackWalker (JochenKalmbach/StackWalker#54), and I will try to upgrade to a more recent version.

@kneth kneth self-assigned this Dec 21, 2024
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