Build fails with clang-cl: SVML _mm_pow_ps gated on _MSC_VER alone
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- cpp
- Domain
- build-system
Research direction
Start in FixedFunctionOpCPU.cpp and locate the two SVML _mm_pow_ps preprocessor gates using _MSC_VER and OCIO_USE_AVX. Reproduce with clang-cl -c -arch:AVX, then verify the clang-cl build uses the existing ssePower() path and succeeds with OCIO_USE_AVX enabled.
Written by the indexing model from the issue text.
Description
FixedFunctionOpCPU.cpp gates the SVML _mm_pow_ps path on _MSC_VER >= 1920 alone. clang-cl
defines _MSC_VER (1951 for clang 22.1.8) but ships no SVML, so the build breaks whenever
OCIO_USE_AVX is on.
Minimal:
#include <immintrin.h>
__m128 f(__m128 x, __m128 e) { return _mm_pow_ps(x, e); }
> clang-cl -c -arch:AVX t.cpp
t.cpp(2,39): error: use of undeclared identifier '_mm_pow_ps'
Excluding the compiler in the gate is enough, and clang-cl then takes the existing ssePower() path
like any other non-MSVC compiler:
-#if (_MSC_VER >= 1920) && (OCIO_USE_AVX)
+#if (_MSC_VER >= 1920) && (OCIO_USE_AVX) && !defined(__clang__)
main has 2 such sites; 2.5.2 has 4, the extra two being the dispatch arms in
GetFixedFunctionCPURenderer.
clang 22.1.8, x86_64-pc-windows-msvc. Reproduced against 2.5.2 and main.
- Dominant language
- C++
- Stars
- 2.1k
- Forks
- 503
- Avg merge
- 8d 3h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AcademySoftwareFoundation/OpenColorIO
-
Inconsistent run-time library usage for locale handling breaks GPU code generation on some systems.Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AcademySoftwareFoundation/OpenColorIO#2351 · 2 comments ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AcademySoftwareFoundation/OpenColorIO#2340 ·
Maintainers usually reply within 4 days
-
Build failure on GCC/MinGW (MXE): std::ifstream constructor mismatch with Platform::filenameToUTF()Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AcademySoftwareFoundation/OpenColorIO#2283 ·
Maintainers usually reply within 4 days
-
Documentation
Difficulty 1/5 Under an hour Newbie friendliness 72/100
AcademySoftwareFoundation/OpenColorIO#2280 · 1 comment ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AcademySoftwareFoundation/OpenColorIO#2277 ·
Maintainers usually reply within 4 days
All issues in AcademySoftwareFoundation/OpenColorIO
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
iOS: hidden scale bar invalidates its intrinsic content size on every layout pass of MLNMapViewOpen
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
maplibre/maplibre-native#4723 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
HarbourMasters/Shipwright#7320 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Make Catch2 optional when `RDK_BUILD_CPP_TESTS=OFF`Possibly taken @pechersky claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days