AcademySoftwareFoundation / OpenColorIO

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

32-bit Linux build failure on x86 #1841

Closed lmarz closed 1 year ago

lmarz commented 1 year ago

When trying to compile ocio for x86, the following error appears:

ninja: job failed: /usr/bin/g++ -DOpenColorIO_EXPORTS -I/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/include/OpenColorIO/.. -I/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/include/OpenColorIO -I/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO -I/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/build/include/OpenColorIO -I/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/build/src/OpenColorIO -I/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/build/generated_include -isystem /usr/include/Imath -isystem /builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/build/ext/dist/include -isystem /builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/ext/sampleicc/src/include -isystem /builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/utils/.. -isystem /builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/ext/xxHash/src/include -isystem /builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/build/ext/dist/include/minizip-ng -w -msse2 -O3 -DNDEBUG -std=c++14 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -DUSE_GCC -Wall -Wextra -Wswitch-enum -MD -MT src/OpenColorIO/CMakeFiles/OpenColorIO.dir/CPUInfo.cpp.o -MF src/OpenColorIO/CMakeFiles/OpenColorIO.dir/CPUInfo.cpp.o.d -o src/OpenColorIO/CMakeFiles/OpenColorIO.dir/CPUInfo.cpp.o -c /builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp: Assembler messages:
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:54: Error: bad register name `%rbx'
/builds/lmarz/aports/community/opencolorio/src/OpenColorIO-2.3.0/src/OpenColorIO/CPUInfo.cpp:56: Error: bad register name `%rbx'

It seems like you accidentally used the 64-bit register %rbx instead of the 32-bit register %ebx there.

markreidvfx commented 1 year ago

Yeah, thats looks like the issue. If you change the rbx and rsi registers names is that the only 32-bit linux build issue you found?

doug-walker commented 1 year ago

Changing the title to indicate this is when building for 32-bit Linux.