Repository navigation
Open
Labels
0.kind: build failureA package fails to build2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: muslRunning or building packages with musl libc
Description
Steps To Reproduce
Steps to reproduce the behavior:
- 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
- Musl LibC Support oven-sh/bun#918
- https://github.com/LowByteFox/bun-musl
- https://pkgs.alpinelinux.org/packages?name=bun&branch=edge&repo=&arch=&maintainer=
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
Reacted by Graham Leach-Krouse
Metadata
Metadata
Assignees
Labels
0.kind: build failureA package fails to build2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: muslRunning or building packages with musl libc
Activity
pkgsMusl.bun: mark broken for musl
imide commentedon Nov 26, 2024
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 😅
gleachkr commentedon Mar 14, 2025
@imide, any luck?
knazarov commentedon Mar 26, 2025
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)