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

Build Failed in old MacOS version #738

Open
niu541412 opened this issue Jul 22, 2024 · 0 comments
Open

Build Failed in old MacOS version #738

niu541412 opened this issue Jul 22, 2024 · 0 comments

Comments

@niu541412
Copy link

niu541412 commented Jul 22, 2024

I have an outdated Mac Pro 5,1, but it is still capable of installing most Homebrew formulas by building from source.
The last officially supported MacOS version is 10.13 High Sierra. However, difftastic cannot be installed without code modification.
The following is the error log:

 error: failed to run custom build command for `libmimalloc-sys v0.1.24`
 
 Caused by:
   process didn't exit successfully: `/private/tmp/difftastic-20240722-78989-2e33qb/difftastic-0.59.0/target/release/build/libmimalloc-sys-5856f8a594871f98/build-      script-build` (exit status: 1)
   --- stdout
   OPT_LEVEL = Some(3)
   TARGET = Some(x86_64-apple-darwin)
   OUT_DIR = Some(/private/tmp/difftastic-20240722-78989-2e33qb/difftastic-0.59.0/target/release/build/libmimalloc-sys-4bcb9f6a1457434a/out)
   HOST = Some(x86_64-apple-darwin)
   cargo:rerun-if-env-changed=CC_x86_64-apple-darwin
   CC_x86_64-apple-darwin = None
   cargo:rerun-if-env-changed=CC_x86_64_apple_darwin
   CC_x86_64_apple_darwin = None
   cargo:rerun-if-env-changed=HOST_CC
   HOST_CC = None
   cargo:rerun-if-env-changed=CC
   CC = Some(clang)
   RUSTC_WRAPPER = None
   cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
   CRATE_CC_NO_DEFAULTS = None
   DEBUG = Some(false)
   cargo:rerun-if-env-changed=MACOSX_DEPLOYMENT_TARGET
   MACOSX_DEPLOYMENT_TARGET = None
   cargo:rerun-if-env-changed=CFLAGS_x86_64-apple-darwin
   CFLAGS_x86_64-apple-darwin = None
   cargo:rerun-if-env-changed=CFLAGS_x86_64_apple_darwin
   CFLAGS_x86_64_apple_darwin = None
   cargo:rerun-if-env-changed=HOST_CFLAGS
      HOST_CFLAGS = None
   cargo:rerun-if-env-changed=CFLAGS
   CFLAGS = None
   OUT_DIR = Some(/private/tmp/difftastic-20240722-78989-2e33qb/difftastic-0.59.0/target/release/build/libmimalloc-sys-4bcb9f6a1457434a/out)
   cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
   CRATE_CC_NO_DEFAULTS = None
   cargo:rerun-if-env-changed=MACOSX_DEPLOYMENT_TARGET
   MACOSX_DEPLOYMENT_TARGET = None
   cargo:rerun-if-env-changed=CFLAGS_x86_64-apple-darwin
   CFLAGS_x86_64-apple-darwin = None
   cargo:rerun-if-env-changed=CFLAGS_x86_64_apple_darwin
   CFLAGS_x86_64_apple_darwin = None
   cargo:rerun-if-env-changed=HOST_CFLAGS
   HOST_CFLAGS = None
   cargo:rerun-if-env-changed=CFLAGS
   CFLAGS = None
   cargo:warning=In file included from c_src/mimalloc/src/static.c:24:
   cargo:warning=In file included from c_src/mimalloc/src/random.c:198:
   cargo:warning=/usr/include/CommonCrypto/CommonRandom.h:35:9: error: unknown type name 'CCCryptorStatus'
   cargo:warning=typedef CCCryptorStatus CCRNGStatus;
   cargo:warning=        ^
   cargo:warning=1 error generated.
 
   --- stderr
 
 
   error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-apple-darwin" "-     mmacosx-version-min=10.14.1" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_DEBUG=0" "-o" "/private/tmp/   difftastic-20240722-78989-2e33qb/difftastic-0.59.0/target/release/build/libmimalloc-sys-4bcb9f6a1457434a/out/98cfcaec7182b1d8-static.o" "-c" "c_src/mimalloc/src/      static.c" with args clang did not execute successfully (status code exit status: 1).
 

It appears that the issue is caused by the outdated mimalloc which is involved in libmimalloc-sys. There is a discussion regarding this matter.
This bug has been fixed since the upstream of https://github.com/microsoft/mimalloc/releases/tag/v1.7.6, and this version has been adopted since https://github.com/purpleprotocol/mimalloc_rust/releases/tag/v0.1.29.
The latest difftastic is using 0.1.24, which is still behind them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant