{"record":{"id":"84aafe87f16744f9","repo":"jdx/mise","slug":"precompiled-erlang-is-not-supported-on-os","errorCode":null,"errorMessage":"precompiled erlang is not supported on {os}","messagePattern":"precompiled erlang is not supported on (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/erlang.rs","lineNumber":734,"sourceCode":"                    Err(err) if compile == Some(false) => Err(err),\n                    Err(_) => self.resolve_source_lock_info(&tv.version).await,\n                }\n            }\n            \"windows\" => {\n                let info = match Self::windows_asset_name(&tv.version, target) {\n                    Ok(asset_name) => {\n                        Self::github_asset_lock_info(\"erlang/otp\", &release_tag, &asset_name).await\n                    }\n                    Err(err) => Err(err),\n                };\n                match info {\n                    Ok(info) => Ok(info),\n                    Err(err) if compile == Some(false) => Err(err),\n                    Err(_) => self.resolve_source_lock_info(&tv.version).await,\n                }\n            }\n            os if compile == Some(false) => {\n                bail!(\"precompiled erlang is not supported on {os}\")\n            }\n            _ => self.resolve_source_lock_info(&tv.version).await,\n        }\n    }\n}\n\nfn source_build_kerl_env(\n    install_env: IndexMap<String, crate::config::env_directive::EnvValue>,\n    kerl_base_dir: &Path,\n) -> IndexMap<String, Option<OsString>> {\n    let mut env = install_env\n        .into_iter()\n        .map(|(key, value)| (key, value.into_string().map(OsString::from)))\n        .collect::<IndexMap<_, _>>();\n    // Source lock metadata resolves a GitHub archive and stages it here. Keep\n    // kerl from selecting another backend or download directory and silently\n    // building a different archive instead.\n    env.insert(","sourceCodeStart":716,"sourceCodeEnd":752,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/plugins/core/erlang.rs#L716-L752","documentation":"During lock resolution (mise lock / locked installs), if the target OS is neither linux, macos, nor windows — e.g. freebsd/openbsd — and erlang.compile=false is set, mise bails: no precompiled source exists for that OS and compilation is disallowed. With compile unset, the same case records source-build lock info instead, so this only fires under an explicit compile=false policy.","triggerScenarios":"`mise lock` or `mise install --locked` (or settings.locked=true) on a FreeBSD/OpenBSD host with `mise settings get erlang.compile` == false; generating a cross-platform lock entry whose PlatformTarget OS is freebsd.","commonSituations":"FreeBSD CI jails with reproducibility-oriented settings copied from Linux; lock matrices that enumerate BSD targets.","solutions":["Allow source builds on BSD: `mise settings set erlang.compile true` (kerl supports building on FreeBSD)","Scope the compile=false setting to platforms that actually have precompiled builds instead of setting it globally","Manage Erlang via the BSD ports/packages on those hosts"],"exampleFix":"# before (~/.config/mise/settings.toml)\n[erlang]\ncompile = false   # on FreeBSD → precompiled erlang is not supported on freebsd\n\n# after\n[erlang]\ncompile = true","handlingStrategy":"validation","validationCode":"# don't apply a global compile=false on OSes that have no precompiled OTP\nUNAME=$(uname -s)\nif [ \"$UNAME\" != \"Linux\" ] && [ \"$UNAME\" != \"Darwin\" ]; then\n  mise settings set erlang.compile true   # BSD etc: source builds only\nfi\nmise install erlang@27.1","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep compile=false in per-platform config files (e.g. a Linux-only mise.toml layer) rather than global settings"],"tags":["mise","erlang","freebsd","unsupported-os","lockfile","precompiled"],"backgroundTag":"precompiled-binary-unavailable","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}