Hi there,
I'm on MacOS, and I'm trying to build Roc inside a podman container. Unfortunately, it's failing.
I'm using the docker.io/nixos/nix image. I mounted a volume containing the source code in /root/roc
, and I ran:
nix --extra-experimental-features nix-command --extra-experimental-features flakes develop
Which dropped me into a shell with all the tools. I then ran:
cargo run help
Unfortunately, I'm getting a linking error:
...
e0.rlib" "-Wl,-Bdynamic" "-lffi" "-lrt" "-ldl" "-lm" "-lz" "-ltinfo" "-lxml2" "-lstdc++" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/nix/store/ln21g71ac6zrbyx1jcmjbd291zhz501z-rust-default-1.77.2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/root/roc/target/debug/deps/roc-28b29c5f103d558d" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: /nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin/ld: line 269: 17912 Killed /nix/store/hqvni28zpibl6jsqqimcvng6h6qm58xy-binutils-2.41/bin/ld ${extraBefore+"${extraBefore[@]}"} ${params+"${params[@]}"} ${extraAfter+"${extraAfter[@]}"}
collect2: error: ld returned 137 exit status
error: could not compile `roc_cli` (bin "roc") due to 1 previous error
Caused by:
process didn't exit successfully: `CARGO=/nix/store/y6dy3mc9iskwhbhsprjr9k286hxyhvfv-cargo-1.77.2-x86_64-unknown-linux-gnu/bin/cargo CARGO_BIN_NAME=roc CARGO_CRATE_NAME=roc CARGO_MANIFEST_DIR=/root/roc/crates/cli CARGO_PKG_AUTHORS='The Roc Contributors' CARGO_PKG_DESCRIPTION='The Roc binary that brings together all functionality in the Roc toolset.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=UPL-1.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=roc_cli CARGO_PKG_README='' CARGO_PKG_...
Any help would be greatly appreciated! :smile:
Mmmh... I hadn't noticed the 17912 Killed
message. It looks like a process got killed. Perhaps my container doesn't have enough RAM? I'll try this:
podman machine stop
podman machine set --cpus 4 --memory 8192
podman machine start
Perhaps my container doesn't have enough RAM?
Yeah, that seems to be the case
Hurray, it worked! :tada:
Thanks @Anton
Last updated: Jul 05 2025 at 12:14 UTC