OpenColorIO icon indicating copy to clipboard operation
OpenColorIO copied to clipboard

FTBFS with Clang + Arm64 on Windows

Open lazka opened this issue 9 months ago • 2 comments

In file included from C:/M/B/src/OpenColorIO-2.4.2/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_SSE2.cpp:10:
C:/M/B/src/OpenColorIO-2.4.2/src/OpenColorIO/SSE2.h:354:19: error: incompatible pointer types assigning to '__fp16 *' from 'int16_t *' (aka 'short *')
  354 |         vst1q_f16((float16_t *)(out+0), rgba);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/clangarm64/lib/clang/20/include/arm_neon.h:39424:26: note: expanded from macro 'vst1q_f16'
 39424 |   __builtin_neon_vst1q_v(__p0, (int8x16_t)__s1, 40); \
       |                          ^~~~
In file included from C:/M/B/src/OpenColorIO-2.4.2/src/OpenColorIO/ops/lut1d/Lut1DOpCPU_SSE2.cpp:10:
C:/M/B/src/OpenColorIO-2.4.2/src/OpenColorIO/SSE2.h:357:19: error: incompatible pointer types assigning to '__fp16 *' from 'int16_t *' (aka 'short *')
  357 |         vst1q_f16((float16_t *)(out+8), rgba);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/clangarm64/lib/clang/20/include/arm_neon.h:39424:26: note: expanded from macro 'vst1q_f16'
 39424 |   __builtin_neon_vst1q_v(__p0, (int8x16_t)__s1, 40); \
       |                          ^~~~

2 errors generated.

This makes it build: https://github.com/msys2/MINGW-packages/blob/3027f4fc33ee83d31bdcefb2cc07442e02ff8e50/mingw-w64-opencolorio/0006-fix-neon-build.patch

I don't know how that plays with MSVC though, and if this needs to be changed instead: https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/05466120f3f9c23b23778f3ccbafc4dde93abe4b/src/OpenColorIO/SSE2.h#L30-L34

lazka avatar Mar 21 '25 09:03 lazka

Perhaps @anthony-linaro can help?

kmilos avatar Mar 25 '25 10:03 kmilos

I will take a look!

anthony-linaro avatar Mar 25 '25 17:03 anthony-linaro