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

Zig run error: failed to inizialize graphic device #3

Open
lnc3l0t opened this issue Mar 18, 2024 · 0 comments
Open

Zig run error: failed to inizialize graphic device #3

lnc3l0t opened this issue Mar 18, 2024 · 0 comments

Comments

@lnc3l0t
Copy link

lnc3l0t commented Mar 18, 2024

I entered a nix shell with nix develop (I think that's what I should call it, but I'm still rusty with nix, sorry).
It successfully fetched the dependencies, but then zig failed to run due to FATAL: Failed to initialize Graphic Device

> zig build run
steps [8/12] zig build-exe example_c_game Debug native... LLD Link... Hello, World
INFO: Initializing raylib 4.6-dev
INFO: Supported raylib modules:
INFO:     > rcore:..... loaded (mandatory)
INFO:     > rlgl:...... loaded (mandatory)
INFO:     > rshapes:... loaded (optional)
INFO:     > rtextures:. loaded (optional)
INFO:     > rtext:..... loaded (optional)
INFO:     > rmodels:... loaded (optional)
INFO:     > raudio:.... loaded (optional)
INFO: DISPLAY: Trying to enable MSAA x4
WARNING: GLFW: Error: 65542 Description: GLX: No GLXFBConfigs returned
WARNING: GLFW: Error: 65545 Description: GLX: Failed to find a suitable GLXFBConfig
WARNING: GLFW: Failed to initialize Window
FATAL: Failed to initialize Graphic Device
run example_c_game: error: the following command exited with error code 1:
raylib-chipmunk-crossplatform-template/zig-out/bin/example_c_game
Build Summary: 10/12 steps succeeded; 1 failed (disable with --summary none)
run transitive failure
└─ run example_c_game failure
error: the following build command failed with exit code 1:
raylib-chipmunk-crossplatform-template/zig-cache/o/9a689c492657987ca705d41db956ebab/build /nix/store/0cphiibdav8rna348csyyzz4wzzid01d-zig-0.11.0/bin/zig raylib-chipmunk-crossplatform-template raylib-chipmunk-crossplatform-template/zig-cache zig run

I've encountered this error multiple times before, so unfortunately, I've never been able to use Raylib with Nix. I've searched for solutions repeatedly while learning, but I'm still unable to find a workaround. Maybe you know of a solution, so I thought I'd ask. Thanks for the great resources!

My setup is Pop!_OS with an NVIDIA card. If I recall correctly, the problem might be related to Nix not properly communicating with the GPU, but I wouldn't bet on the correctness of what I'm saying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant