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

mastodon-modules: build failure #380366

Closed
3 tasks done
siflfran opened this issue Feb 8, 2025 · 2 comments · Fixed by #381428
Closed
3 tasks done

mastodon-modules: build failure #380366

siflfran opened this issue Feb 8, 2025 · 2 comments · Fixed by #381428
Labels
0.kind: bug Something is broken

Comments

@siflfran
Copy link

siflfran commented Feb 8, 2025

Nixpkgs version

  • Unstable (25.05)

Describe the bug

mastodon-modules fails in fixupPhase.

Steps to reproduce

nix-shell -p mastodon

Expected behaviour

mastodon-modules builds without error

Screenshots

No response

Relevant log output

Running phase: fixupPhase
shrinking RPATHs of ELF executables and libraries in /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3
shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/prebuilds/linux-x64/utf-8-validate.node
shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/prebuilds/linux-x64/utf-8-validate.musl.node
shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/build/Release/validation.node
shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/build/Release/obj.target/validation.node
shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/build/Release/obj.target/validation/src/validation.o
patchelf: wrong ELF type
shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/build/Release/obj.target/validation/deps/is_utf8/src/is_utf8.o
patchelf: wrong ELF type
shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node
checking for references to /build/ in /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3...
patchelf: wrong ELF type
patchelf: wrong ELF type
patching script interpreter paths in /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3
ERROR: noBrokenSymlinks: the symlink /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/@mastodon/streaming points to a missing target /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/streaming
ERROR: noBrokenSymlinks: found 1 dangling symlinks and 0 reflexive symlinks
error: builder for '/nix/store/nkvhwanxyldkkfyma1wzxrh60id2qq8m-mastodon-modules-4.3.3.drv' failed with exit code 1;
       last 25 log lines:
       > DEPRECATION WARNING: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
       >
       > More info: https://sass-lang.com/d/legacy-js-api
       >
       >
       > ➤ YN0000: Done in 0s
       > buildPhase completed in 58 seconds
       > Running phase: installPhase
       > Running phase: fixupPhase
       > shrinking RPATHs of ELF executables and libraries in /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3
       > shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/prebuilds/linux-x64/utf-8-validate.node
       > shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/prebuilds/linux-x64/utf-8-validate.musl.node
       > shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/build/Release/validation.node
       > shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/build/Release/obj.target/validation.node
       > shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/build/Release/obj.target/validation/src/validation.o
       > patchelf: wrong ELF type
       > shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/utf-8-validate/build/Release/obj.target/validation/deps/is_utf8/src/is_utf8.o
       > patchelf: wrong ELF type
       > shrinking /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/bufferutil/prebuilds/linux-x64/node.napi.node
       > checking for references to /build/ in /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3...
       > patchelf: wrong ELF type
       > patchelf: wrong ELF type
       > patching script interpreter paths in /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3
       > ERROR: noBrokenSymlinks: the symlink /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/node_modules/@mastodon/streaming points to a missing target /nix/store/ghwp2jgvs9h8k6r4csvkka7ydkqw5ym1-mastodon-modules-4.3.3/streaming
       > ERROR: noBrokenSymlinks: found 1 dangling symlinks and 0 reflexive symlinks
       For full logs, run 'nix log /nix/store/nkvhwanxyldkkfyma1wzxrh60id2qq8m-mastodon-modules-4.3.3.drv'.
error: 1 dependencies of derivation '/nix/store/akb60ys3f7yjjd913r0spfajy02p8jnr-mastodon-4.3.3.drv' failed to build

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.13.1, NixOS, 25.05 (Warbler), 25.05.20250207.dd81bdc
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.25.5
  • channels(…): "home-manager, nixgl, nixpkgs"
  • channels(root): "nixos"
  • nixpkgs: /home/…/.nix-defexpr/channels/nixpkgs

Notify maintainers

@erictapen @Izorkin @ghuntley @happy-river

Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@MarkRijckenberg
Copy link

Likely root cause of issue is here: #370750 (stdenv: add no-broken-symlinks hook #370750)

The hook can be disabled by setting dontCheckForBrokenSymlinks , but that is an ugly workaround, not a real fix.

Correct solution is to fix the dangling symlink issue in the mastodon-modules-4.3.3 code.

@networkException
Copy link
Member

The symlink causing the failure is created by yarn for the streaming workspace. I'm not quite sure why that is, the root workspace doesn't depend on streaming directly.

But even if its intended by upstream in some way the link would be useless in our build, it can be removed safely. A fix could look like this

services.mastodon.package = pkgs.mastodon.overrideAttrs (old: {
  mastodonModules = old.mastodonModules.overrideAttrs (old: {
    # FIXME: Remove once fixed in nixpkgs. See https://github.com/NixOS/nixpkgs/issues/380366
    postBuild = ''
      # Remove workspace "package" as it contains broken symlinks
      rm -r ~/node_modules/@mastodon
    '';
  });
});

Ideally we could just tell yarn to not create the link though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants