{"record":{"id":"6b55f45c026587fb","repo":"vosen/ZLUDA","slug":"failed-to-open-6b55f4","errorCode":null,"errorMessage":"Failed to open {}: {}","messagePattern":"Failed to open (.+?): (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ptx/build.rs","lineNumber":16,"sourceCode":"use std::fs::File;\nuse std::io::Read;\n\nfn main() {\n    let bc_path = \"lib/zluda_ptx_impl.bc\";\n    let bc_constrained_path = \"lib/zluda_ptx_impl_constrained.bc\";\n    println!(\"cargo:rerun-if-changed={}\", bc_path);\n    println!(\"cargo:rerun-if-changed={}\", bc_constrained_path);\n    check_lfs_file(bc_path);\n    check_lfs_file(bc_constrained_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","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/vosen/ZLUDA/blob/9c8b43f242985150f86a7f485218b7b82c3e96ca/ptx/build.rs#L1-L25","documentation":"ptx build-script panic in check_lfs_file: lib/zluda_ptx_impl.bc (or the constrained variant) could not be opened. These LLVM bitcode files are shipped as Git LFS objects, so the typical cause is LFS not installed or its objects not pulled, leaving the checkout without the real binary.","triggerScenarios":"Thrown at ptx/build.rs:16 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run `git lfs install && git lfs pull` to fetch the bitcode files","Verify the file under ptx/lib/ exists and is byte-identical to the LFS object, not a pointer stub","Re-clone with LFS enabled if the objects are missing from the local store"],"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"}