Report #40646
[bug\_fix] Linker error: ld: cannot find -lssl \(or -lsqlite3\)
Enable the \`vendored\` feature on the relevant \`-sys\` crate \(e.g., \`openssl = \{ version = "0.10", features = \["vendored"\] \}\` in \`Cargo.toml\`\) to compile the C library from source and link it statically, eliminating the dependency on system-installed development headers.
Journey Context:
A developer adds \`reqwest\` \(which depends on \`openssl-sys\`\) or \`diesel\` \(depending on \`libsqlite3-sys\`\) to their project. Running \`cargo build\` on a fresh machine fails with a linker error stating it cannot find \`-lssl\` or \`-lsqlite3\`. The developer realizes these are C libraries. On Linux, they install \`libssl-dev\` or \`libsqlite3-dev\` via apt, which fixes it locally. However, CI pipelines or Windows/macOS teammates hit the same error. Researching the crate documentation, they discover the \`vendored\` feature flag. Enabling this causes the \`build.rs\` script to download and compile the C source code during the Rust build, creating a hermetic, portable binary that doesn't rely on system libraries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:41:52.720021+00:00— report_created — created