Bug 280459 - graphics/blender: update 4.1.1 → 4.2.0
Summary: graphics/blender: update 4.1.1 → 4.2.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL: https://www.blender.org/download/rele...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-26 17:11 UTC by Vladimir Druzenko
Modified: 2024-08-12 01:40 UTC (History)
1 user (show)

See Also:
FreeBSD: maintainer-feedback+


Attachments
maintainer update for graphics/blender (182.10 KB, patch)
2024-07-30 10:04 UTC, Shane
FreeBSD: maintainer-approval+
Details | Diff
maintainer update for graphics/blender (186.71 KB, patch)
2024-07-31 09:20 UTC, Shane
FreeBSD: maintainer-approval+
Details | Diff
v1 (188.35 KB, patch)
2024-08-07 02:35 UTC, Vladimir Druzenko
no flags Details | Diff
v2 (190.91 KB, patch)
2024-08-10 01:14 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-26 17:11:16 UTC
Blender 4.2 LTS was released on July 16, 2024:
https://developer.blender.org/docs/release_notes/4.2/
https://projects.blender.org/blender/blender/milestone/19
Comment 1 Shane 2024-07-30 10:04:08 UTC
Created attachment 252365 [details]
maintainer update for graphics/blender

Update graphics/blender to v4.2.0
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-30 14:42:53 UTC
Removed %%CYCLES%%:
-%%CYCLES%%%%DATADIR%%/%%VER%%/scripts/addons/cycles/camera.py
+%%DATADIR%%/%%VER%%/scripts/addons_core/cycles/camera.py

Same for a lot of lines.

Also LZO sorting in options list too.
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-30 16:18:36 UTC
[100%] Built target blender
/usr/local/bin/cmake -E cmake_progress_start /tmp/work/usr/ports/graphics/blender/work/.build/CMakeFiles 0
Traceback (most recent call last):
  File "/tmp/work/usr/ports/graphics/blender/work/blender-4.2.0/doc/manpage/blender.1.py", line 230, in <module>
    main()
  File "/tmp/work/usr/ports/graphics/blender/work/blender-4.2.0/doc/manpage/blender.1.py", line 224, in main
    man_page_from_blender_help(fh, blender_bin, verbose)
  File "/tmp/work/usr/ports/graphics/blender/work/blender-4.2.0/doc/manpage/blender.1.py", line 105, in man_page_from_blender_help
    blender_info = blender_extract_info(blender_bin)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/work/usr/ports/graphics/blender/work/blender-4.2.0/doc/manpage/blender.1.py", line 47, in blender_extract_info
    blender_help = subprocess.run(
                   ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/tmp/work/usr/ports/graphics/blender/work/.build/bin/blender', '--help']' died with <Signals.SIGILL: 4>.
*** Error code 1
====================================================================================
(gdb) bt -full
#0  0x0000000003d6759b in std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<OpenImageIO_v2_5::ustring, ccl::NodeType>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<OpenImageIO_v2_5::ustring, ccl::NodeType>, std::__1::__unordered_map_hasher<OpenImageIO_v2_5::ustring, std::__1::__hash_value_type<OpenImageIO_v2_5::ustring, ccl::NodeType>, std::__1::hash<OpenImageIO_v2_5::ustring>, std::__1::equal_to<OpenImageIO_v2_5::ustring>, true>, std::__1::__unordered_map_equal<OpenImageIO_v2_5::ustring, std::__1::__hash_value_type<OpenImageIO_v2_5::ustring, ccl::NodeType>, std::__1::equal_to<OpenImageIO_v2_5::ustring>, std::__1::hash<OpenImageIO_v2_5::ustring>, true>, std::__1::allocator<std::__1::__hash_value_type<OpenImageIO_v2_5::ustring, ccl::NodeType> > >::__emplace_unique_key_args<OpenImageIO_v2_5::ustring, std::__1::piecewise_construct_t const&, std::__1::tuple<OpenImageIO_v2_5::ustring const&>, std::__1::tuple<> >(OpenImageIO_v2_5::ustring const&, std::__1::piecewise_construct_t const&, std::__1::tuple<OpenImageIO_v2_5::ustring const&>&&, std::__1::tuple<>&&) ()
#1  0x0000000003d66b66 in ccl::NodeType::add(char const*, ccl::Node* (*)(ccl::NodeType const*), ccl::NodeType::Type, ccl::NodeType const*) ()
#2  0x0000000003d869a3 in ccl::NodeType const* ccl::DenoiseParams::register_type<ccl::DenoiseParams>() ()
#3  0x0000000003d85f29 in _GLOBAL__sub_I_denoise.cpp ()
#4  0x00003b40c73caf5d in ??? () at /libexec/ld-elf.so.1
#5  0x00000008252aaab8 in ??? ()
#6  0x00002bfaee600448 in ??? ()
#7  0x00000008252aa1c0 in ??? ()
#8  0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#9  0x00000008252aaab8 in ??? ()
#10 0x00002bfaee600428 in ??? ()
#11 0x00000008252aa1e0 in ??? ()
#12 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#13 0x00000008252aaab8 in ??? ()
#14 0x00002bfaee600408 in ??? ()
#15 0x00000008252aa200 in ??? ()
#16 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#17 0x00000008252aaab8 in ??? ()
#18 0x00002bfaee608be8 in ??? ()
#19 0x00000008252aa220 in ??? ()
#20 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#21 0x00000008252aaab8 in ??? ()
#22 0x00002bfaee62f368 in ??? ()
#23 0x00000008252aa240 in ??? ()
#24 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#25 0x00000008252aaab8 in ??? ()
#26 0x00002bfaee62f348 in ??? ()
#27 0x0000003404000c0c in ??? ()
#28 0x00002bfaee631c08 in ??? ()
#29 0x00003b40c73df110 in ??? () at /libexec/ld-elf.so.1
#30 0x00002bfaee603008 in ??? ()
#31 0x00000008252aaab8 in ??? ()
#32 0x00002bfaee603008 in ??? ()
#33 0x00000008252aa280 in ??? ()
#34 0x00003b40c73d5d39 in ??? () at /libexec/ld-elf.so.1
#35 0x000000340d008c0c in ??? ()
#36 0x00002bfaee611c08 in ??? ()
#37 0x00000008252aaab8 in ??? ()
#38 0x00002bfaee608788 in ??? ()
#39 0x00000008252aa2c0 in ??? ()
#40 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#41 0x00000008252aaab8 in ??? ()
#42 0x00002bfaee608768 in ??? ()
#43 0x00000008252aa2e0 in ??? ()
#44 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#45 0x00000008252aaab8 in ??? ()
#46 0x00002bfaee608748 in ??? ()
#47 0x00000008252aa300 in ??? ()
#48 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#49 0x00000008252aaab8 in ??? ()
#50 0x00002bfaee608728 in ??? ()
#51 0x00000008252aa320 in ??? ()
#52 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#53 0x00000008252aaab8 in ??? ()
#54 0x00002bfaee608708 in ??? ()
#55 0x00000008252aa340 in ??? ()
#56 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#57 0x00000008252aaab8 in ??? ()
#58 0x00002bfaee6086e8 in ??? ()
#59 0x00000008252aa360 in ??? ()
#60 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#61 0x00000008252aaab8 in ??? ()
#62 0x00002bfaee6086c8 in ??? ()
#63 0x00000008252aa380 in ??? ()
#64 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#65 0x00000008252aaab8 in ??? ()
#66 0x00002bfaee6086a8 in ??? ()
#67 0x00000008252aa3a0 in ??? ()
#68 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#69 0x00000008252aaab8 in ??? ()
#70 0x00002bfaee608688 in ??? ()
#71 0x000000340680082c in ??? ()
#72 0x00002bfaee60e808 in ??? ()
#73 0x00003b40c73df110 in ??? () at /libexec/ld-elf.so.1
#74 0x00002bfaee603008 in ??? ()
#75 0x00000008252aaab8 in ??? ()
#76 0x00002bfaee603008 in ??? ()
#77 0x00000008252aa3e0 in ??? ()
#78 0x00003b40c73d5d39 in ??? () at /libexec/ld-elf.so.1
#79 0x00000008252aa400 in ??? ()
#80 0x00003b40c73ca995 in ??? () at /libexec/ld-elf.so.1
#81 0x00000008252aaab8 in ??? ()
#82 0x00002bfaee6001e8 in ??? ()
#83 0x00000008252aa420 in ??? ()
#84 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#85 0x00000008252aaab8 in ??? ()
#86 0x00002bfaee6001c8 in ??? ()
#87 0x00000008252aa440 in ??? ()
#88 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#89 0x00000008252aaab8 in ??? ()
#90 0x00002bfaee6001a8 in ??? ()
#91 0x00000008252aa460 in ??? ()
#92 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#93 0x00000008252aaab8 in ??? ()
#94 0x00002bfaee600188 in ??? ()
#95 0x00000008252aa480 in ??? ()
#96 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#97 0x00000008252aaab8 in ??? ()
#98 0x00002bfaee608408 in ??? ()
#99 0x00000008252aa4a0 in ??? ()
#100 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#101 0x00000008252aaab8 in ??? ()
#102 0x00002bfaee6083e8 in ??? ()
#103 0x0000003404000c0c in ??? ()
#104 0x00002bfaee60c808 in ??? ()
#105 0x00003b40c73df110 in ??? () at /libexec/ld-elf.so.1
#106 0x00002bfaee603008 in ??? ()
#107 0x00000008252aaab8 in ??? ()
#108 0x00002bfaee603008 in ??? ()
#109 0x00000008252aa4e0 in ??? ()
#110 0x00003b40c73d5d39 in ??? () at /libexec/ld-elf.so.1
#111 0x0000003404000c0c in ??? ()
#112 0x00002bfaee60c008 in ??? ()
#113 0x00003b40c73df110 in ??? () at /libexec/ld-elf.so.1
#114 0x00002bfaee603008 in ??? ()
#115 0x0000003404000c0c in ??? ()
#116 0x00002bfaee60bc08 in ??? ()
#117 0x00003b40c73df110 in ??? () at /libexec/ld-elf.so.1
#118 0x00002bfaee603008 in ??? ()
#119 0x00000008252aaab8 in ??? ()
#120 0x00002bfaee603008 in ??? ()
#121 0x00000008252aa540 in ??? ()
#122 0x00003b40c73d5d39 in ??? () at /libexec/ld-elf.so.1
#123 0x00000008252aa560 in ??? ()
#124 0x00003b40c73ca995 in ??? () at /libexec/ld-elf.so.1
#125 0x00000008252aaab8 in ??? ()
#126 0x00002bfaee600088 in ??? ()
#127 0x00000008252aa580 in ??? ()
#128 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#129 0x00000008252aaab8 in ??? ()
#130 0x00002bfaee600068 in ??? ()
#131 0x00000008252aa5a0 in ??? ()
#132 0x00003b40c73ced5d in ??? () at /libexec/ld-elf.so.1
#133 0x00000008252aa600 in ??? ()
#134 0x00003b40c73d15df in ??? () at /libexec/ld-elf.so.1
#135 0x00003b40c73c3817 in ??? () at /libexec/ld-elf.so.1
#136 0x0000000004ead093 in rna_GreasePencilTimeModifierSegment_segment_repeat ()
#137 0x000000000490f322 in void tbb::detail::d1::partition_type_base<tbb::detail::d1::auto_partition_type>::execute<tbb::detail:--Type <RET> for more, q to quit, c to continue without paging--
:d1::start_for<tbb::detail::d1::blocked_range<long long>, Manta::KnUpdateFlagsObs, tbb::detail::d1::auto_partitioner const>, tbb::detail::d1::blocked_range<long long> >(tbb::detail::d1::start_for<tbb::detail::d1::blocked_range<long long>, Manta::KnUpdateFlagsObs, tbb::detail::d1::auto_partitioner const>&, tbb::detail::d1::blocked_range<long long>&, tbb::detail::d1::execution_data&) ()
#138 0x00003b40c73cf3f3 in ??? () at /libexec/ld-elf.so.1
#139 0x00002bfaee659c08 in ??? ()
#140 0x00002bfaee65a008 in ??? ()
#141 0x00002bfaee65a408 in ??? ()
#142 0x00002bfaee65a808 in ??? ()
#143 0x00002bfaee65ac08 in ??? ()
#144 0x00002bfaee65b008 in ??? ()
#145 0x00002bfaee65b408 in ??? ()
#146 0x00002bfaee65b808 in ??? ()
#147 0x00002bfaee65bc08 in ??? ()
#148 0x00002bfaee65d008 in ??? ()
#149 0x00002bfaee65d408 in ??? ()
#150 0x00002bfaee65d808 in ??? ()
#151 0x00002bfaee65dc08 in ??? ()
#152 0x00002bfaee65f008 in ??? ()
#153 0x00002bfaee65f408 in ??? ()
#154 0x00002bfaee65f808 in ??? ()
#155 0x00002bfaee65fc08 in ??? ()
#156 0x00002bfaee660008 in ??? ()
#157 0x00002bfaee660408 in ??? ()
#158 0x00002bfaee660808 in ??? ()
#159 0x00002bfaee660c08 in ??? ()
#160 0x00002bfaee661008 in ??? ()
#161 0x00002bfaee661408 in ??? ()
#162 0x00002bfaee661808 in ??? ()
#163 0x00002bfaee661c08 in ??? ()
#164 0x00002bfaee662008 in ??? ()
#165 0x00002bfaee662408 in ??? ()
#166 0x00002bfaee662808 in ??? ()
#167 0x00002bfaee662c08 in ??? ()
#168 0x00002bfaee663008 in ??? ()
#169 0x00002bfaee663408 in ??? ()
#170 0x00002bfaee663808 in ??? ()
#171 0x00002bfaee663c08 in ??? ()
#172 0x00002bfaee665008 in ??? ()
#173 0x00002bfaee665408 in ??? ()
#174 0x00002bfaee665808 in ??? ()
#175 0x00002bfaee665c08 in ??? ()
#176 0x00002bfaee666008 in ??? ()
#177 0x00002bfaee666408 in ??? ()
#178 0x00002bfaee666808 in ??? ()
#179 0x00002bfaee666c08 in ??? ()
#180 0x00002bfaee668008 in ??? ()
#181 0x00002bfaee668408 in ??? ()
#182 0x00002bfaee668808 in ??? ()
#183 0x00002bfaee668c08 in ??? ()
#184 0x00002bfaee669008 in ??? ()
#185 0x00002bfaee669408 in ??? ()
#186 0x00002bfaee669808 in ??? ()
#187 0x00002bfaee669c08 in ??? ()
#188 0x00002bfaee66a008 in ??? ()
#189 0x00002bfaee66a408 in ??? ()
#190 0x00002bfaee66a808 in ??? ()
#191 0x00002bfaee66ac08 in ??? ()
#192 0x00002bfaee66c008 in ??? ()
#193 0x00002bfaee66c408 in ??? ()
#194 0x00002bfaee66c808 in ??? ()
#195 0x00002bfaee66cc08 in ??? ()
#196 0x00002bfaee66d008 in ??? ()
#197 0x00002bfaee66d408 in ??? ()
#198 0x00002bfaee66d808 in ??? ()
#199 0x00002bfaee66dc08 in ??? ()
#200 0x00002bfaee66f008 in ??? ()
#201 0x00002bfaee66f408 in ??? ()
#202 0x00002bfaee66f808 in ??? ()
#203 0x00002bfaee66fc08 in ??? ()
#204 0x00002bfaee670008 in ??? ()
#205 0x00002bfaee670408 in ??? ()
#206 0x00002bfaee670808 in ??? ()
#207 0x00002bfaee670c08 in ??? ()
#208 0x00002bfaee671008 in ??? ()
#209 0x00002bfaee671408 in ??? ()
#210 0x00002bfaee671808 in ??? ()
#211 0x00002bfaee671c08 in ??? ()
#212 0x00002bfaee672008 in ??? ()
#213 0x00002bfaee672408 in ??? ()
#214 0x00002bfaee672808 in ??? ()
#215 0x00002bfaee672c08 in ??? ()
#216 0x00002bfaee674008 in ??? ()
#217 0x00002bfaee674408 in ??? ()
#218 0x00002bfaee674808 in ??? ()
#219 0x00002bfaee674c08 in ??? ()
#220 0x00002bfaee675008 in ??? ()
#221 0x00002bfaee675408 in ??? ()
#222 0x00002bfaee675808 in ??? ()
#223 0x00002bfaee675c08 in ??? ()
#224 0x00002bfaee676008 in ??? ()
#225 0x00002bfaee676408 in ??? ()
#226 0x00002bfaee676808 in ??? ()
#227 0x00002bfaee676c08 in ??? ()
#228 0x00002bfaee677008 in ??? ()
#229 0x00002bfaee677408 in ??? ()
#230 0x00002bfaee677808 in ??? ()
#231 0x00002bfaee677c08 in ??? ()
#232 0x00002bfaee679008 in ??? ()
#233 0x00002bfaee679408 in ??? ()
#234 0x00002bfaee679808 in ??? ()
#235 0x00002bfaee679c08 in ??? ()
#236 0x00002bfaee67b008 in ??? ()
#237 0x00002bfaee67b408 in ??? ()
#238 0x00002bfaee67b808 in ??? ()
#239 0x00002bfaee67bc08 in ??? ()
#240 0x00002bfaee67c008 in ??? ()
#241 0x00002bfaee67c408 in ??? ()
#242 0x00002bfaee67c808 in ??? ()
#243 0x00002bfaee67cc08 in ??? ()
#244 0x00002bfaee67e008 in ??? ()
#245 0x00002bfaee67e408 in ??? ()
#246 0x00002bfaee67e808 in ??? ()
#247 0x00002bfaee67ec08 in ??? ()
#248 0x00002bfaee67f008 in ??? ()
#249 0x00002bfaee67f408 in ??? ()
#250 0x00002bfaee67f808 in ??? ()
#251 0x00002bfaee67fc08 in ??? ()
#252 0x00002bfaee681008 in ??? ()
#253 0x00002bfaee681408 in ??? ()
#254 0x00002bfaee681808 in ??? ()
#255 0x00002bfaee681c08 in ??? ()
#256 0x00002bfaee683008 in ??? ()
#257 0x00002bfaee683408 in ??? ()
#258 0x00002bfaee683808 in ??? ()
#259 0x00002bfaee683c08 in ??? ()
#260 0x00002bfaee684008 in ??? ()
#261 0x00002bfaee684408 in ??? ()
#262 0x00002bfaee684808 in ??? ()
#263 0x00002bfaee684c08 in ??? ()
#264 0x00002bfaee685008 in ??? ()
#265 0x00002bfaee685408 in ??? ()
#266 0x00002bfaee685808 in ??? ()
#267 0x00002bfaee685c08 in ??? ()
#268 0x00002bfaee686008 in ??? ()
#269 0x00002bfaee686408 in ??? ()
#270 0x00002bfaee686808 in ??? ()
#271 0x00002bfaee686c08 in ??? ()
#272 0x00002bfaee688008 in ??? ()
#273 0x00002bfa00000002 in ??? ()
#274 0x00002bfaee688808 in ??? ()
#275 0x00002bfaee688c08 in ??? ()
#276 0x00002bfaee689008 in ??? ()
#277 0x00002bfaee689408 in ??? ()
#278 0x00002bfaee689808 in ??? ()
#279 0x00002bfaee689c08 in ??? ()
#280 0x00002bfaee68a008 in ??? ()
#281 0x00002bfaee68a408 in ??? ()
#282 0x00002bfaee68a808 in ??? ()
#283 0x00002bfaee68ac08 in ??? ()
#284 0x00002bfaee68b008 in ??? ()
#285 0x00002bfaee68b408 in ??? ()
#286 0x00000000ee68b808 in ??? ()
#287 0x000000082f413d90 in ??? () at /lib/libthr.so.3
#288 0x00002bfaeeaf6a48 in ??? ()
#289 0x00002bfaeeaf6bc8 in ??? ()
#290 0x00000101ee68d808 in ??? ()
#291 0x00002bfaee603008 in ??? ()
#292 0x00000000ee68f008 in ??? ()
#293 0x00000008252aaa40 in ??? ()
#294 0x00000000ffffffff in ??? ()
#295 0x000000082da5c38c in ??? () at /lib/libc.so.7
#296 0x0000000000000000 in ??? ()
(gdb)
Comment 4 Shane 2024-07-31 09:20:59 UTC
Created attachment 252389 [details]
maintainer update for graphics/blender

fix pkg-plist
sort options list
Comment 5 Shane 2024-07-31 09:26:39 UTC
(In reply to Vladimir Druzenko from comment #3)

I am able to run blender from wrkdir as well as installed.

Any chance that oiio was not compiled on the system that is building blender? or a dep has been updated since building oiio?
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-31 11:11:00 UTC
(In reply to Shane from comment #5)
SIGILL it's Illegal Instruction - probably it build with SSE4.2, but my CPU doesn't support it:
$ cpuid2cpuflags
CPU_FLAGS_X86: mmx mmxext sse sse2 sse3 ssse3

Ports targeting on base amd64 architecture without even SSE3. I'm working on the possibility of returning the build for older CPUs.

For example this patch is mandatory:
--- build_files/cmake/macros.cmake.orig 2024-06-05 11:47:55 UTC
+++ build_files/cmake/macros.cmake
@@ -546,7 +546,7 @@ macro(TEST_SSE_SUPPORT

   # message(STATUS "Detecting SSE support")
   if(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
-    set(${_sse42_flags} "-march=x86-64-v2")
+#    set(${_sse42_flags} "-march=x86-64-v2")
   elseif(MSVC)
     # msvc has no specific build flags for SSE42, but when using intrinsics it will
     # generate the right instructions.

2 more patches:
--- intern/cycles/kernel/device/cpu/kernel.cpp.orig     2024-06-05 11:47:56 UTC
+++ intern/cycles/kernel/device/cpu/kernel.cpp
@@ -10,9 +10,11 @@
 #if defined(__x86_64__) || defined(_M_X64)
 #  define __KERNEL_SSE__
 #  define __KERNEL_SSE2__
+/*
 #  define __KERNEL_SSE3__
 #  define __KERNEL_SSSE3__
 #  define __KERNEL_SSE42__
+*/
 #endif

 /* When building kernel for native machine detect kernel features from the flags
=================================================================================
--- intern/cycles/util/optimization.h.orig      2024-06-05 11:47:56 UTC
+++ intern/cycles/util/optimization.h
@@ -26,7 +26,9 @@
 #  elif defined(__x86_64__) || defined(_M_X64)

 /* SSE4.2 is our minimum requirement for x86-64 CPUs, so auto enable */
+/*
 #    define __KERNEL_SSE42__
+*/
 /* no SSE4.2 kernel on x86-64, part of regular kernel */
 #    ifdef WITH_KERNEL_AVX2
 #      define WITH_CYCLES_OPTIMIZED_KERNEL_AVX2

But no success yet.
With:
CFLAGS_amd64=-mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2
build fails.
Comment 7 Shane 2024-08-01 09:30:31 UTC
in the port Makefile, you will find at line 201

.if ${ARCH} != aarch64 && ${ARCH} != amd64
CMAKE_ARGS+=	-DWITH_CPU_SIMD:BOOL=OFF
.endif

try forcing WITH_CPU_SIMD=OFF and see if that runs. I think sse used to be an option, we could return that to a portoption instead of setting based on cpu.
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-07 02:35:20 UTC
Created attachment 252577 [details]
v1

We both are right: SIMD option + extra-patch-simd-off.

Test this too please.
Comment 9 Shane 2024-08-07 10:00:11 UTC
Comment on attachment 252577 [details]
v1

Currently, the port Makefile disables WITH_CPU_SIMD if arch is not amd64 or aarch64. These lines will need to be removed. 

To reduce changes, SIMD should be available for amd64 and aarch64 and enabled in OPTIONS_DEFAULT_* for both.

Personally I would add SIMD in OPTIONS_DEFINE and only enable it for known supported archs, allowing anyone to enable it if they think their cpu supports it. I don't know the level of altivec support, but in general you should expect simd support to evolve over time.
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-07 14:34:25 UTC
(In reply to Shane from comment #9)
> Currently, the port Makefile disables WITH_CPU_SIMD if arch is not amd64 or aarch64. These lines will need to be removed.
It use inline instructions from different SSEs, not just -march=xxx to allow supported by compiler SIMD like Altivec. Check file: intern/cycles/util/math_float3.h.
It might be correct to rename the option from SIMD to SSE, but I added "requires x86-64-v2 support" to the description and option is active for amd64 only.

Aarch64 support SSEs by default, isn't it? Why anybody can want to disable it?
Comment 11 Shane 2024-08-08 01:14:46 UTC
(In reply to Vladimir Druzenko from comment #10)

While your patch is specific to disabling x86_64 simd features, blenders WITH_CPU_SIMD is a more general option for any supported cpu, so SIMD would be the correct name.

While there is no need to disable it for aarch64, the option could be turned off if the user chose, the point was more that your patch provides an option that adds cmake flags of WITH_CPU_SIMD=OFF in combination with the existing "CMAKE_ARGS+= -DWITH_CPU_SIMD:BOOL=OFF" we should only have one. If the option is always there, then it will be off by default if arch is not amd64 or aarch64. Users can enable it on other archs and report "this fails on risc-v"... and we can look at adjustments if needed.


Also, can you give me more cpu details, like the cpuid? I'll report these details to blender devs so they may improve the cpu detection to not require this source code patch. They may also be able to enable sse3 and not sse42...
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-08 15:12:27 UTC
> the point was more that your patch provides an option that adds cmake flags of WITH_CPU_SIMD=OFF in combination with the existing "CMAKE_ARGS+= -DWITH_CPU_SIMD:BOOL=OFF" we should only have one
No:
 * amd64: SIMD option exist, -DWITH_CPU_SIMD:BOOL=OFF added only via SIMD option.
 * aarch64: no SIMD option, no -DWITH_CPU_SIMD:BOOL=OFF via CMAKE_ARGS+=.
 * other arches: no SIMD option, -DWITH_CPU_SIMD:BOOL=OFF via CMAKE_ARGS+=.

I can make SIMD option for all arches, by default ON for aarch64 and OFF for others.

> Also, can you give me more cpu details, like the cpuid?
> I'll report these details to blender devs so they may improve
> the cpu detection to not require this source code patch.
> They may also be able to enable sse3 and not sse42...
Core 2 Duo E6750 and Core 2 Quad Q6600.
They are no longer officially supported:
Hardware Requirements
On Windows and Linux a CPU with SSE4.2 is now required. This is supported since AMD Bulldozer (2011) and Intel Nehalem (2008).
https://developer.blender.org/docs/release_notes/4.2/#compatibility
https://projects.blender.org/blender/blender/issues/116592
Comment 13 Shane 2024-08-09 11:54:23 UTC
(In reply to Vladimir Druzenko from comment #12)

The blender cmake option WITH_CPU_SIMD is ON by default. The current port Makefile turns that off if arch is not amd64 or aarch64, so aarch64 currently builds with WITH_CPU_SIMD turned on. That doesn't mean blenders code changes based on that option being enabled when target is aarch64.

See https://cgit.freebsd.org/ports/tree/graphics/blender/Makefile#n203

.if ${ARCH} != aarch64 && ${ARCH} != amd64
CMAKE_ARGS+=	-DWITH_CPU_SIMD:BOOL=OFF
.endif

These lines should be removed, your SIMD option SIMD_CMAKE_BOOL can then be the only location that turns that on/off. Making SIMD available on all archs means it will be off for archs that don't have it set in OPTIONS_DEFAULT_*
Comment 14 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-10 01:14:40 UTC
Created attachment 252642 [details]
v2

I know everything you wrote.
I did as you suggested: on aarch64 default on, on other default off.
Comment 15 Shane 2024-08-10 09:41:36 UTC
Comment on attachment 252642 [details]
v2

Just need to also add SIMD to OPTIONS_DEFAULT_amd64.

Otherwise this is ok
Comment 16 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-10 11:48:26 UTC
(In reply to Shane from comment #15)
> Just need to also add SIMD to OPTIONS_DEFAULT_amd64.
No, this will break work on CPUs without SSE42. But ports targets amd64 for CPUs with SSE2 only.
Comment 17 Shane 2024-08-11 03:07:25 UTC
(In reply to Vladimir Druzenko from comment #16)

Hhmmm, hadn't thought of it that way, I knew the base system was set to work with features common to all cpus, I hadn't thought of ports being that far behind. Makes me glad I never use official ports.

Go ahead with the patch as is it now.
Comment 18 commit-hook freebsd_committer freebsd_triage 2024-08-12 01:37:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12fd1e2633db4c76fa18fa17d983ebe79bb03ff7

commit 12fd1e2633db4c76fa18fa17d983ebe79bb03ff7
Author:     Shane <FreeBSD@ShaneWare.Biz>
AuthorDate: 2024-08-12 01:03:52 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-08-12 01:25:58 +0000

    graphics/blender: update 4.1.1 → 4.2.0

    4.2 LTS: Long term support release, maintained until July 2026.

    Release information:
    https://www.blender.org/download/releases/4-2/
    https://developer.blender.org/docs/release_notes/4.2/
    https://projects.blender.org/blender/blender/milestone/19

    Add patch to allow build and work on generic amd64 with SSE2 only
    because upstream change target platform to x86-64-v2:
    "Hardware Requirements
    On Windows and Linux a CPU with SSE4.2 is now required. This is
    supported since AMD Bulldozer (2011) and Intel Nehalem (2008)."
    https://developer.blender.org/docs/release_notes/4.2/#compatibility
    https://projects.blender.org/blender/blender/issues/116592

    PR:             280459
    Tested by:      vvd

 graphics/blender/Makefile                          |   15 +-
 graphics/blender/Makefile.options                  |   10 +-
 graphics/blender/Makefile.versions                 |    2 +-
 graphics/blender/distinfo                          |    6 +-
 graphics/blender/files/blender.in                  |    2 +-
 graphics/blender/files/extra-patch-simd-off (new)  |   37 +
 graphics/blender/files/patch-CMakeLists.txt        |    4 +-
 .../patch-intern_cycles_CMakeLists.txt (gone)      |   14 -
 ...f2__io__draco__compression__extension.py (gone) |   11 -
 graphics/blender/pkg-plist                         | 2222 +++++++-------------
 10 files changed, 763 insertions(+), 1560 deletions(-)
Comment 19 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-12 01:39:33 UTC
Thanks!