The cargo-c package creates a cargo subcommand to build and install C-ABI compatible dynamic and static libraries.
Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.
Download (HTTP): https://github.com/lu-zero/cargo-c/archive/v0.10.5/cargo-c-0.10.5.tar.gz
Download MD5 sum: f362846f3e16795fc65d868e7a39bc48
Download size: 36 KB
Estimated disk space required: 722 MB
Estimated build time: 0.5 SBU
libssh2-1.11.1 and SQLite-3.47.0
An Internet connection is needed for building this package.
First, download a file to ensure that cargo uses the dependency versions specified by the upstream developers when this cargo-c version (0.10.5) was released. Without this, the latest versions of the dependencies would be used and they might cause breakages:
curl -LO https://github.com/lu-zero/cargo-c/releases/download/v0.10.5/Cargo.lock
Normally we would put such a download into an “Additional Downloads”
section. But in this case we cannot tell the package name and
version from the file name Cargo.lock
, so it's better not to put the
ambigiously-named file outside the cargo-c-0.10.5
directory. We use curl here because the cURL-8.10.1 package should have been installed
as a required dependency of rustc-1.82.0.
The md5sum of the file should be 8f013a75a5622d58f395eea63991088a
.
Install cargo-c by running the following commands:
[ ! -e /usr/include/libssh2.h ] || export LIBSSH2_SYS_USE_PKG_CONFIG=1 && [ ! -e /usr/include/sqlite3.h ] || export LIBSQLITE3_SYS_USE_PKG_CONFIG=1 && cargo build --release
To test the results, issue: cargo test --release.
Now, as the root
user:
install -vm755 target/release/cargo-{capi,cbuild,cinstall,ctest} /usr/bin/