openai/codex · error
bubblewrap is not available in this build. Notes: - ensure…
Error message
bubblewrap is not available in this build. Notes: - ensure the target OS is Linux - libcap headers must be available via pkg-config - bubblewrap sources expected at codex-rs/vendor/bubblewrap (default)
What it means
Panic from the Linux bwrap main when the crate was compiled without the bwrap_available cfg: the vendored bubblewrap sources were not compiled into the binary (build skipped, non-Linux toolchain, or missing libcap). The message lists the prerequisites so the operator can rebuild correctly.
Solutions
- Rebuild with the Linux target, libcap headers via pkg-config, and vendored sources at codex-rs/vendor/bubblewrap
- Unset CODEX_SKIP_BWRAP_BUILD so the build script compiles bubblewrap
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at codex-rs/bwrap/src/main.rs:33 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/b598e9bccd69076a.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/bwrap/src/main.rs:33
.unwrap_or_else(|err| panic!("failed to convert argv to CString: {err}"))
})
.collect::<Vec<_>>();
let mut argv_ptrs = cstrings
.iter()
.map(CString::as_c_str)
.map(CStr::as_ptr)
.collect::<Vec<*const c_char>>();
argv_ptrs.push(std::ptr::null());
// SAFETY: We provide a null-terminated argv vector whose pointers remain
// valid for the duration of the call.
let exit_code = unsafe { bwrap_main(cstrings.len() as libc::c_int, argv_ptrs.as_ptr()) };
std::process::exit(exit_code);
}
#[cfg(all(target_os = "linux", not(bwrap_available)))]
fn main() {
panic!(
r#"bubblewrap is not available in this build.
Notes:
- ensure the target OS is Linux
- libcap headers must be available via pkg-config
- bubblewrap sources expected at codex-rs/vendor/bubblewrap (default)"#
);
}
#[cfg(not(target_os = "linux"))]
fn main() {
panic!("bwrap is only supported on Linux");
}
View on GitHub (pinned to 339751715c)