XNM1 / linux-nixos-hyprland-config-dotfiles

Linux 🐧 configuration based on NixOS ❄️, Hyprland, and Catppuccin Macchiato theme 😸 for a consistent, complete, and customizable experience. 🚀
MIT License
286 stars 21 forks source link

Build failure for surrealist-embed and wasm-streams on NixOS due to linking error with lld #12

Open Dodo5393 opened 1 week ago

Dodo5393 commented 1 week ago

I encountered a build failure while attempting to rebuild my NixOS system configuration using the nixos-rebuild switch --flake /etc/nixos#nixos command. The error seems to be related to linking with lld. Below is the relevant portion of the error message:

sudo nixos-rebuild switch --flake /etc/nixos#nixos
building the system configuration...
error: builder for '/nix/store/80ivx2hmnq33y14ngb8j18304lm28z89-surrealist-embed-1.11.7.drv' failed with exit code 101;
       last 10 log lines:
       >    Compiling async-recursion v1.1.0
       > error: linking with `lld` failed: exit status: 1
       >   |
       >           
       >
       > error: could not compile `wasm-streams` (lib) due to 1 previous error
       > warning: build failed, waiting for other jobs to finish...
       > /nix/store/d3dzfy4amjl826fb8j00qp1d9887h7hm-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/80ivx2hmnq33y14ngb8j18304lm28z89-surrealist-embed-1.11.7.drv'.
error: 1 dependencies of derivation '/nix/store/vr5ik79wscylf66nd0qp1jr76zfiw4ic-surrealist-1.11.7.drv' failed to build
error: 1 dependencies of derivation '/nix/store/glxk8w1ja5kspy60h7pklvlz4d2sz9kk-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/cz5qx12imyld9b6ls1xb8z9a8j5ggsjw-surrealist-1.11.7_fish-completions.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-surrealdb-1.5.3.drv-3/source/target/x86_64-unknown-linux-gnu/release/deps': Directory not empty
error: 1 dependencies of derivation '/nix/store/795hra0jqnn3ca4j36j3765q779gz2nb-system-path.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-systemd-255.6.drv-1/source/build': Directory not empty
error: 1 dependencies of derivation '/nix/store/rqxpipxk6ixmmqbml0zz2097fd1g6iwz-nixos-system-nixos-24.11.20240620.d603719.drv' failed to build

I have run sudo nix-channel --add https://nixos.org/channels/nixos-24.05 nixos Update the channels using sudo nix-channel --update Attempt to rebuild the system with sudo nixos-rebuild switch --flake /etc/nixos#nixos

Dodo5393 commented 1 week ago

i have comment also line rust.nix and wasm.nix in flake.nix file and still same.

XNM1 commented 1 week ago

Hi,

For now, I recommend commenting out or deleting the following packages from nixos/utils.nix: surrealdb, surrealdb-migrations, and surrealist. Alternatively, you can comment out just the package that I believe is causing the error: surrealist. An error might occur when you try to build (compile) surrealist during a system rebuild. I recently encountered this same issue and had to comment these out on my system as well.

I want to highlight that my configuration is quite bloated; it includes many packages that you probably don't need. Sometimes, when nixpkgs updates, some packages (usually not critical to the system) might break. If you encounter similar errors during a system update and rebuild, check which package is causing the error. If it’s not necessary, just comment it out or delete it from the config.

Dodo5393 commented 1 week ago

thx you now its okay

Dodo5393 commented 1 week ago

But there is a one more problem , i cant open terminal.

Dodo5393 commented 1 week ago

But there is a one more problem , i cant open terminal. only retro cool works

XNM1 commented 1 week ago

To fix an issue with a non-working terminal, you need to disable Wayland rendering for WezTerm:

  1. Open the configuration file located at ~/.config/wezterm/wezterm.lua.
  2. Find the line that reads enable_wayland = true;.
  3. Change true to false, so it reads enable_wayland = false;.
XNM1 commented 1 week ago

Also, the terminal may appear slightly pixelated on large screens because it will render through xdg-desktop-portal, and X does not scale well.