Bug 2261013

Summary: blender: FTBFS in Fedora rawhide/f40
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: blenderAssignee: Luya Tshimbalanga <luya_tfz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: awilliam, code, design-devel, epel-packagers-sig, kwizart, luya_tfz, negativo17, orion, waltermarcihtc
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: blender-4.1.1-3.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-25 01:00:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2231791    
Attachments:
Description Flags
build.log
none
root.log
none
state.log
none
bigger log extract of failure none

Description Fedora Release Engineering 2024-01-29 19:03:59 UTC
blender failed to build from source in Fedora rawhide/f40

https://koji.fedoraproject.org/koji/taskinfo?taskID=112197970


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
Please fix blender at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
blender will be orphaned. Before branching of Fedora 41,
blender will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/

Comment 1 Fedora Release Engineering 2024-01-29 19:04:05 UTC
Created attachment 2011566 [details]
build.log

Comment 2 Fedora Release Engineering 2024-01-29 19:04:10 UTC
Created attachment 2011567 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2024-01-29 19:04:14 UTC
Created attachment 2011568 [details]
state.log

Comment 4 Aoife Moloney 2024-02-15 23:13:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 5 Orion Poplawski 2024-02-28 03:07:42 UTC
This is apparently a cmake issue and is supposed to be fixed in 3.28.3.  I've filed https://src.fedoraproject.org/rpms/cmake/pull-request/38

Comment 6 Adam Williamson 2024-03-20 00:31:34 UTC
Well, it still fails to build on current Rawhide (with cmake 3.28.3):

/usr/bin/ccache /usr/lib64/ccache/g++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CHRONO_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 -DBOOST_WAVE_DYN_LINK -DBOOST_WAVE_NO_LIB -DCCL_NAMESPACE_BEGIN="namespace ccl {" -DCCL_NAMESPACE_END=} -DCYCLES_GFLAGS_NAMESPACE=gflags -DEMBREE_MAJOR_VERSION=4 -DGOOGLE_GLOG_DLL_DECL="" -DHAVE_EXECINFO_H -DNDEBUG -DOSL_STATIC_BUILD -DOSL_STATIC_LIBRARY -DPATH_GUIDING_LEVEL=5 -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -DWITH_ALEMBIC -DWITH_ASSERT_ABORT -DWITH_BLENDER_GUARDEDALLOC -DWITH_CUDA -DWITH_CUDA_DYNLOAD -DWITH_CYCLES_LOGGING -DWITH_EMBREE -DWITH_GHOST_WAYLAND_DBUS -DWITH_GHOST_WAYLAND_LIBDECOR -DWITH_HIP -DWITH_HIP_DYNLOAD -DWITH_KERNEL_AVX2 -DWITH_KERNEL_SSE2 -DWITH_KERNEL_SSE41 -DWITH_NANOVDB -DWITH_OCIO -DWITH_OPENIMAGEDENOISE -DWITH_OPENSUBDIV -DWITH_OPENVDB -DWITH_OPENVDB_BLOSC -DWITH_OSL -DWITH_PATH_GUIDING -DWITH_SYSTEM_PUGIXML -DWITH_USD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/builddir/build/BUILD/blender-4.0.2/intern/cycles/../../extern/cuew/include -I/builddir/build/BUILD/blender-4.0.2/intern/cycles/../../extern/hipew/include -I/builddir/build/BUILD/blender-4.0.2/intern/cycles/../atomic -I/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/.. -I/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/../../sky/include -isystem /usr/include/OpenEXR -isystem /usr/include/Imath -isystem /builddir/build/BUILD/blender-4.0.2/extern/glog/include -isystem /builddir/build/BUILD/blender-4.0.2/extern/gflags/src -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 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wl,--as-needed -fopenmp -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing  -msse2 -fmacro-prefix-map="/builddir/build/BUILD/blender-4.0.2/"="" -fmacro-prefix-map="/builddir/build/BUILD/blender-4.0.2/redhat-linux-build/"="" -fno-trapping-math -fno-math-errno -fno-signed-zeros -fno-signaling-nans -fno-rounding-math -mfpmath=sse -Wno-error=unused-macros -Wno-maybe-uninitialized -DNDEBUG -std=c++17 -MD -MT intern/cycles/scene/CMakeFiles/cycles_scene.dir/image_vdb.cpp.o -MF intern/cycles/scene/CMakeFiles/cycles_scene.dir/image_vdb.cpp.o.d -o intern/cycles/scene/CMakeFiles/cycles_scene.dir/image_vdb.cpp.o -c /builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp: In member function ‘bool ccl::ToNanoOp::operator()(const openvdb::v11_0::GridBase::ConstPtr&)’:
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:58:33: error: ‘openToNanoVDB’ is not a member of ‘nanovdb’
   58 |             nanogrid = nanovdb::openToNanoVDB<nanovdb::HostBuffer,
      |                                 ^~~~~~~~~~~~~
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:58:66: error: expected primary-expression before ‘,’ token
   58 |             nanogrid = nanovdb::openToNanoVDB<nanovdb::HostBuffer,
      |                                                                  ^
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:59:79: error: expected ‘(’ before ‘,’ token
   59 |                                               typename FloatGridType::TreeType,
      |                                                                               ^
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:60:59: error: expected primary-expression before ‘>’ token
   60 |                                               nanovdb::FpN>(floatgrid);
      |                                                           ^
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:64:33: error: ‘openToNanoVDB’ is not a member of ‘nanovdb’
   64 |             nanogrid = nanovdb::openToNanoVDB<nanovdb::HostBuffer,
      |                                 ^~~~~~~~~~~~~
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:64:66: error: expected primary-expression before ‘,’ token
   64 |             nanogrid = nanovdb::openToNanoVDB<nanovdb::HostBuffer,
      |                                                                  ^
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:65:79: error: expected ‘(’ before ‘,’ token
   65 |                                               typename FloatGridType::TreeType,
      |                                                                               ^
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:66:60: error: expected primary-expression before ‘>’ token
   66 |                                               nanovdb::Fp16>(floatgrid);
      |                                                            ^
/builddir/build/BUILD/blender-4.0.2/intern/cycles/scene/image_vdb.cpp:71:29: error: ‘openToNanoVDB’ is not a member of ‘nanovdb’
   71 |         nanogrid = nanovdb::openToNanoVDB(floatgrid);
      |                             ^~~~~~~~~~~~~

Comment 7 Adam Williamson 2024-03-20 00:33:39 UTC
That was built with 3.28.3-1.fc41 . The error seems the same as Richard reported at https://www.mail-archive.com/devel@lists.fedoraproject.org/msg197086.html , but the "- OpenVDB required to build nanovdb_convert. Skipping" warning is no longer present. Task: https://koji.fedoraproject.org/koji/taskinfo?taskID=115184721

Comment 8 Adam Williamson 2024-03-20 00:40:02 UTC
Oh, I see, that warning is from the last *openvdb* build, https://koji.fedoraproject.org/koji/buildinfo?buildID=2391613 . I don't *think* it's likely the issue here, though.

I notice in the openvdb 11.0.0 changelog:

    - Added createNanoGrid that replaces older conversion methods in GridBuilder.h,
      IndexGridBuilder.h and OpenToNanoVDB.h

so I think this may actually be an API change that Blender needs to adjust to.

Comment 10 Adam Williamson 2024-03-20 01:44:58 UTC
Sigh. With that patch and the two others around it, build gets a lot further, but still ultimately fails:

In function ‘rna_HookModifier_vertex_indices_set’,
    inlined from ‘rna_HookModifier_vertex_indices_set’ at /builddir/build/BUILD/blender-4.0.2/source/blender/makesrna/intern/rna_modifier.cc:972:0,
    inlined from ‘HookModifier_vertex_indices_set_call’ at /builddir/build/BUILD/blender-4.0.2/redhat-linux-build/source/blender/makesrna/intern/rna_modifier_gen.cc:11083:37:
/builddir/build/BUILD/blender-4.0.2/source/blender/makesrna/intern/rna_modifier.cc:992:49: warning: argument 1 range [18446744065119617024, 18446744073709551612] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  992 |     int *buffer = static_cast<int *>(MEM_mallocN(size, "hook indexar"));
      |                                                 ^
/usr/include/openvdb/points/AttributeArray.h:1166: error: undefined reference to 'openvdb::v11_0::points::AttributeArray::AttributeArray(openvdb::v11_0::points::AttributeArray const&, tbb::spin_mutex::scoped_lock const&)'
/usr/include/openvdb/points/AttributeArray.h:1166: error: undefined reference to 'openvdb::v11_0::points::AttributeArray::AttributeArray(openvdb::v11_0::points::AttributeArray const&, tbb::spin_mutex::scoped_lock const&)'
/usr/include/openvdb/points/AttributeArray.h:1166: error: undefined reference to 'openvdb::v11_0::points::AttributeArray::AttributeArray(openvdb::v11_0::points::AttributeArray const&, tbb::spin_mutex::scoped_lock const&)'

not sure if there's an upstream fix for that, may look into it more tomorrow.

Comment 11 Adam Williamson 2024-03-20 16:32:58 UTC
https://koji.fedoraproject.org/koji/taskinfo?taskID=115186289 was that build attempt. https://devtalk.blender.org/t/build-failure-undefined-reference-to-openvdb-attributearray/24803 was the only reference I could find for the somewhat odd undefined reference error...I'll keep trying to figure it out...

Comment 12 Adam Williamson 2024-03-20 16:49:39 UTC
Created attachment 2022725 [details]
bigger log extract of failure

Here's a much bigger log extract of the failure. It seems to be failing at the very last step of the main build process. There's a huge command (I think steps 5579, 5580 and 5581 are chained, that's what the &&s indicate?), then a whole ton of warnings, then *finally* the errors at the end.

Comment 13 Luya Tshimbalanga 2024-03-20 23:06:11 UTC
Hmm, perhaps adjusting OpenVDB build m(In reply to Adam Williamson from comment #7)
> That was built with 3.28.3-1.fc41 . The error seems the same as Richard
> reported at
> https://www.mail-archive.com/devel@lists.fedoraproject.org/msg197086.html ,
> but the "- OpenVDB required to build nanovdb_convert. Skipping" warning is
> no longer present. Task:
> https://koji.fedoraproject.org/koji/taskinfo?taskID=115184721

Hmm, that may be the missing piece as `nanovdb_convert` is disabled without "NANOVDB_USE_OPENVDB" parameter by default[https://github.com/AcademySoftwareFoundation/openvdb/blob/master/nanovdb/nanovdb/cmd/CMakeLists.txt].

Comment 14 Adam Williamson 2024-03-20 23:52:01 UTC
I'm not sure it's really relevant at all. I'm not sure anything in the blender build needs nanovdb_convert to have been built as part of openvdb.

Comment 15 Kevin Fenzi 2024-03-28 18:06:05 UTC
*** Bug 2272025 has been marked as a duplicate of this bug. ***

Comment 16 Luya Tshimbalanga 2024-03-29 01:33:04 UTC
Modifying openvdb (commit now on rawhide) to use both "DOPENVDB_ABI_VERSION_NUMBER=10" and "DOPENVDB_USE_DEPRECATED_ABI_10=ON" parameter resolved the issue except x86_64 F40 version.
https://copr.fedorainfracloud.org/coprs/luya/blender-egl/build/7227209

For some weird reason, clang failed to properly locate ROCm device library path.

I release it is possible to build Blender without OpenVDB,
https://koji.fedoraproject.org/koji/taskinfo?taskID=115502818

Lesson learned in a future.

Comment 17 Adam Williamson 2024-03-29 01:47:29 UTC
well, sure, you *can* build without it, but doesn't that remove a significant feature? at least so far as I understand anything about blender. :D thanks for working on this, though!

Comment 18 Fedora Update System 2024-04-23 03:43:35 UTC
FEDORA-2024-45862e3ed9 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-45862e3ed9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-45862e3ed9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2024-04-25 01:00:12 UTC
FEDORA-2024-45862e3ed9 (blender-4.1.1-3.fc40, luxcorerender-2.7-0.18.beta1.fc40, and 4 more) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.