Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blender: fix runtime crash by adding missing wayland-scanner, enable strict build options #340100

Merged
merged 3 commits into from
Sep 7, 2024

Conversation

amarshall
Copy link
Member

@amarshall amarshall commented Sep 6, 2024

See individual commits for details.

Caused by #214906
Fixes #340080

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Without this, it crashes on launch or render when using (at least)
Nvidia GPUs. Blender build needs this, but currently only warns during
build.

See also:
NixOS#214906
NixOS#340080
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@veprbl
Copy link
Member

veprbl commented Sep 6, 2024

3 packages failed to build:
blender blender-hip blendfarm
-- Could NOT find OptiX (missing: OPTIX_INCLUDE_DIR) (Required is at least version "7.3.0")
CMake Error at build_files/cmake/macros.cmake:1408 (message):
  OptiX required but not found
Call Stack (most recent call first):
  intern/cycles/CMakeLists.txt:284 (set_and_warn_library_found)

Blender build will, by default, warn for most missing libs and silently
disable the feature. This can cause unexpected behavior, so instead flip
its option to turn those warnings into errors. This, for example, would
have caught at build time (rather than runtime) the previously-missing
wayland-scanner dependency that caused crashes.

As a result, adjust existing build config to reflect reality and fix the
“new” errors.
@amarshall
Copy link
Member Author

Updated.

Result of nixpkgs-review run on x86_64-linux 1

3 packages built:
  • blender
  • blender-hip
  • blendfarm

Copy link
Member

@sifmelcara sifmelcara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran nixpkgs-review, confirmed 3 packages built, their binary works, and fixes the issue 👍

@ofborg ofborg bot requested a review from veprbl September 6, 2024 23:57
@veprbl veprbl merged commit b30a03d into NixOS:master Sep 7, 2024
27 of 29 checks passed
@amarshall amarshall deleted the blender-fix branch September 7, 2024 01:58
ryan4yin added a commit to ryan4yin/nix-config that referenced this pull request Sep 19, 2024
fix:  advanced-scene-switcher failed to compile, persist blender user directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

blender segmentation fault with Nvidia card (regression)
3 participants