From b4725aac0299bff14aa4f5f889b579eb88216ffc Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Wed, 16 Aug 2023 01:18:10 +0300 Subject: [PATCH] linking to libs in openbsd build --- librocksdb-sys/build.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index 895d935..deeddf2 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -234,8 +234,9 @@ fn build_rocksdb() { config.define("ROCKSDB_PLATFORM_POSIX", None); config.define("ROCKSDB_LIB_IO_POSIX", None); println!("cargo:rustc-link-arg=-pthread"); - println!("cargo:rustc-link-arg=-lz"); - println!("cargo:rustc-link-arg=-lexecinfo"); + println!("cargo:rustc-link-lib=static=z"); + println!("cargo:rustc-link-lib=static=execinfo"); + println!("cargo:rustc-link-lib=static=crypto"); config.flag("-fno-builtin-memcmp"); config.flag_if_supported("-faligned-new"); config.flag("-Wshorten-64-to-32"); @@ -247,7 +248,7 @@ fn build_rocksdb() { //pkg_config::Config::new().probe("openssl").unwrap(); config.include("rocksdb/plugin/openssl/include"); lib_sources.push("plugin/openssl/openssl_provider.cc"); - config.flag("-lcrypto"); + // let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); // println!("cargo:rustc-link-lib=static=crypto"); } else if target.contains("windows") {