Compiling something that depends on curl-sys without the distro devel package installed fails because it can't find its own copy to fall back to:
Click here
```
error: failed to run custom build command for `curl-sys v0.4.69+curl-8.5.0`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `/tmp/cargo-installMAi9tw/release/build/curl-sys-ab8196732edc931b/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=curl
cargo:rerun-if-env-changed=LIBCURL_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=LIBCURL_STATIC
cargo:rerun-if-env-changed=LIBCURL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
Couldn't find libcurl from pkgconfig (`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "libcurl"` did not exit successfully: exit status: 1
error: could not find system library 'libcurl' required by the 'curl-sys' crate
--- stderr
Package libcurl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcurl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcurl', required by 'virtual:world', not found
), compiling it from source...
cargo:root=/tmp/cargo-installMAi9tw/release/build/curl-sys-294e9baf668ae776/out
cargo:include=/tmp/cargo-installMAi9tw/release/build/curl-sys-294e9baf668ae776/out/include
cargo:static=1
cargo:rustc-cfg=libcurl_vendored
--- stderr
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
thread 'main' panicked at /home/arnavion/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curl-sys-0.4.69+curl-8.5.0/build.rs:86:10:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
```
To confirm, I manually ran git clone github.com:curl/curl -b curl-8_5_0 in ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curl-sys-0.4.69+curl-8.5.0 and that allowed the crate to build.
Compiling something that depends on curl-sys without the distro devel package installed fails because it can't find its own copy to fall back to:
Click here
``` error: failed to run custom build command for `curl-sys v0.4.69+curl-8.5.0` note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation. Caused by: process didn't exit successfully: `/tmp/cargo-installMAi9tw/release/build/curl-sys-ab8196732edc931b/build-script-build` (exit status: 101) --- stdout cargo:rerun-if-changed=curl cargo:rerun-if-env-changed=LIBCURL_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=LIBCURL_STATIC cargo:rerun-if-env-changed=LIBCURL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR Couldn't find libcurl from pkgconfig (`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "libcurl"` did not exit successfully: exit status: 1 error: could not find system library 'libcurl' required by the 'curl-sys' crate --- stderr Package libcurl was not found in the pkg-config search path. Perhaps you should add the directory containing `libcurl.pc' to the PKG_CONFIG_PATH environment variable Package 'libcurl', required by 'virtual:world', not found ), compiling it from source... cargo:root=/tmp/cargo-installMAi9tw/release/build/curl-sys-294e9baf668ae776/out cargo:include=/tmp/cargo-installMAi9tw/release/build/curl-sys-294e9baf668ae776/out/include cargo:static=1 cargo:rustc-cfg=libcurl_vendored --- stderr fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). thread 'main' panicked at /home/arnavion/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curl-sys-0.4.69+curl-8.5.0/build.rs:86:10: called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" } stack backtrace: ```To confirm, I manually ran
git clone github.com:curl/curl -b curl-8_5_0
in~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/curl-sys-0.4.69+curl-8.5.0
and that allowed the crate to build.