Help with packaging complex Rust library

Looking for some help in order to finish [WIP] ZLUDA: init at 3 by errnoh · Pull Request #288644 · NixOS/nixpkgs · GitHub

This packages GitHub - vosen/ZLUDA: CUDA on AMD GPUs, which is rather complex library for running CUDA applications with AMD hardware.

Before starting the PR I did manage to build the package manually (resulting in the lockfile that’s being used in the PR), but any attempt to compile it in a package just results in errors. I’ve made some progress on the package (thanks @SergeK), but there’s the nagging feel that if I could get someone familiar with Rust to take a look this would be done quite fast :slight_smile:

Details are in the PR, but basically the furthest I’ve got so far is:

   Compiling dynasmrt v1.2.3
error: failed to run custom build command for `zluda v0.0.0 (/build/source/zluda)`

Caused by:
  process didn't exit successfully: `/build/source/target/release/build/zluda-80c9fbe76904c49f/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at zluda/build.rs:4:29:
  called `Result::unwrap()` on an `Err` value: could not find repository from '/build/source/zluda'; class=Repository (6); code=NotFound (-3)
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: builder for '/nix/store/1almnpy0bpkmsa1gm3c0g2hxg3fvpivf-zluda-3.drv' failed with exit code 101;
       last 10 log lines:
       >    Compiling dynasmrt v1.2.3
       > error: failed to run custom build command for `zluda v0.0.0 (/build/source/zluda)`
       >
       > Caused by:
       >   process didn't exit successfully: `/build/source/target/release/build/zluda-80c9fbe76904c49f/build-script-build` (exit status: 101)
       >   --- stderr
       >   thread 'main' panicked at zluda/build.rs:4:29:
       >   called `Result::unwrap()` on an `Err` value: could not find repository from '/build/source/zluda'; class=Repository (6); code=NotFound (-3)
       >   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
       > warning: build failed, waiting for other jobs to finish...
       For full logs, run 'nix log /nix/store/1almnpy0bpkmsa1gm3c0g2hxg3fvpivf-zluda-3.drv'.

which seems to fail the following build.rs:

use vergen::{Config, vergen};

fn main() {
  vergen(Config::default()).unwrap()
}
1 Like

Wish i could help but you’re doing great work!