Skip to content

Commit f8be294

Browse files
authored
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.
1 parent 4457ab3 commit f8be294

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build_zng.rs

+5
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
2222

2323
let includedir = install_dir.join("include");
2424
let libdir = install_dir.join("lib");
25+
let libdir64 = install_dir.join("lib64");
2526
println!(
2627
"cargo:rustc-link-search=native={}",
2728
libdir.to_str().unwrap()
2829
);
30+
println!(
31+
"cargo:rustc-link-search=native={}",
32+
libdir64.to_str().unwrap()
33+
);
2934
let mut debug_suffix = "";
3035
let libname = if target.contains("windows") && target.contains("msvc") {
3136
if env::var("OPT_LEVEL").unwrap() == "0" {

0 commit comments

Comments
 (0)