Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9688

[C++] Supporting Windows ARM64 builds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.0
    • 7.0.0
    • C++
    • Windows

    Description

      I was trying to build the Arrow library so I could use it to generate parquet files on Windows ARM64, but it currently fails to compile for a few reasons. I thought I'd enumerate them here, so someone more familiar with the project could spearhead it.

      In SetupCxxFlags.cmake

      • the MSVC branch for ARROW_CPU_FLAG STREQUAL "x86" is taken even though I'm building ARM64, this may be a more fundamental error somewhere else that needs correction and maybe things would work better, but an inspection of other branches seemed to indicate that ARM64 is assumed to be missing from MSVC and the keywrod "aarch64" (not a term used in the Windows ecosystem) is prevalent in the cmake files. So the first thing I did was I stubbed it out and set SSE42, AVX and AVX512 to be not present
      • In bit_util.h I provided implementations for popcount32, popcount64 that were not neon accelerated, although neon_cnt is provided by msvc (for n64)
      • Removed nmintrin.h since that is x64/x64 specific. Note, _BitScanReverse and _BitScanForward are Microsoft specific and support on ARM64.
      • cpu_info.cc needed tweaks for cpuid stuff, I just returned false and didn't really care too much about any upstream effects. flag_mappings and num_flags ought be defined in the not WIN32 ifdef, since they're not actually used.

      After these changes I was able to remove the vcpkg restriction that artificially failed the library from compiling on arm64 and I was able to successfully compile for both arm64-windows-static and arm64-windows.

      Attachments

        Issue Links

          Activity

            People

              Sait Niyas
              mjsabby Mukul Sabharwal
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 336h
                  336h
                  Remaining:
                  Time Spent - 6h 20m Remaining Estimate - 329h 40m
                  329h 40m
                  Logged:
                  Time Spent - 6h 20m Remaining Estimate - 329h 40m
                  6h 20m