From f8be29449df8bc3c0b480b4c776db18e9d97dc10 Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Mon, 24 Jul 2023 19:12:58 +0200 Subject: [PATCH] Fix build on x86_64 On same platform, library file is compiled into `lib64` directory. Rust compiler expects that library will be in `lib` directory. This fixes this by searing library both in `lib` and `lib64` directory. --- build_zng.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_zng.rs b/build_zng.rs index c6211e3e..25576253 100644 --- a/build_zng.rs +++ b/build_zng.rs @@ -22,10 +22,15 @@ pub fn build_zlib_ng(target: &str, compat: bool) { let includedir = install_dir.join("include"); let libdir = install_dir.join("lib"); + let libdir64 = install_dir.join("lib64"); println!( "cargo:rustc-link-search=native={}", libdir.to_str().unwrap() ); + println!( + "cargo:rustc-link-search=native={}", + libdir64.to_str().unwrap() + ); let mut debug_suffix = ""; let libname = if target.contains("windows") && target.contains("msvc") { if env::var("OPT_LEVEL").unwrap() == "0" {