Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindgen support #74

Closed
3 tasks done
messense opened this issue Dec 5, 2022 · 6 comments · Fixed by #95, #99, #98 or #102
Closed
3 tasks done

bindgen support #74

messense opened this issue Dec 5, 2022 · 6 comments · Fixed by #95, #99, #98 or #102
Labels
enhancement New feature or request

Comments

@messense
Copy link
Member

messense commented Dec 5, 2022

@messense messense added the enhancement New feature or request label Dec 5, 2022
@HyunggyuJang
Copy link
Contributor

Can you provide what's going wrong from your WIP branch? I need this feature, and I might be able to make a PR.

@messense
Copy link
Member Author

Try run it on zstd-rs

$ git clone --recurse-submodules https://github.com/gyscos/zstd-rs.git
$ cd cargo-zigbuild
$ cargo run zigbuild --manifest-path ../zstd-rs/Cargo.toml --features bindgen --target aarch64-unknown-linux-gnu
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/cargo-zigbuild zigbuild --manifest-path ../zstd-rs/Cargo.toml --features bindgen --target aarch64-unknown-linux-gnu`
   Compiling zstd-sys v2.0.7+zstd.1.5.4 (/Users/messense/Projects/zstd-rs/zstd-safe/zstd-sys)
error: failed to run custom build command for `zstd-sys v2.0.7+zstd.1.5.4 (/Users/messense/Projects/zstd-rs/zstd-safe/zstd-sys)`

Caused by:
  process didn't exit successfully: `/Users/messense/Projects/zstd-rs/target/debug/build/zstd-sys-5baf2753956d5f2f/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ZSTD_SYS_USE_PKG_CONFIG
  TARGET = Some("aarch64-unknown-linux-gnu")
  OPT_LEVEL = Some("0")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CC_aarch64-unknown-linux-gnu
  CC_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_aarch64_unknown_linux_gnu
  CC_aarch64_unknown_linux_gnu = Some("aarch64-unknown-linux-gnu-gcc")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
  CFLAGS_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
  CFLAGS_aarch64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("neon")
  cargo:rerun-if-env-changed=CC_aarch64-unknown-linux-gnu
  CC_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_aarch64_unknown_linux_gnu
  CC_aarch64_unknown_linux_gnu = Some("aarch64-unknown-linux-gnu-gcc")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
  CFLAGS_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
  CFLAGS_aarch64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("neon")
  cargo:rerun-if-env-changed=CC_aarch64-unknown-linux-gnu
  CC_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_aarch64_unknown_linux_gnu
  CC_aarch64_unknown_linux_gnu = Some("aarch64-unknown-linux-gnu-gcc")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
  CFLAGS_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
  CFLAGS_aarch64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("neon")
  cargo:rerun-if-env-changed=CC_aarch64-unknown-linux-gnu
  CC_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_aarch64_unknown_linux_gnu
  CC_aarch64_unknown_linux_gnu = Some("aarch64-unknown-linux-gnu-gcc")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
  CFLAGS_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
  CFLAGS_aarch64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("neon")
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/fse_decompress.o" "-c" "zstd/lib/common/fse_decompress.c"
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/threading.o" "-c" "zstd/lib/common/threading.c"
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/error_private.o" "-c" "zstd/lib/common/error_private.c"
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/zstd_common.o" "-c" "zstd/lib/common/zstd_common.c"
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/debug.o" "-c" "zstd/lib/common/debug.c"
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/pool.o" "-c" "zstd/lib/common/pool.c"
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/entropy_common.o" "-c" "zstd/lib/common/entropy_common.c"
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/fse_compress.o" "-c" "zstd/lib/compress/fse_compress.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/hist.o" "-c" "zstd/lib/compress/hist.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/huf_compress.o" "-c" "zstd/lib/compress/huf_compress.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_compress.o" "-c" "zstd/lib/compress/zstd_compress.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_compress_literals.o" "-c" "zstd/lib/compress/zstd_compress_literals.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_compress_sequences.o" "-c" "zstd/lib/compress/zstd_compress_sequences.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_compress_superblock.o" "-c" "zstd/lib/compress/zstd_compress_superblock.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_double_fast.o" "-c" "zstd/lib/compress/zstd_double_fast.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_fast.o" "-c" "zstd/lib/compress/zstd_fast.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_lazy.o" "-c" "zstd/lib/compress/zstd_lazy.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_ldm.o" "-c" "zstd/lib/compress/zstd_ldm.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_opt.o" "-c" "zstd/lib/compress/zstd_opt.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstdmt_compress.o" "-c" "zstd/lib/compress/zstdmt_compress.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/huf_decompress.o" "-c" "zstd/lib/decompress/huf_decompress.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/zstd_ddict.o" "-c" "zstd/lib/decompress/zstd_ddict.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/zstd_decompress.o" "-c" "zstd/lib/decompress/zstd_decompress.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/zstd_decompress_block.o" "-c" "zstd/lib/decompress/zstd_decompress_block.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/dictBuilder/cover.o" "-c" "zstd/lib/dictBuilder/cover.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/dictBuilder/divsufsort.o" "-c" "zstd/lib/dictBuilder/divsufsort.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/dictBuilder/fastcover.o" "-c" "zstd/lib/dictBuilder/fastcover.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/dictBuilder/zdict.o" "-c" "zstd/lib/dictBuilder/zdict.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v01.o" "-c" "zstd/lib/legacy/zstd_v01.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v02.o" "-c" "zstd/lib/legacy/zstd_v02.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v03.o" "-c" "zstd/lib/legacy/zstd_v03.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v04.o" "-c" "zstd/lib/legacy/zstd_v04.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v05.o" "-c" "zstd/lib/legacy/zstd_v05.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v06.o" "-c" "zstd/lib/legacy/zstd_v06.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v07.o" "-c" "zstd/lib/legacy/zstd_v07.c"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/huf_decompress_amd64.o" "-c" "zstd/lib/decompress/huf_decompress_amd64.S"
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 0
  cargo:rerun-if-env-changed=AR_aarch64-unknown-linux-gnu
  AR_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_aarch64_unknown_linux_gnu
  AR_aarch64_unknown_linux_gnu = Some("aarch64-unknown-linux-gnu-ar")
  cargo:rerun-if-env-changed=ARFLAGS_aarch64-unknown-linux-gnu
  ARFLAGS_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=ARFLAGS_aarch64_unknown_linux_gnu
  ARFLAGS_aarch64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=TARGET_ARFLAGS
  TARGET_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  running: ZERO_AR_DATE="1" "aarch64-unknown-linux-gnu-ar" "cq" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/libzstd.a" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/debug.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/entropy_common.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/error_private.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/fse_decompress.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/pool.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/threading.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/common/zstd_common.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/fse_compress.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/hist.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/huf_compress.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_compress.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_compress_literals.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_compress_sequences.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_compress_superblock.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_double_fast.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_fast.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_lazy.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_ldm.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstd_opt.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/compress/zstdmt_compress.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/huf_decompress.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/zstd_ddict.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/zstd_decompress.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/zstd_decompress_block.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/dictBuilder/cover.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/dictBuilder/divsufsort.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/dictBuilder/fastcover.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/dictBuilder/zdict.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v01.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v02.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v03.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v04.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v05.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v06.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/legacy/zstd_v07.o" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/zstd/lib/decompress/huf_decompress_amd64.o"
  exit status: 0
  running: "aarch64-unknown-linux-gnu-ar" "s" "/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out/libzstd.a"
  exit status: 0
  cargo:rustc-link-lib=static=zstd
  cargo:rustc-link-search=native=/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out
  cargo:root=/Users/messense/Projects/zstd-rs/target/aarch64-unknown-linux-gnu/debug/build/zstd-sys-9af60aa221bd6c2e/out
  cargo:include=/Users/messense/Projects/zstd-rs/zstd-safe/zstd-sys/zstd/lib

  --- stderr
  /opt/homebrew/Cellar/zig/0.10.1/lib/zig/libc/include/generic-glibc/bits/local_lim.h:38:10: fatal error: 'linux/limits.h' file not found
  thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("/opt/homebrew/Cellar/zig/0.10.1/lib/zig/libc/include/generic-glibc/bits/local_lim.h:38:10: fatal error: 'linux/limits.h' file not found\n")', zstd-safe/zstd-sys/build.rs:30:40
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@HyunggyuJang
Copy link
Contributor

HyunggyuJang commented Feb 25, 2023

Indeed, with HyunggyuJang@7ea724f, it builds successfully, can you check it?

All we need to do is set sysroot properly, rather than including the header file directory, as the header file is linked from

format!("CARGO_TARGET_{}_LINKER", env_target.to_uppercase()),

@messense
Copy link
Member Author

Feel free to send a pull request, and we should add a integration test for it.

@messense messense reopened this Feb 25, 2023
@messense messense changed the title bindgen support bindgen support for macOS and Windows gnu targets Feb 25, 2023
@messense messense changed the title bindgen support for macOS and Windows gnu targets bindgen support for macOS target Feb 26, 2023
@messense messense changed the title bindgen support for macOS target bindgen support Feb 26, 2023
@lriesebos
Copy link
Contributor

Hi, I am experiencing issues when using bindgen in a project and trying to build that with cargo-zigbuild. I have a hard time to pin down what is going wrong, but I have recreated a case that might give a clue. I suspect this is an issue with zigbuild, but I am not 100% sure.

The test project is basically a minimal test project that uses bindgen. Important detail here is that the header file that I am binding contains an include #include <stdint.h> which now needs to be available to bindgen.
I need to set BINDGEN_EXTRA_CLANG_ARGS to make sure bindgen finds the header files of glibc. I run this on an x86_64-unknown-linux-gnu machine and cargo build or cargo build --target x86_64-unknown-linux-gnu will run successfully.

Now when I use cargo zigbuild, this works fine, but this might be misleading. This command does does not appear to use zig and is basically equal to cargo build. Not sure if that is expected behavior.

Things get interesting when running cargo zigbuild --target x86_64-unknown-linux-gnu. Zig is clearly being invoked (visible when increasing verbosity) and the build fails: Unable to generate bindings: ClangDiagnostic("hello/hello.h:1:10: fatal error: 'stdint.h' file not found\n"). Setting BINDGEN_EXTRA_CLANG_ARGS and/or BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu does not make a difference. It seems these env variables are not passed correctly. When I change build.rs and use bindgen::Builder::clang_arg() to pass the glibc includes, then it works fine.

Let me know if you have any idea what is going on here!

@lriesebos
Copy link
Contributor

Ok, it is cargo-zigbuild causing the problem. Basically it overwrites the BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu variable with a sysroot argument: https://github.com/rust-cross/cargo-zigbuild/blob/main/src/zig.rs#L457 . TBH, I don't really know why sysroot is set like this. At least one case (mine by coincidence) does not need this sysroot to be set.

Anyway, tomorrow I'll post a PR with some proposed changes to fix that. In that PR we can also discuss why this sysroot argument is there and if it should stay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment