both blender and blender-hip produce the same output:
EGL Error (0x3000): EGL_SUCCESS: The last function succeeded without error.
EGL Error (0x3000): EGL_SUCCESS: The last function succeeded without error.
EGL Error (0x3000): EGL_SUCCESS: The last function succeeded without error.
EGL Error (0x3000): EGL_SUCCESS: The last function succeeded without error.
Writing: /tmp/blender.crash.txt
Blender is a 3D Graphics Software, it’ll do that if you run it on an iPhone
I have boot.loader.initrd.kernelModules = ["amdgpu"]; and environment.systemPackages = with pkgs; [blender-hip]; in configuration.nix with all libvirt/qemu settings disabled for the build test — unless something’s still cached in /nix/store from 2 years ago this should be running without misunderstanding that can only be fixed by a 黑客 chinaman
Yes, what I mean is you’re not getting useful error messages that you’d expect before the window is created, and then intransparent messages from EGL. Looks to me like the portion of blender that’s confined to the CPU starts up “fine”, attempts to initiate rendering itself, and fails before the window is created.
Some intuition helps when debugging software, but this is a guess, hence my stating it tongue-in-cheek as “graphicsey”.
This could be caused by many things, very hard to tell without knowing more about what’s going on.
What about all the other things you mention you have “installed”? I mention this specifically because environment.systemPackages is not sufficient for everything, but many new users assume so.
What build test, why would this be relevant? Are you running blender headless or in a nix derivation?
Are you using NixOS? Caching in /nix/store is impossible, the store is read-only. I’d implicated a cache in your home directory, under the assumption that you’re just starting blender on a desktop, I wouldn’t expect someone building something more advanced to just say nothing about it.
Please give a lot more detail about what you’re trying to accomplish, how you’re doing it, and share your full configuration. It’s very hard to divine the source of a problem from nothing but the error messages you shared, though I’ll grant not always impossible.
when I download any release of blender from blender.org/download and run ./blender from the extracted directory the output is ./blender: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
I had an older version of blender installed via nix-env and once I deleted that the blender installation from configuration.nix had successfully booted to a usable window.
I’m still unable to run the binary from Download — Blender though - it’s unable to find any system dependencies on NixOS and I can only get to the following, which oddly looks so similar to the behavior in OP; the /tmp/blender.crash.txt produced by this command is the same too:
LD_LIBRARY_PATH=/nix/store/36hi8pih3syxja76ilvg2ff0zv9av0vh-libX11-1.8.11/lib:/nix/store/7ygszkkili3kfqh789ivdgrhyrjshm5n-libXrender-0.9.11/lib:/nix/store/7rscqgvi6hh4dgwzisnkg2r5clwjxmnr-libxfixes-6.0.1/lib:/nix/store/mcr8zrlyg2r6idl6ks60858q5q0i6i2a-libXi-1.8.2/lib:/nix/store/v5wvqz9hwb8n70xxqs097kz5k3bvflq8-libxkbcommon-1.7.0/lib:/nix/store/s30wwji6v3i5msh0s3fl4d0xli6jckcd-libSM-1.2.4/lib:/nix/store/y5zp3jsfbd5pr1776p1wzq46cy2icrv2-libICE-1.1.2/lib:/nix/store/ri85b3kn22dmr4yiimfsgd6r5x7zgk4z-libglvnd-1.7.0/lib:/nix/store/v5s2s61b37pmjkdaliad1hcxk18apmm7-wayland-1.23.1/lib:/nix/store/wfs68yp1zhsm6xrx7hkb5xz2gm0rjb63-libdecor-0.2.3/lib ./blender-4.5.3-linux-x64/blender
EGL Error (0x3000): EGL_SUCCESS: The last function succeeded without error.
EGL Error (0x3000): EGL_SUCCESS: The last function succeeded without error.
EGL Error (0x3000): EGL_SUCCESS: The last function succeeded without error.
EGL Error (0x3000): EGL_SUCCESS: The last function succeeded without error.
Writing: /tmp/blender.crash.txt
Segmentation fault (core dumped) LD_LIBRARY_PATH=/nix/store/36hi8pih3syxja76ilvg2ff0zv9av0vh-libX11-1.8.11/lib:/nix/store/7ygszkkili3kfqh789ivdgrhyrjshm5n-libXrender-0.9.11/lib:/nix/store/7rscqgvi6hh4dgwzisnkg2r5clwjxmnr-libxfixes-6.0.1/lib:/nix/store/mcr8zrlyg2r6idl6ks60858q5q0i6i2a-libXi-1.8.2/lib:/nix/store/v5wvqz9hwb8n70xxqs097kz5k3bvflq8-libxkbcommon-1.7.0/lib:/nix/store/s30wwji6v3i5msh0s3fl4d0xli6jckcd-libSM-1.2.4/lib:/nix/store/y5zp3jsfbd5pr1776p1wzq46cy2icrv2-libICE-1.1.2/lib:/nix/store/ri85b3kn22dmr4yiimfsgd6r5x7zgk4z-libglvnd-1.7.0/lib:/nix/store/v5s2s61b37pmjkdaliad1hcxk18apmm7-wayland-1.23.1/lib:/nix/store/wfs68yp1zhsm6xrx7hkb5xz2gm0rjb63-libdecor-0.2.3/lib ./blender-4.5.3-linux-x64/blender
So I’ll keep the post open until I can run or build or both build and run Download — Blender sucessfully on NixOS.
This is true for any non-nix-built binaries. NixOS doesn’t have globally installed libraries. For the binary to even get that far you must be using nix-ld. Use nix-ld to install the additional libraries, or use the nix package instead of using that hack.
Interesting, this might mean that you’re getting some library mismatches.
currently trying to set up nix-ld but enable = true; isn’t installing the nix-ld binary
everything else: programs.nix-ld = import /etc/nixos/nix-ld.nix { inherit pkgs; };
and libraries = with pkgs; [ packages ];
is working fine though
according to NixOS Search programs.nix-ld.enable is currently functional - I’m not sure why so far it’s only worked when added to environment.systemPackages and via nix-shell -p nix-ld and not enable = true
according to a lot of annoying people on here, this is a very important thing in NixOS that I should prioritize fixing immediately so as not to clutter systemPackages and improve my overall configuration.nix
also here’s the current nix-ld ./blender output. It creates a black window that can only be exited by ctrl+c in terminal or closing the terminal:
nix-ld ./blender
Color management: Using fallback mode for management
WARN (translation.language): source/blender/blentranslation/intern/blt_lang.cc:72 fill_locales: 'locale' data path for translations not found
Color management: scene view "AgX" not found, setting default "Standard".
blf_load_font_default: 'fonts' data path not found for 'Inter.woff2', will not be able to display text
blf_load_font_default: 'fonts' data path not found for 'DejaVuSansMono.woff2', will not be able to display text
blf_load_font_default: 'fonts' data path not found for 'DejaVuSansMono.woff2', will not be able to display text
blf_load_font_default: 'fonts' data path not found for 'Inter.woff2', will not be able to display text
blf_load_font_default: 'fonts' data path not found for 'DejaVuSansMono.woff2', will not be able to display text
Font data directory "fonts/" could not be detected!
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '/nix/store/qhw0sp183mqd04x5jp75981kwya64npv-glibc-2.40-66/lib/ld-linux-x86-64.so.2'
isolated = 1
environment = 0
user site = 0
safe_path = 1
import site = 1
is in build tree = 0
stdlib dir = '/home/builder/build_linux/deps_x64/Release/python/lib/python3.11'
sys._base_executable = '/run/current-system/sw/bin/python'
sys.base_prefix = '/home/builder/build_linux/deps_x64/Release/python'
sys.base_exec_prefix = '/home/builder/build_linux/deps_x64/Release/python'
sys.platlibdir = 'lib'
sys.executable = '/run/current-system/sw/bin/python'
sys.prefix = '/home/builder/build_linux/deps_x64/Release/python'
sys.exec_prefix = '/home/builder/build_linux/deps_x64/Release/python'
sys.path = [
'/home/builder/build_linux/deps_x64/Release/python/lib/python311.zip',
'/home/builder/build_linux/deps_x64/Release/python/lib/python3.11',
'/home/builder/build_linux/deps_x64/Release/python/lib/python3.11/lib-dynload',
]
Internal error initializing Python!
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f8b3551a780 (most recent call first):
<no Python frame>
with
{ pkgs }:
{
enable = true;
libraries = with pkgs; [
xorg.libX11
xorg.libXrender
xorg.libXfixes
xorg.libXi
xorg.libSM
xorg.libICE
libdecor
libglvnd
libxkbcommon
wayland
# the following doesn't change the output but I'll list it here for reference of what has already been tried
python311
python311Packages.setuptools
python311Packages.numpy
python311Packages.pillow
python311Packages.requests
python311Packages.certifi
python311Packages.chardet
python311Packages.idna
python311Packages.pyyaml
python311Packages.packaging
python311Packages.markupsafe
python311Packages.jinja2
];
}