Build is failing all of a sudden after no dependency changes
rhyez
PROOP

a year ago

I am experiencing build failures while deploying my Rust application on Railway. The application had previously deployed successfully multiple times without issues, but it now consistently fails during the build phase.

The errors seem to involve the setup for the x86_64-unknown-linux-musl target and related dependencies.

LOGS:

setup │ binutils, gcc, (rust-bin.stable.latest.default.override { ║

║ │ targets = ["x86_64-unknown-linux-musl"]; }), musl, musl.dev

build │ mkdir -p bin ║

║ │ cargo build --release --target x86_64-unknown-linux-musl ║

║ │ cp target/x86_64-unknown-linux-musl/release/zenithkids-be bin

#11 26.12 error: attribute 'rust' missing

#11 26.12 at /nix/store/x0b87ac1wjr0z9dprzi2zmwn96v4zyqn-source/lib/rust-bin.nix:25:28

#11 26.12 Did you mean rustc?

#11 ERROR: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-*.nix && nix-collect-garbage -d" did not complete successfully: exit code: 1

Nixpack.toml:

[phases.setup]

nixPkgs = [

"binutils",

"gcc",

"rustc",

"cargo",

"musl",

"musl.dev",

"openssl.dev",

"postgresql.lib"

]

aptPkgs = [

"libssl-dev",

"pkg-config",

"libpq-dev",

"build-essential"

]

[phases.build]

dependsOn = ["setup"]

cmds = [

"rustup default stable",

"rustup target add x86_64-unknown-linux-musl",

"cargo build --release --locked --target x86_64-unknown-linux-musl --verbose"

]

[phases.install]

dependsOn = ["build"]

cmds = [

"mkdir -p bin",

"cp target/x86_64-unknown-linux-musl/release/zenithkids-be bin/"

]

[start]

cmd = "./bin/zenithkids-be"

[nix]

inputs.nixpkgs.url = "github:NixOS/nixpkgs/22.11"

Cargo.toml:

[package]

name = "zenithkids-be"

version = "0.1.0"

edition = "2021"

[dependencies]

thiserror = "2.0"

actix-web = "4.9.0"

actix-cors = "0.7.0"

dotenv = "0.15.0"

colored = "2.2.0"

sqlx = { version = "0.8.2", features = ["runtime-tokio-rustls", "postgres", "migrate", "uuid", "time", "chrono"] }

tokio = { version = "1", features = ["full"] }

serde = { version = "1.0", features = ["derive"] }

serde_json = "1.0"

uuid = { version = "1.10.0", features = ["v4", "serde"] }

reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "json"] }

jsonwebtoken = { version = "9.3.0" }

chrono = "0.4.39"

argon2 = "0.5.3"

futures = "0.3.31"

utoipa = { version = "5.3", features = ["actix_extras"] }

utoipa-swagger-ui = { version = "8.1", features = ["actix-web"] }

time = "0.3.37"

Github:

The repo is private so I cannot share the link.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

1 Replies

chandrika
EMPLOYEE

a year ago

Hi Geoff, we released a fix to Nixpacks that might help fix the error you were seeing, could you please try triggering a new build?


Status changed to Awaiting User Response Railway over 1 year ago


Railway
BOT

9 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...