Skip to content

Commit 6543164

Browse files
committed
Include pkgconfig-native in cargo dependencies
pkg-config is used quite often by Rust libraries that link to native system libraries, so add it as a build dependency to avoid confusing errors. This doesn't add anything extra to the generated target image - only the native version of pkg-config is installed. Signed-off-by: Nick Stevens <[email protected]>
1 parent 35e951e commit 6543164

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

classes/cargo.bbclass

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
inherit rust-common
22

3-
DEPENDS += "cargo-bin-cross-${TARGET_ARCH}"
3+
# Many crates rely on pkg-config to find native versions of their libraries for
4+
# linking - do the simple thing and make it generally available.
5+
DEPENDS_append = "\
6+
cargo-bin-cross-${TARGET_ARCH} \
7+
pkgconfig-native \
8+
"
49

510
# Move CARGO_HOME from default of ~/.cargo
611
export CARGO_HOME = "${WORKDIR}/cargo_home"

0 commit comments

Comments
 (0)