vosen/ZLUDA · error
Failed to open {}: {}
Error message
Failed to open {}: {} What it means
Build-script panic in check_lfs_file: the tracked binary artifact (a .bc file or DLL pointer file) could not be opened. In ZLUDA these large binaries are stored as Git LFS objects, so the usual cause is a missing/failed LFS pull leaving a tiny text stub or no file at all, or a permissions/path issue in the checkout.
Source
Thrown at llvm_zluda/build.rs:77
let cmake_profile = cmake.get_profile();
let llvm_build_path = get_llvm_build_path(&llvm_dir, cmake_profile);
println!("cargo:build-path={}", llvm_build_path.display());
let (cxxflags, ldflags, libdir, lib_names, system_libs) =
llvm_config(&llvm_build_path.join("bin/llvm-config")).unwrap();
println!("cargo:rustc-link-arg={ldflags}");
println!("cargo:rustc-link-search=native={libdir}");
for lib in system_libs.split_ascii_whitespace() {
println!("cargo:rustc-link-arg={lib}");
}
link_lld_components();
link_llvm_components(lib_names);
compile_cxx_lib(cxxflags, &llvm_build_path);
}
fn check_lfs_file(bc_path: &str) {
let mut magic = [0u8; 2];
File::open(bc_path)
.unwrap_or_else(|e| panic!("Failed to open {}: {}", bc_path, e))
.read_exact(&mut magic)
.unwrap_or_else(|e| panic!("Failed to read {}: {}", bc_path, e));
assert!(
&magic == b"BC",
"{} is a git lfs stub and not the actual file. Run `git lfs pull` to fetch it",
bc_path
);
}
// https://github.com/mozilla/sccache/blob/main/README.md#usage
fn try_use_sccache(cmake: &mut Config) {
if let Ok(sccache) = std::env::var("SCCACHE_PATH") {
cmake.define("CMAKE_CXX_COMPILER_LAUNCHER", &*sccache);
cmake.define("CMAKE_C_COMPILER_LAUNCHER", &*sccache);
match std::env::var_os("CARGO_CFG_TARGET_OS") {
Some(os) if os == "windows" => {
cmake.define(
"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT",View on GitHub (pinned to 9c8b43f242)
Solutions
- Run `git lfs install` and `git lfs pull` to fetch the real LFS objects
- Verify the file exists and is not a small text stub (a real object starts with binary magic, not LFS pointer text)
- Re-clone the repository with LFS enabled if objects are corrupted
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at llvm_zluda/build.rs:77 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vosen/ZLUDA@9c8b43f242 (2026-09-06).
Data as JSON: /api/errors/41e3deff129f4451.
Report an issue: GitHub.