Skip to content

FTBFS with Clang + Arm64 on Windows #2137

@lazka

Description

@lazka
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:

// Current versions of MSVC do not define float16_t, so we do it ourselves using
// int16_t as an intermediate type
#if defined(_M_ARM64) && !defined(float16_t)
#define float16_t int16_t
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    Build IssueIssues related to build or environment problems on any platform.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions