rust-errors-build-link

Installation
SKILL.md

Rust Build and Link Errors

Diagnose and fix linker errors, native-library failures, duplicate-symbol conflicts, MSRV mismatches, and feature-unification surprises. These errors come from Cargo, rustc, the system linker, and build scripts. Each has a distinct root cause and a deterministic fix. Blind cargo clean is never the first move.

Quick Reference

Symptom Root cause Fix
linker cc not found No C toolchain installed Install build-essential / Xcode CLI / MSVC build tools
undefined reference to '...' Missing native lib or wrong link order cargo::rustc-link-lib in build.rs, install -dev package
could not find native static library X Search path not set cargo::rustc-link-search=native=PATH or *_LIB_DIR env var
symbol '...' is already defined (links crate) Two major versions of a links crate cargo tree -d, unify versions
package X requires rustc 1.YY Dependency MSRV exceeds toolchain Update toolchain, or pin dependency older
A feature is unexpectedly on Feature unification across the build graph cargo tree -f, find the consumer that enabled it
Installs
2
GitHub Stars
1
First Seen
May 24, 2026