You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are collaborating with the Novanet team to implement zkML using Jolt. As a first step, we are writing Jolt guest code to load a simple Gradient Boosting model from an ONNX file and execute inference. However, during compilation of our guest code, we are encountering errors related to the filetime crate.
The code should compile without issues and perform inference using the ONNX model.
Actual Behavior:
Compilation fails with errors originating from the filetime crate. Key error messages include:
Error regarding missing Unix module:
error[E0433]: failed to resolve: could not find `unix` in `os`
--> filetime-0.2.25/src/unix/mod.rs:4:14
|
4 | use std::os::unix::prelude::*;
| ^^^^ could not find `unix` in `os`
Additional errors related to libc and missing methods (e.g., as_raw_fd, mtime, atime):
error[E0432]: unresolved import `libc`
error[E0599]: no method named `as_raw_fd` found for reference `&File` in the current scope
...
Workarounds Attempted:
Default Features Disabled:
We set filetime = { version = "0.2", default-features = false } in our guest project’s Cargo.toml to disable Unix-specific code. However, the error still occurs.
Patching filetime via [patch.crates-io]:
We attempted to override filetime using a patch in our guest project’s Cargo.toml and then in the workspace root. The patch was rejected with the message:
warning: patch for `filetime` uses the features mechanism. default-features and features will not take effect because the patch dependency does not support this mechanism
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
Caused by:
patch for `filetime` in `https://github.com/rust-lang/crates.io-index` points to the same source, but patches must point to different sources
This indicates that patching the filetime crate in this way isn’t working because it points to the same source as crates.io.
Target Configuration:
We considered whether our build target might be causing the issue (i.e., a non-Unix or custom target environment where std::os::unix is unavailable). However, it is unclear whether adjusting target specifications alone can resolve the issue.
Additional Information:
The filetime crate’s own Cargo.toml uses conditional dependencies to include libc on Unix platforms. It appears that on our target, the #[cfg(unix)] condition is being incorrectly evaluated, leading to compilation of Unix-specific code on a non-Unix target.
Our project’s workspace includes Jolt’s jolt-core, which does not seem to modify the dependency on filetime directly.
We have confirmed that the guest code and workspace Cargo.toml do not override filetime elsewhere.
Request:
Could you please advise on how to resolve these compilation issues?
Is there a known workaround for building Jolt guest code on our target environment?
Should we use a fork of filetime with modifications for non-Unix targets?
Are there any adjustments required in Jolt’s dependency management for proper cross-platform compatibility?
Thank you for your assistance.
The text was updated successfully, but these errors were encountered:
Context:
We are collaborating with the Novanet team to implement zkML using Jolt. As a first step, we are writing Jolt guest code to load a simple Gradient Boosting model from an ONNX file and execute inference. However, during compilation of our guest code, we are encountering errors related to the
filetime
crate.Steps to Reproduce:
Expected Behavior:
The code should compile without issues and perform inference using the ONNX model.
Actual Behavior:
Compilation fails with errors originating from the
filetime
crate. Key error messages include:libc
and missing methods (e.g.,as_raw_fd
,mtime
,atime
):Workarounds Attempted:
Default Features Disabled:
We set
filetime = { version = "0.2", default-features = false }
in our guest project’s Cargo.toml to disable Unix-specific code. However, the error still occurs.Patching filetime via [patch.crates-io]:
We attempted to override filetime using a patch in our guest project’s Cargo.toml and then in the workspace root. The patch was rejected with the message:
This indicates that patching the filetime crate in this way isn’t working because it points to the same source as crates.io.
Target Configuration:
We considered whether our build target might be causing the issue (i.e., a non-Unix or custom target environment where
std::os::unix
is unavailable). However, it is unclear whether adjusting target specifications alone can resolve the issue.Additional Information:
filetime
crate’s own Cargo.toml uses conditional dependencies to includelibc
on Unix platforms. It appears that on our target, the#[cfg(unix)]
condition is being incorrectly evaluated, leading to compilation of Unix-specific code on a non-Unix target.jolt-core
, which does not seem to modify the dependency onfiletime
directly.Request:
Could you please advise on how to resolve these compilation issues?
Thank you for your assistance.
The text was updated successfully, but these errors were encountered: