linux-nixos-hyprland-config-dotfiles icon indicating copy to clipboard operation
linux-nixos-hyprland-config-dotfiles copied to clipboard

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

Open Dodo5393 opened this issue 1 year ago β€’ 7 comments

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 avatar Jun 22 '24 13:06 Dodo5393

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

Dodo5393 avatar Jun 22 '24 14:06 Dodo5393

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.

XNM1 avatar Jun 22 '24 14:06 XNM1

thx you now its okay

Dodo5393 avatar Jun 22 '24 14:06 Dodo5393

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

Dodo5393 avatar Jun 22 '24 15:06 Dodo5393

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

Dodo5393 avatar Jun 22 '24 15:06 Dodo5393

To fix this issue with a non-working WezTerm terminal, open ~/.config/wezterm/wezterm.lua and change enable_wayland = true to enable_wayland = false

XNM1 avatar Jun 22 '24 15:06 XNM1

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

XNM1 avatar Jun 22 '24 15:06 XNM1