Building on ARM64 Windows is broken

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Building on ARM64 Windows is broken

Postby FSA » Thu Apr 03, 2025 9:18 pm

I tried building Newton 4 on Windows ARM64. I generated the VisualStudio projects with CMake. However when I try to compile the project solution (release), I get a huge amount of errors. I screenshotted a few.

Edit: I turned off building avx/avx2. The errors are still generated.

Screenshots:
https://ibb.co/nqCQhBPH
https://ibb.co/QhxtKKY
https://ibb.co/Lh8wW87n

Could you please take a look into it? Thanks :)
Attachments
Screenshot 2025-04-04 at 03.15.56.png
Screenshot 2025-04-04 at 03.15.56.png (146.03 KiB) Viewed 376083 times
User avatar
FSA
 
Posts: 322
Joined: Wed Dec 21, 2011 9:47 am

Re: Building on ARM64 Windows is broken

Postby Julio Jerez » Fri Apr 04, 2025 9:17 am

I don't have an ARM Windows system, but maybe this can helps.

By default, CMake selects the x86 SIMD vector classes.
Try setting NEWTON_SCALAR_VECTOR_CLASS to ON in CMake and see if that works.

There are ARM SIMD classes in the engine, but the current defines are set for macOS.
I'm not sure which defines are needed to build for ARM on Windows.

However, that's not really important—just try using scalar.
In fact, modern compilers are so advanced that they often generate better code with plain C++ than with explicit SIMD intrinsics, unless the code specifically utilizes specialized SIMD predicate instructions or optimizations like the structure of arrays, which Newton uses.

The main reason to use intrinsics is for predicate instructions, but even that is debatable.
I’ll need to run some experiments to determine whether it’s worthwhile to remove all intrinsics

I also fixed some neon bugs, but no way to test, so maybe you can try again and see
if it builds or show more syntct error.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 1 guest

cron