AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.76k stars 434 forks source link

latest opencolorio 2.3.0 fails to build on 32bit #1889

Closed david-geiger closed 10 months ago

david-geiger commented 10 months ago

Hi,

On mageia cauldron I tried to build opencolorio 2.3.0 but now it fails to build on 32bit (i586 arch):

/home/iurt/rpmbuild/BUILD/OpenColorIO-2.3.0/src/OpenColorIO/SSE.h:98:47: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi] 98 | inline __m128 isNegativeSpecial(const __m128 x) | ^ In file included from /usr/lib/gcc/i586-mageia-linux/12/include/emmintrin.h:31, from /home/iurt/rpmbuild/BUILD/OpenColorIO-2.3.0/src/OpenColorIO/SSE.h:14: /usr/lib/gcc/i586-mageia-linux/12/include/xmmintrin.h: In function 'void __static_initialization_and_destruction_0(int, int)': /usr/lib/gcc/i586-mageia-linux/12/include/xmmintrin.h:957:1: error: inlining failed in call to 'always_inline' '__m128 _mm_setr_ps(float, float, float, float)': target specific option mismatch 957 | _mm_setr_ps (float __Z, float __Y, float __X, float __W)

Attached full build log: build.i586.0.20231018042704.log

cedrik-fuoco-adsk commented 10 months ago

Hi @david-geiger,

We had a recent fix on the main branch for 32bits platform. I'd like to confirm if that would fix your problem. Could you try to build from the main branch?

david-geiger commented 10 months ago

Yes I already tried with commit 16b3157f2e1f2b84cbb67adf04a6c58c60d381b2 and I get build error mentioned above

Without this patch I get another build error:

/home/iurt/rpmbuild/BUILD/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp: Assembler messages: /home/iurt/rpmbuild/BUILD/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name %rbx' /home/iurt/rpmbuild/BUILD/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name%rbx'

I also added commit c429400170ccd34902d8a6b26e70c43e26d57751 to have debug symbol during build.

david-geiger commented 10 months ago

Here the spec file we use:

https://svnweb.mageia.org/packages/cauldron/opencolorio/current/SPECS/opencolorio.spec

david-geiger commented 10 months ago

Hi, any news?

cedrik-fuoco-adsk commented 10 months ago

I'll start investigating deeper tomorrow. Just to confirm, there are no issues with OCIO under 2.3.0 on the same setup, right? @david-geiger

david-geiger commented 10 months ago

Yes I confirm that OCIO 2.2 build fine.

I think and probably the build issue start since this commit caa20dd1962f0d659a9214ac28815a1b904d4118

cedrik-fuoco-adsk commented 10 months ago

Are you expecting the usage of SIMD (SSE) instructions to be disabled? What's the processor model in the machine you are using?

Based on the %build section of the RPM spec file, it is disabling the usage of SSE instructions if the architecture is not x86_64 by setting OCIO_USE_SSE=OFF. That option was renamed to OCIO_USE_SIMD in OCIO 2.3.0.

In the build log, we can see that the SIMD instructions are enabled and they shouldn't be based on the RPM spec file.

david-geiger commented 10 months ago

Oh yes right, seems that just replaced OCIO_USE_SSE=OFF with OCIO_USE_SIMD=OFF in our RPM spec file fixes the 32bit build issue.

Thanks!