You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble compiling OpenEXR for UB2 binaries, from an Intel based Mac. (To reproduce the issue build with cmake and set CMAKE_OSX_ARCHTECTURES=x86_64;arm64)
The problem appears to be that this check in openexr/cmake/CMakeLists.txt fails:
check_cxx_source_compiles(
"
int main()
{
#if defined(__SSE2__)
int n = 0;
int eax = 0;
int edx = 0;
__asm__(
\"xgetbv ;\"
\"vzeroupper \"
: \"=a\"(eax), \"=d\"(edx) : \"c\"(n) : );
#else
# error No SSE support enabled to query AVX support
#endif
}
" OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
)
Arm doesn't support SSE so I think that's why it fails in UB2 compilation.
However OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX gets "burned in" to OpenEXRConfigInternal.h, even when compiling the x86_64 "side" of the universal binaries.
This causes some tests to fail. In particular testCPUIdent:
7/127 Test #7: OpenEXRCore.testCPUIdent ..................Subprocess aborted***Exception: 0.01 sec
tempDir = '/var/tmp/OpenEXR_D8YKiB/': 24
=======
Running testCPUIdent
CPU Id test f16c mismatch: 1 vs 0
Core Test failed: false
file:/openexr/src/test/OpenEXRCoreTest/base_units.cpp
line:375
function:voidtestCPUIdent(const std::string &)
CpuId is affected by OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX and reports that f16c is not available. That is incorrect, my cpu should support it. Whereas check_for_x86_simd does not depend on that macro, and correctly reports that f16c is available.
This also seems to affect two other tests related to DWA compression
53/127 Test #53: OpenEXRCore.testDWAACompression ...........Subprocess aborted***Exception: 1.08 sec
tempDir = '/var/tmp/OpenEXR_9HJaaa/': 24
=======
Running testDWAACompression
zeroes tiled: no sampling 1, 1 comp 8
zeroes tiled: yes sampling 1, 1 comp 8
zeroes tiled: no sampling 1, 2 comp 8
zeroes tiled: no sampling 2, 1 comp 8
zeroes tiled: no sampling 2, 2 comp 8
pattern1 tiled: no sampling 1, 1 comp 8
pattern1 tiled: yes sampling 1, 1 comp 8
pattern1 tiled: no sampling 1, 2 comp 8
pattern1 tiled: no sampling 2, 1 comp 8
pattern1 tiled: no sampling 2, 2 comp 8
pattern2 tiled: no sampling 1, 1 comp 8
B half at 1276, 1 not equal: C++ loaded C 0x3c4b (1.07324) vs C loaded C 0x3c4e (1.07617)
Core Test failed: a == b
file:/openexr/src/test/OpenEXRCoreTest/compression.cpp
line:475
function:static void pixels::compareExact(uint16_t, uint16_t, int, int, const char *, const char *, const char *)
The following tests FAILED:
53 - OpenEXRCore.testDWAACompression (Subprocess aborted)
54 - OpenEXRCore.testDWABCompression (Subprocess aborted)
If I hack the check_cxx_source_compiles code snippet to always pass, then all of the tests pass in x86_64 mode. I have not tried running in arm64 mode though, as I do not have access to an Apple silicon Mac.
Hi there,
I'm having trouble compiling OpenEXR for UB2 binaries, from an Intel based Mac. (To reproduce the issue build with cmake and set CMAKE_OSX_ARCHTECTURES=x86_64;arm64)
The problem appears to be that this check in openexr/cmake/CMakeLists.txt fails:
Arm doesn't support SSE so I think that's why it fails in UB2 compilation.
However OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX gets "burned in" to OpenEXRConfigInternal.h, even when compiling the x86_64 "side" of the universal binaries.
This causes some tests to fail. In particular testCPUIdent:
CpuId is affected by OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX and reports that f16c is not available. That is incorrect, my cpu should support it. Whereas
check_for_x86_simd
does not depend on that macro, and correctly reports that f16c is available.This also seems to affect two other tests related to DWA compression
If I hack the
check_cxx_source_compiles
code snippet to always pass, then all of the tests pass in x86_64 mode. I have not tried running in arm64 mode though, as I do not have access to an Apple silicon Mac.System info:
The text was updated successfully, but these errors were encountered: