{"record":{"id":"41e3deff129f4451","repo":"vosen/ZLUDA","slug":"failed-to-open","errorCode":null,"errorMessage":"Failed to open {}: {}","messagePattern":"Failed to open (.+?): (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"llvm_zluda/build.rs","lineNumber":77,"sourceCode":"    let cmake_profile = cmake.get_profile();\n    let llvm_build_path = get_llvm_build_path(&llvm_dir, cmake_profile);\n    println!(\"cargo:build-path={}\", llvm_build_path.display());\n    let (cxxflags, ldflags, libdir, lib_names, system_libs) =\n        llvm_config(&llvm_build_path.join(\"bin/llvm-config\")).unwrap();\n    println!(\"cargo:rustc-link-arg={ldflags}\");\n    println!(\"cargo:rustc-link-search=native={libdir}\");\n    for lib in system_libs.split_ascii_whitespace() {\n        println!(\"cargo:rustc-link-arg={lib}\");\n    }\n    link_lld_components();\n    link_llvm_components(lib_names);\n    compile_cxx_lib(cxxflags, &llvm_build_path);\n}\n\nfn check_lfs_file(bc_path: &str) {\n    let mut magic = [0u8; 2];\n    File::open(bc_path)\n        .unwrap_or_else(|e| panic!(\"Failed to open {}: {}\", bc_path, e))\n        .read_exact(&mut magic)\n        .unwrap_or_else(|e| panic!(\"Failed to read {}: {}\", bc_path, e));\n    assert!(\n        &magic == b\"BC\",\n        \"{} is a git lfs stub and not the actual file. Run `git lfs pull` to fetch it\",\n        bc_path\n    );\n}\n\n// https://github.com/mozilla/sccache/blob/main/README.md#usage\nfn try_use_sccache(cmake: &mut Config) {\n    if let Ok(sccache) = std::env::var(\"SCCACHE_PATH\") {\n        cmake.define(\"CMAKE_CXX_COMPILER_LAUNCHER\", &*sccache);\n        cmake.define(\"CMAKE_C_COMPILER_LAUNCHER\", &*sccache);\n        match std::env::var_os(\"CARGO_CFG_TARGET_OS\") {\n            Some(os) if os == \"windows\" => {\n                cmake.define(\n                    \"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT\",","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/vosen/ZLUDA/blob/9c8b43f242985150f86a7f485218b7b82c3e96ca/llvm_zluda/build.rs#L59-L95","documentation":"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.","triggerScenarios":"Thrown at llvm_zluda/build.rs:77 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c8b43f242985150f86a7f485218b7b82c3e96ca","analyzedAt":"2026-09-06T09:21:08.049Z","contentChangedAt":"2026-09-06T09:21:08.049Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}