WIP: MacOS arm_x64 library updates #123290

Closed
Raul Fernandez Hernandez wants to merge 364 commits from farsthary/blender:macos_armx64_libs_update into blender-v4.2-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Subtask of #118455

Tested and Blender and dependencies compiles correctly on macos.

Subtask of #118455 Tested and Blender and dependencies compiles correctly on macos.
Raul Fernandez Hernandez added 2 commits 2024-06-17 00:19:24 +02:00
update
Some checks failed
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
11abc33cd9
Raul Fernandez Hernandez added this to the Platforms, Builds Tests & Devices project 2024-06-17 00:19:30 +02:00
Raul Fernandez Hernandez requested review from Brecht Van Lommel 2024-06-17 00:20:24 +02:00
Brecht Van Lommel requested changes 2024-06-17 01:22:37 +02:00
Brecht Van Lommel left a comment
Owner

The title says arm_x64, but only includes arm64. Are the x64 libs still coming?

openimagedenoise/lib/cmake was removed. I guess it's because the version number does not match the folder name on disk. Maybe it's as simple as this to fix, but have not tested:

diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake
index eadbebd..91e7ceb 100644
--- a/build_files/build_environment/cmake/harvest.cmake
+++ b/build_files/build_environment/cmake/harvest.cmake
@@ -230,7 +230,7 @@ else()
   )
   harvest(openimagedenoise/include openimagedenoise/include "*")
   harvest_rpath_lib(openimagedenoise/lib openimagedenoise/lib "*${SHAREDLIBEXT}*")
-  harvest(openimagedenoise/lib/cmake/OpenImageDenoise-${OIDN_VERSION} openimagedenoise/lib/cmake/OpenImageDenoise "*.cmake")
+  harvest(openimagedenoise/lib/cmake openimagedenoise/lib/cmake "*")
   harvest(embree/include embree/include "*.h")
   harvest(embree/lib embree/lib "*.a")
   harvest_rpath_lib(embree/lib embree/lib "*${SHAREDLIBEXT}*")
The title says `arm_x64`, but only includes `arm64`. Are the `x64` libs still coming? `openimagedenoise/lib/cmake` was removed. I guess it's because the version number does not match the folder name on disk. Maybe it's as simple as this to fix, but have not tested: ``` diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index eadbebd..91e7ceb 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -230,7 +230,7 @@ else() ) harvest(openimagedenoise/include openimagedenoise/include "*") harvest_rpath_lib(openimagedenoise/lib openimagedenoise/lib "*${SHAREDLIBEXT}*") - harvest(openimagedenoise/lib/cmake/OpenImageDenoise-${OIDN_VERSION} openimagedenoise/lib/cmake/OpenImageDenoise "*.cmake") + harvest(openimagedenoise/lib/cmake openimagedenoise/lib/cmake "*") harvest(embree/include embree/include "*.h") harvest(embree/lib embree/lib "*.a") harvest_rpath_lib(embree/lib embree/lib "*${SHAREDLIBEXT}*") ```
@ -172,3 +172,3 @@
theora theoradec theoraenc vorbis vorbisenc
vorbisfile vpx x264)
vorbisfile vpx x264 x265)
if(EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a)

Use if(EXISTS for x265 like aom. It's a bit more convenient for bisecting if the build system works with different versions of the library.

Use `if(EXISTS` for x265 like aom. It's a bit more convenient for bisecting if the build system works with different versions of the library.

Might as well check if it works on the buildbot already:

@blender-bot build macos-arm64

Might as well check if it works on the buildbot already: @blender-bot build macos-arm64

Also, this PR should be targeted at the 4.2 branch, not main.

Also, this PR should be targeted at the 4.2 branch, not main.

There are some built errors. It seems OpenImageIO was linked against the homebrew libjpeg instead of our own?

Maybe the JPEG paths in build_files/build_environment/cmake/openimageio.cmake do not correspond to files that exist? Or there was some change in the OpenImageIO build system that we need to account for, like different CMake variable names?

You can check locally if the resulting Blender binary depends on any libs that it shouldn't. You can compare it with the output from a current daily build. There should be nothing homebrew in there.

otool -L Blender.app/Contents/MacOS/Blender
There are some built errors. It seems OpenImageIO was linked against the homebrew libjpeg instead of our own? Maybe the JPEG paths in `build_files/build_environment/cmake/openimageio.cmake` do not correspond to files that exist? Or there was some change in the OpenImageIO build system that we need to account for, like different CMake variable names? You can check locally if the resulting Blender binary depends on any libs that it shouldn't. You can compare it with the output from a current daily build. There should be nothing homebrew in there. ``` otool -L Blender.app/Contents/MacOS/Blender ```
Raul Fernandez Hernandez requested review from Ray molenkamp 2024-06-17 07:18:53 +02:00
Author
Member

Thanks for the feedback.I'll address them asap. Unfortunately currently don't have an intel mac to build locally the libs, just the M1 MBA

Thanks for the feedback.I'll address them asap. Unfortunately currently don't have an intel mac to build locally the libs, just the M1 MBA
Author
Member

I may need to duplicate blender repo because switching back and forth between sculpt branches and library tests mess up the submodules.

I may need to duplicate blender repo because switching back and forth between sculpt branches and library tests mess up the submodules.
The x64 libraries can be built on the M1. https://developer.blender.org/docs/handbook/release_process/build/macos/#x86_64-cross-compilation
Raul Fernandez Hernandez changed target branch from main to blender-v4.2-release 2024-06-17 23:09:01 +02:00
Author
Member

Oops rebasing to release spell troubles with so much divergence and deps submodules. Better start fresh from release branch

Oops rebasing to release spell troubles with so much divergence and deps submodules. Better start fresh from release branch

We have documentation for this:
https://developer.blender.org/docs/handbook/contributing/pull_requests/#rebasing-a-pull-request

But manually cherry-picking a few commits is about the same amount of work, so starting fresh works too.

We have documentation for this: https://developer.blender.org/docs/handbook/contributing/pull_requests/#rebasing-a-pull-request But manually cherry-picking a few commits is about the same amount of work, so starting fresh works too.
Author
Member

Closing as this PR gets replaced by #123348
for a clean slate

Closing as this PR gets replaced by #123348 for a clean slate
Some checks failed
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-coordinator Build done.

Pull request closed

Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#123290
No description provided.