Skip to content

Build failure: pkgsMusl.bun #280716

Open
Open

Description

@superherointj

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix build .#pkgsMusl.bun

Build log

Running phase: fixupPhase
shrinking RPATHs of ELF executables and libraries in /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21
shrinking /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin/bun
checking for references to /build/ in /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21...
patching script interpreter paths in /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21
stripping (with command strip and flags -S -p) in  /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin
automatically fixing dependencies for ELF files
{'append_rpaths': [],
 'extra_args': [],
 'ignore_missing': [],
 'libs': [PosixPath('/nix/store/g0paxdz0f7kpy7ss3kvashvs7nrlvy1d-openssl-3.0.12-dev/lib'),
          PosixPath('/nix/store/c164kdh023c9wprvqliyhn0s9pzdh72a-openssl-3.0.12-bin/lib'),
          PosixPath('/nix/store/w09g2k7mb3gx58vzx2w2nl1wp1ybn1ay-openssl-3.0.12/lib')],
 'paths': [PosixPath('/nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21')],
 'recursive': True,
 'runtime_dependencies': []}
setting interpreter of /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin/bun
searching for dependencies of /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin/bun
    libc.so.6 -> not found!
    ld-linux-x86-64.so.2 -> not found!
    libpthread.so.0 -> not found!
    libdl.so.2 -> not found!
    libm.so.6 -> not found!
auto-patchelf: 5 dependencies could not be satisfied
error: auto-patchelf could not satisfy dependency libc.so.6 wanted by /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin/bun
error: auto-patchelf could not satisfy dependency ld-linux-x86-64.so.2 wanted by /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin/bun
error: auto-patchelf could not satisfy dependency libpthread.so.0 wanted by /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin/bun
error: auto-patchelf could not satisfy dependency libdl.so.2 wanted by /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin/bun
error: auto-patchelf could not satisfy dependency libm.so.6 wanted by /nix/store/64r2z4dif068gwyqx0n3m9spd0r8n3za-bun-1.0.21/bin/bun
auto-patchelf failed to find all the required dependencies.
Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
/nix/store/hrgq8bpilvkfnyvbxr77i7qaj6g9ijvl-stdenv-linux/setup: line 74: pop_var_context: head of shell_variables not a function context
/nix/store/hrgq8bpilvkfnyvbxr77i7qaj6g9ijvl-stdenv-linux/setup: line 1450: pop_var_context: head of shell_variables not a function context
/nix/store/hrgq8bpilvkfnyvbxr77i7qaj6g9ijvl-stdenv-linux/setup: line 1553: pop_var_context: head of shell_variables not a function context

Log file: bun.txt

Additional context

Seems to be broken in upstream, but I'm still opening this issue to track a solution to this.
Also, to mark package broken for Musl while issue isn't resolved. (Which needs an issue of reference for tracking the breakage.)

Notify maintainers

@DAlperin @jk @thilobillerbeck @cdmistman @coffeeispower

Activity

  1. added
    6.topic: musl
    on Oct 18, 2024
  2. imide commented on Nov 26, 2024

    @imide

    Bun officially supports musl, as of 1.1.35.
    https://bun.sh/blog/bun-v1.1.35

    I am going to try to update the bun package, however this is my first contribution to nixpkgs, so expect mistakes lol 😅

  3. gleachkr commented on Mar 14, 2025

    @gleachkr

    @imide, any luck?

  4. knazarov commented on Mar 26, 2025

    @knazarov
    Contributor

    The package for bun in nixpkgs downloads binary releases of bun. It doesn't build them from source. And the bun release links with musl libc dynamically (likely to be able to run it on Alpine Linux).
    To make static linking work, the nix derivation for bun needs to build it from source.

    UPD: sorry, you mentioned just musl (and not pkgsStatic, which is musl + static linking)

  5. added
    2.status: stale
    on Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failure2.status: stale6.topic: musl

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions