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 #2137

Closed
2 tasks
niu541412 opened this issue Jul 5, 2024 · 1 comment
Closed
2 tasks

Build Failed in old MacOS version #2137

niu541412 opened this issue Jul 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@niu541412
Copy link

niu541412 commented Jul 5, 2024

Bug Description

This error attached below was encountered when I built https://github.com/nicolargo/glances in Homebrew. Homebrew will build package from source in deprecated MacOS.

It seems caused by the outdated rust cc package in the requirements and only occurred in old MacOS versions. It has been fixed since 1.0.94, rust-lang/cc-rs#1007.

           Running `rustc --crate-name build_script_build --edition=2015 /Users/jomic/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C metadata=aa68bac46a22054c -C extra-filename=-aa68bac46a22054c --out-dir /private/var/folders/8t/xrq5dqhs3jx522fngh9_09km0000h1/T/pip-install-x6vdobi6/maturin_35b459eb6be54f839f892996ead8406f/target/release/build/stacker-aa68bac46a22054c -C strip=debuginfo -L dependency=/private/var/folders/8t/xrq5dqhs3jx522fngh9_09km0000h1/T/pip-install-x6vdobi6/maturin_35b459eb6be54f839f892996ead8406f/target/release/deps --extern cc=/private/var/folders/8t/xrq5dqhs3jx522fngh9_09km0000h1/T/pip-install-x6vdobi6/maturin_35b459eb6be54f839f892996ead8406f/target/release/deps/libcc-eb9d8d76e92bae18.rlib --cap-lints allow`
      The following warnings were emitted during compilation:
      
      warning: [email protected]: clang: error: invalid version number in '-mmacosx-version-min=1.1'
      
      error: failed to run custom build command for `psm v0.1.21`
      Caused by:
        process didn't exit successfully: `/private/var/folders/8t/xrq5dqhs3jx522fngh9_09km0000h1/T/pip-install-x6vdobi6/maturin_35b459eb6be54f839f892996ead8406f/target/release/build/psm-d1eb973c58b921d9/build-script-build` (exit status: 1)
        --- stdout
        OPT_LEVEL = Some("3")
        TARGET = Some("x86_64-apple-darwin")
        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 = 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=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:rustc-cfg=asm
        cargo:rustc-cfg=switchable_stack
        cargo:warning=clang: error: invalid version number in '-mmacosx-version-min=1.1'
      
        --- stderr
      
      
        error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-apple-darwin" "-mmacosx-version-min=1.1" "-Wall" "-Wextra" "-xassembler-with-cpp" "-DCFG_TARGET_OS_macos" "-DCFG_TARGET_ARCH_x86_64" "-DCFG_TARGET_ENV_" "-o" "/private/var/folders/8t/xrq5dqhs3jx522fngh9_09km0000h1/T/pip-install-x6vdobi6/maturin_35b459eb6be54f839f892996ead8406f/target/release/build/psm-d1192970f7a0e986/out/e4479bd7784abb10-x86_64.o" "-c" "src/arch/x86_64.s" with args "cc" did not execute successfully (status code exit status: 1).
      
      

Your maturin version (maturin --version)

1.6.0

Your Python version (python -V)

python 3.12

Your pip version (pip -V)

24.1

What bindings you're using

None

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

pip install --no-binary :all: --only-binary :none: 'maturin>=1,<2'
in MacOS High Sierra 10.13

@niu541412 niu541412 added the bug Something isn't working label Jul 5, 2024
@messense
Copy link
Member

messense commented Jul 7, 2024

main is already using cc 1.0.99 which should have fixed this.

@messense messense closed this as completed Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants