Summary: | media-gfx/blender-4.2.1: build failure, SIGILL in makesdna | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | JohnLM <janis.smedins> |
Component: | Current packages | Assignee: | Paul Zander <negril.nx+gentoo> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | aliaksei.urbanski, darkdefende, janis.smedins, proxy-maint |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
JohnLM
2024-11-29 18:45:17 UTC
Created attachment 912849 [details]
build.log
Upstream bumped the minimum CPU requirement to a cpu with at least sse4.2 at the start to this year: https://www.blender.org/download/requirements/ Seems like they added the march compile flags here: https://www.blender.org/download/requirements/ This is tied to the "WITH_CPU_SIMD" flag. However when looking into this, it also turns out that cycles now actually seem to require sse4.2. The older sse cycles kernels were removed here: https://projects.blender.org/blender/blender/commit/2b095c97fad129683e60bb1ec0d3a6fdefdd38af I don't have any CPUs to test this with but could you try to build "WITH_CPU_SIMD=OFF" and "WITH_CYCLES_NATIVE_ONLY=ON" ? Try to render something with cycles and see if it crashes. From what I can tell it will always build the sse4.2 kernels if you are on a x86 CPU. But the question is if it still has a fallback kernel without those instructions. Note thought that some of the cycles library dependencies (openpgl) not requires sse4.2 as well. @Paul, I guess we should add a sse4.2 requirement to the build and then patch out the march=x86-64-v2 code. Wrong link to the march commit... https://projects.blender.org/blender/blender/commit/8b9743eb407fb1a5c09041b9ca39cf59cc3ce6b3 > This is tied to the "WITH_CPU_SIMD" flag. However when looking into this, it also turns out that cycles now actually seem to require sse4.2. [...] Thanks! Yeah, Blender dropping SSE2 Cycles kernel upstream might be a showstopper for me. Sigh! I modified the ebuild with @@ -389,6 +389,9 @@ -DWITH_USD="no" # TODO: Package USD -DWITH_VULKAN_BACKEND="$(usex vulkan)" -DWITH_XR_OPENXR=no + ## Testing bug #945377 + -DWITH_CPU_SIMD=OFF + -DWITH_CYCLES_NATIVE_ONLY=ON ) if has_version ">=dev-python/numpy-2"; then and tried building Blender again. It did actually solve the issue with `makesdna` built with overriding -march flags. But the build still failed further on with [2213/5395] /usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_LOCALE_DYN_LINK -DBOOST_LOCALE_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DCCL_NAMESPACE_BEGIN="namespace ccl {" -DCCL_NAMESPACE_END=} -DCYCLES_GFLAGS_NAMESPACE=gflags -DEMBREE_MAJOR_VERSION=3 -DGOOGLE_GLOG_DLL_DECL="" -DHAVE_EXECINFO_H -DNDEBUG -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -DWITH_ASSERT_ABORT -DWITH_BLENDER_GUARDEDALLOC -DWITH_CUDA -DWITH_CUDA_DYNLOAD -DWITH_CYCLES_LOGGING -DWITH_EMBREE -DWITH_KERNEL_NATIVE -DWITH_NANOVDB -DWITH_OCIO -DWITH_OPENIMAGEDENOISE -DWITH_OPENSUBDIV -DWITH_OPENVDB -DWITH_OPENVDB_BLOSC -DWITH_OPTIX -DWITH_SYSTEM_PUGIXML -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -I/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/../../extern/cuew/include -I/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/../atomic -I/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/.. -I/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../../sky/include -isystem /usr/include/OpenEXR -isystem /usr/include/Imath -isystem /opt/optix/include -isystem /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/extern/glog/include -isystem /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/extern/gflags/src -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wcomma-subscript -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wimplicit-fallthrough=5 -Wundef -Wmissing-declarations -march=barcelona -mcx16 -fomit-frame-pointer -O2 -pipe -fopenmp -pipe -fPIC -funsigned-char -fno-strict-aliasing -fmacro-prefix-map="/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/"="" -fmacro-prefix-map="/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1_build/"="" -march=native -Wno-error=unused-macros -Wno-maybe-uninitialized -std=c++17 -MD -MT intern/cycles/scene/CMakeFiles/cycles_scene.dir/light_tree.cpp.o -MF intern/cycles/scene/CMakeFiles/cycles_scene.dir/light_tree.cpp.o.d -o intern/cycles/scene/CMakeFiles/cycles_scene.dir/light_tree.cpp.o -c /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/light_tree.cpp FAILED: intern/cycles/scene/CMakeFiles/cycles_scene.dir/light_tree.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_LOCALE_DYN_LINK -DBOOST_LOCALE_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DCCL_NAMESPACE_BEGIN="namespace ccl {" -DCCL_NAMESPACE_END=} -DCYCLES_GFLAGS_NAMESPACE=gflags -DEMBREE_MAJOR_VERSION=3 -DGOOGLE_GLOG_DLL_DECL="" -DHAVE_EXECINFO_H -DNDEBUG -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -DWITH_ASSERT_ABORT -DWITH_BLENDER_GUARDEDALLOC -DWITH_CUDA -DWITH_CUDA_DYNLOAD -DWITH_CYCLES_LOGGING -DWITH_EMBREE -DWITH_KERNEL_NATIVE -DWITH_NANOVDB -DWITH_OCIO -DWITH_OPENIMAGEDENOISE -DWITH_OPENSUBDIV -DWITH_OPENVDB -DWITH_OPENVDB_BLOSC -DWITH_OPTIX -DWITH_SYSTEM_PUGIXML -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -I/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/../../extern/cuew/include -I/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/../atomic -I/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/.. -I/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../../sky/include -isystem /usr/include/OpenEXR -isystem /usr/include/Imath -isystem /opt/optix/include -isystem /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/extern/glog/include -isystem /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/extern/gflags/src -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wcomma-subscript -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wimplicit-fallthrough=5 -Wundef -Wmissing-declarations -march=barcelona -mcx16 -fomit-frame-pointer -O2 -pipe -fopenmp -pipe -fPIC -funsigned-char -fno-strict-aliasing -fmacro-prefix-map="/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/"="" -fmacro-prefix-map="/var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1_build/"="" -march=native -Wno-error=unused-macros -Wno-maybe-uninitialized -std=c++17 -MD -MT intern/cycles/scene/CMakeFiles/cycles_scene.dir/light_tree.cpp.o -MF intern/cycles/scene/CMakeFiles/cycles_scene.dir/light_tree.cpp.o.d -o intern/cycles/scene/CMakeFiles/cycles_scene.dir/light_tree.cpp.o -c /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/light_tree.cpp In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/immintrin.h:39, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/x86intrin.h:32, from /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../util/simd.h:25, from /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../util/types.h:23, from /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../util/math.h:27, from /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../kernel/types.h:23, from /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../scene/light.h:8, from /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../scene/light_tree.h:8, from /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/light_tree.cpp:5: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/smmintrin.h: In function ‘int ccl::fast_rint(float)’: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/smmintrin.h:131:1: error: inlining failed in call to ‘always_inline’ ‘__m128 _mm_round_ss(__m128, __m128, int)’: target specific option mismatch 131 | _mm_round_ss (__m128 __D, __m128 __V, const int __M) | ^~~~~~~~~~~~ In file included from /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../kernel/types.h:24: /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../util/math_fast.h:69:21: note: called from here 69 | vec = _mm_round_ss(vec, vec, (_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/smmintrin.h:131:1: error: inlining failed in call to ‘always_inline’ ‘__m128 _mm_round_ss(__m128, __m128, int)’: target specific option mismatch 131 | _mm_round_ss (__m128 __D, __m128 __V, const int __M) | ^~~~~~~~~~~~ /var/tmp/portage/media-gfx/blender-4.2.1-r1/work/blender-4.2.1/intern/cycles/scene/../util/math_fast.h:69:21: note: called from here 69 | vec = _mm_round_ss(vec, vec, (_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ from which appears that the Cycles code calls SSE4.1 intristics unconditionally. (Not totally unexpected seeing the upstream changes.) Well, I can confirm that USE="-cycles" blender is compilable, runs, functions, and does render with EEVEE so it _is_ somewhat usable... but where is fun in that? :D Hello everyone, I've faced a similar issue when I was trying to build Blender for an old machine with an AMD Athlon(tm) II X3 440 Processor. It turns out, Blender's CMake configuration overrides the -march from system CFLAGS/CXXFLAGS with -march=x86-64-v2 if SUPPORT_SSE42_BUILD is ON. * https://projects.blender.org/blender/blender/src/branch/main/build_files/cmake/macros.cmake#L552 * https://projects.blender.org/blender/blender/src/branch/main/CMakeLists.txt#L1546-L1548 And SUPPORT_SSE42_BUILD is ON even for old machines due to an issue with the TEST_SSE_SUPPORT macro in build_files/cmake/macros.cmake. * https://projects.blender.org/blender/blender/issues/134933 You may see this in the build log that JohnLM attached to this bug: > -- Performing Test SUPPORT_SSE42_BUILD > -- Performing Test SUPPORT_SSE42_BUILD - Success It led to the following configurations: > Compiler flags: > C -Wall -Werror=implicit-function-declaration -Wstrict-prototypes -Werror=return-type -Werror=vla -Wmissing-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wlogical-op -Wundef -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Wformat-signedness -Wrestrict -Wno-stringop-overread -Wno-stringop-overflow -Wnonnull -Wabsolute-value -Wuninitialized -Wredundant-decls -Wshadow -Wimplicit-fallthrough=5 -Wno-error=unused-but-set-variable -march=barcelona -mcx16 -fomit-frame-pointer -O2 -pipe -DNDEBUG -march=x86-64-v2 -fopenmp -std=gnu11 -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -fmacro-prefix-map="/var/tmp/portage/media-gfx/blender-4.2.1/work/blender-4.2.1/"="" -fmacro-prefix-map="/var/tmp/portage/media-gfx/blender-4.2.1/work/blender-4.2.1_build/"="" > C++ -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wcomma-subscript -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wimplicit-fallthrough=5 -Wundef -Wmissing-declarations -march=barcelona -mcx16 -fomit-frame-pointer -O2 -pipe -march=x86-64-v2 -fopenmp -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -fmacro-prefix-map="/var/tmp/portage/media-gfx/blender-4.2.1/work/blender-4.2.1/"="" -fmacro-prefix-map="/var/tmp/portage/media-gfx/blender-4.2.1/work/blender-4.2.1_build/"="" Please notice > -march=barcelona .* -march=x86-64-v2 I've managed to workaround overriding of the -march by adding "MYCMAKEARGS=-DSUPPORT_SSE42_BUILD=NO" to environment variables. It allowed me to build Blender 4.2.4 with USE="-cycles" as suggested here, but not Blender 4.3.2 since it has an additional CPU feature usage issue. |