Fix: shader_builder build #110394

Closed
Ray molenkamp wants to merge 1 commits from LazyDodo/blender:tmp_shader_builder_fix into main

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

somewhat of an oddball, shader_builder is off by default, but clement
mentioned i broke it, so I went out to fix it (It's on by default now
for me locally while testing any build system changes)

Shader_builder should be a fairly light executable that checks if
shaders compile but, since it depends on bf_gpu, which drags in
blenkernel, which drags in all of blender, it's a bit chunkier than one
would hope it would be.

Either way, one of the cleanups in the last week gave it some build
issues which are easily resolved by adding the missing dependency on
bf_bmesh, and once that's fixed, it gave some linker errors, caused by
link order issues due to missing dependencies inside cycles.

  • cycles_util needs to link glog, since log.cpp uses it
  • cycles_scene need to link cycles_graph since shader.cpp uses the node
    api

These changes make it work for now, but I'm fairly confident this wasn't
the last of the link order issues.

somewhat of an oddball, shader_builder is off by default, but clement mentioned i broke it, so I went out to fix it (It's on by default now for me locally while testing any build system changes) Shader_builder should be a fairly light executable that checks if shaders compile but, since it depends on bf_gpu, which drags in blenkernel, which drags in all of blender, it's a bit chunkier than one would hope it would be. Either way, one of the cleanups in the last week gave it some build issues which are easily resolved by adding the missing dependency on bf_bmesh, and once that's fixed, it gave some linker errors, caused by link order issues due to missing dependencies inside cycles. - cycles_util needs to link glog, since log.cpp uses it - cycles_scene need to link cycles_graph since shader.cpp uses the node api These changes make it work for now, but I'm fairly confident this wasn't the last of the link order issues.
Ray molenkamp added 1 commit 2023-07-23 07:25:37 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
3278f852c9
Fix: shader_builder build
somewhat of an oddball, shader_builder is off by default, but clement
mentioned i broke it, so I went out to fix it (It's on by default now
for me locally while testing any build system changes)

Shader_builder should be a fairly light executable that checks if
shaders compile but, since it depends on bf_gpu, which drags in
blenkernel, which drags in all of blender, it's a bit chunkier than one
would hope it would be.

Either way, one of the cleanups in the last week gave it some build
issues which are easily resolved by adding the missing dependency on
bf_bmesh, and once that's fixed, it gave some linker errors, caused by
link order issues due to missing dependencies inside cycles.

- cycles_util needs to link glog, since log.cpp uses it
- cycles_scene need to link cycles_graph since shader.cpp uses the node
api

These changes make it work for now, but I'm fairly confident this wasn't
the last of the link order issues.
Ray molenkamp requested review from Brecht Van Lommel 2023-07-23 07:25:49 +02:00
Author
Member

@brecht more of an fyi to keep you in the loop than a review request, you want to get these in the future when i make minor tweaks to cycles like these? or can i just go ahead with them?

@brecht more of an fyi to keep you in the loop than a review request, you want to get these in the future when i make minor tweaks to cycles like these? or can i just go ahead with them?
Author
Member

@blender-bot build

@blender-bot build
Author
Member

@brecht that ODR violation inside OSL on mac, appears to be real, OSL is including the flex/bison generated code in both oslcomp and oslexec which is bad thing.

https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/src/liboslexec/CMakeLists.txt#L151

taking out that line seems ok on windows (be sure to remove the build folder so a stale copy of the generated files doesn't hang around) since i don't have a mac , i can't really test you mind taking a closer look here?

@brecht that ODR violation inside OSL on mac, appears to be real, OSL is including the flex/bison generated code in both oslcomp and oslexec which is bad thing. https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/src/liboslexec/CMakeLists.txt#L151 taking out that line seems ok on windows (be sure to remove the build folder so a stale copy of the generated files doesn't hang around) since i don't have a mac , i can't really test you mind taking a closer look here?
Author
Member

Given there's no guarantee fixing OSL will be the final battle here, i'm opting to revert last weeks work, paying whack a mole with the buildsystem isn't a sustainable way forward with other teams depending on certain tools be building reliably.

revert in #110438

Given there's no guarantee fixing OSL will be the final battle here, i'm opting to revert last weeks work, paying whack a mole with the buildsystem isn't a sustainable way forward with other teams depending on certain tools be building reliably. revert in #110438
Ray molenkamp closed this pull request 2023-07-25 01:18:54 +02:00

Sorry for the delay. I've now updated the macOS OSL libraries to solve the problem.

Sorry for the delay. I've now updated the macOS OSL libraries to solve the problem.

So is this patch going to be revived or not? main isn't broken at the moment but would be cool to have the cmake improvements back.

So is this patch going to be revived or not? `main` isn't broken at the moment but would be cool to have the cmake improvements back.
Author
Member

Eventually all of that will make it back in, that work was done when i had lots of time to spare, currently much less so, if there's specific projects you'd like to be done, you can always hit me up on chat though, if it's doable i'll make it work. but the days I did multiple a day won't be happening for a bit. Also given blenkernel turned out a bit of an unstable beast, i'll likely make my way from the smaller libs to the bigger ones (ie don' task for blenkernel)

Eventually all of that will make it back in, that work was done when i had lots of time to spare, currently much less so, if there's specific projects you'd like to be done, you can always hit me up on chat though, if it's doable i'll make it work. but the days I did multiple a day won't be happening for a bit. Also given blenkernel turned out a bit of an unstable beast, i'll likely make my way from the smaller libs to the bigger ones (ie don' task for blenkernel)
Some checks failed
buildbot/vexp-code-patch-coordinator Build done.

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
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 project
No Assignees
3 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#110394
No description provided.