georust / geos

Rust bindings for GEOS
https://docs.rs/geos/
MIT License
122 stars 41 forks source link

error: failed to run custom build command for `geos-sys v2.0.5` #131

Open bouyeijiang opened 1 year ago

bouyeijiang commented 1 year ago

error: failed to run custom build command for geos-sys v2.0.5

Caused by: process didn't exit successfully: /home/bouyei/projects/georust/target/debug/build/geos-sys-70c700a92bad5d0b/build-script-build (exit status: 101) --- stdout cargo:rerun-if-changed=build.rs cargo:rerun-if-env-changed=GEOS_LIB_DIR cargo:rerun-if-env-changed=GEOS_VERSION cargo:rerun-if-env-changed=GEOS_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=GEOS_STATIC cargo:rerun-if-env-changed=GEOS_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

--- stderr thread 'main' panicked at 'Could not detect GEOS using pkg-config or geos-config', /home/bouyei/.cargo/registry/src/github.com/rust-lang-df7c3c540f42cdbd/geos-sys-2.0.5/build.rs:137:13

brendan-ward commented 1 year ago

It looks like you are trying to dynamically link against GEOS and it isn't available or automatically discovered on your system. Some tips here.

You have 2 options: 1) build one of the compatible versions GEOS on your system and make sure that it is discoverable either by having it install to a default location or adding environment variables to help discover it; it also needs to be discoverable at runtime (see above) 2) build a static version of GEOS using the source code that is pinned here by adding --features static

If you've tried both of those and it still isn't working, please give us a little more information about how you have installed GEOS or if you are trying to run the static build.

bouyeijiang commented 1 year ago

谢谢您的来信!我会及时查阅的