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

macOS toolchain build failing #4

Closed
lrettig opened this issue Jun 9, 2024 · 1 comment · Fixed by #5
Closed

macOS toolchain build failing #4

lrettig opened this issue Jun 9, 2024 · 1 comment · Fixed by #5
Labels
help wanted Extra attention is needed macOS

Comments

@lrettig
Copy link

lrettig commented Jun 9, 2024

See https://github.com/athenavm/rustc-rv32e-toolchain/actions/runs/9433633098/job/25984776025. Probably related to #1 (comment).

     Compiling compiler_builtins v0.1.105 (https://github.com/rust-lang/compiler-builtins?rev=0.1.105#80ed5f8c)
  The following warnings were emitted during compilation:
  
  warning: [email protected]: clang: error: no such file or directory: '/Users/runner/work/rustc-rv32e-toolchain/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/cpu_model.c'
  warning: [email protected]: clang: error: no input files
...
    error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin" "-mmacosx-version-min=14.0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-arch" "arm64" "-I" "/Users/runner/work/rustc-rv32e-toolchain/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins" "-fno-builtin" "-fvisibility=hidden" "-ffreestanding" "-fomit-frame-pointer" "-ffile-prefix-map=/Users/runner/work/rustc-rv32e-toolchain/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt=." "-DVISIBILITY_HIDDEN" "-o" "/Users/runner/work/rustc-rv32e-toolchain/rustc-rv32e-toolchain/rust/build/aarch64-apple-darwin/stage0-std/aarch64-apple-darwin/release/build/compiler_builtins-06aa8d6cbf0eca48/out/b1e1f1c1c3a65108-cpu_model.o" "-c" "/Users/runner/work/rustc-rv32e-toolchain/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/cpu_model.c" with args "cc" did not execute successfully (status code exit status: 1).
@lrettig lrettig added help wanted Extra attention is needed macOS labels Jun 9, 2024
@lrettig
Copy link
Author

lrettig commented Aug 8, 2024

It looks like this is happening due to #1 (comment), which for some reason isn't macOS friendly.

Here's what I get when compiling without the compiler_builtins patch, looks like the same error originally encountered in #1.

   Compiling compiler_builtins v0.1.108
The following warnings were emitted during compilation:

warning: [email protected]: clang: warning: argument unused during compilation: '-march=rv32em' [-Wunused-command-line-argument]
warning: [email protected]: clang: warning: argument unused during compilation: '-mabi=ilp32' [-Wunused-command-line-argument]
warning: [email protected]: error: unknown target triple 'riscv32em-athena-zkvm-elf', please use -triple or -arch

error: failed to run custom build command for `compiler_builtins v0.1.108`

Caused by:
  process didn't exit successfully: `/Users/lane/wip/rustc-rv32e-toolchain/rust/build/aarch64-apple-darwin/stage2-std/release/build/compiler_builtins-b7c1e4aa3a604438/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:compiler-rt=/Users/lane/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.108/compiler-rt
  cargo:rustc-cfg=feature="unstable"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/absvdi2.c
  cargo:rustc-cfg=__absvdi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/absvsi2.c
  cargo:rustc-cfg=__absvsi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/absvti2.c
  cargo:rustc-cfg=__absvti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/addvdi3.c
  cargo:rustc-cfg=__addvdi3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/addvsi3.c
  cargo:rustc-cfg=__addvsi3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/addvti3.c
  cargo:rustc-cfg=__addvti3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/bswapsi2.c
  cargo:rustc-cfg=__bswapsi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/clzdi2.c
  cargo:rustc-cfg=__clzdi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/clzsi2.c
  cargo:rustc-cfg=__clzsi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/clzti2.c
  cargo:rustc-cfg=__clzti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/cmpdi2.c
  cargo:rustc-cfg=__cmpdi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/cmpti2.c
  cargo:rustc-cfg=__cmpti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/ctzdi2.c
  cargo:rustc-cfg=__ctzdi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/ctzsi2.c
  cargo:rustc-cfg=__ctzsi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/ctzti2.c
  cargo:rustc-cfg=__ctzti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/divdc3.c
  cargo:rustc-cfg=__divdc3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/divsc3.c
  cargo:rustc-cfg=__divsc3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/extendhfsf2.c
  cargo:rustc-cfg=__extendhfsf2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/ffsti2.c
  cargo:rustc-cfg=__ffsti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/int_util.c
  cargo:rustc-cfg=__int_util="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/muldc3.c
  cargo:rustc-cfg=__muldc3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/mulsc3.c
  cargo:rustc-cfg=__mulsc3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/mulvdi3.c
  cargo:rustc-cfg=__mulvdi3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/mulvsi3.c
  cargo:rustc-cfg=__mulvsi3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/mulvti3.c
  cargo:rustc-cfg=__mulvti3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/negdf2.c
  cargo:rustc-cfg=__negdf2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/negdi2.c
  cargo:rustc-cfg=__negdi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/negsf2.c
  cargo:rustc-cfg=__negsf2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/negti2.c
  cargo:rustc-cfg=__negti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/negvdi2.c
  cargo:rustc-cfg=__negvdi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/negvsi2.c
  cargo:rustc-cfg=__negvsi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/negvti2.c
  cargo:rustc-cfg=__negvti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/paritydi2.c
  cargo:rustc-cfg=__paritydi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/paritysi2.c
  cargo:rustc-cfg=__paritysi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/parityti2.c
  cargo:rustc-cfg=__parityti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/popcountdi2.c
  cargo:rustc-cfg=__popcountdi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/popcountsi2.c
  cargo:rustc-cfg=__popcountsi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/popcountti2.c
  cargo:rustc-cfg=__popcountti2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/subvdi3.c
  cargo:rustc-cfg=__subvdi3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/subvsi3.c
  cargo:rustc-cfg=__subvsi3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/subvti3.c
  cargo:rustc-cfg=__subvti3="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/truncdfhf2.c
  cargo:rustc-cfg=__truncdfhf2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/truncsfhf2.c
  cargo:rustc-cfg=__truncsfhf2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/ucmpdi2.c
  cargo:rustc-cfg=__ucmpdi2="optimized-c"
  cargo:rerun-if-changed=/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/ucmpti2.c
  cargo:rustc-cfg=__ucmpti2="optimized-c"
  TARGET = Some("riscv32em-athena-zkvm-elf")
  OPT_LEVEL = Some("3")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CC_riscv32em-athena-zkvm-elf
  CC_riscv32em-athena-zkvm-elf = None
  cargo:rerun-if-env-changed=CC_riscv32em_athena_zkvm_elf
  CC_riscv32em_athena_zkvm_elf = Some("cc")
  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_riscv32em-athena-zkvm-elf
  CFLAGS_riscv32em-athena-zkvm-elf = None
  cargo:rerun-if-env-changed=CFLAGS_riscv32em_athena_zkvm_elf
  CFLAGS_riscv32em_athena_zkvm_elf = Some("-ffunction-sections -fdata-sections -fPIC -march=rv32em -mabi=ilp32 -mcmodel=medany")
  cargo:rerun-if-env-changed=CC_riscv32em-athena-zkvm-elf
  CC_riscv32em-athena-zkvm-elf = None
  cargo:rerun-if-env-changed=CC_riscv32em_athena_zkvm_elf
  CC_riscv32em_athena_zkvm_elf = Some("cc")
  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=CFLAGS_riscv32em-athena-zkvm-elf
  CFLAGS_riscv32em-athena-zkvm-elf = None
  cargo:rerun-if-env-changed=CFLAGS_riscv32em_athena_zkvm_elf
  CFLAGS_riscv32em_athena_zkvm_elf = Some("-ffunction-sections -fdata-sections -fPIC -march=rv32em -mabi=ilp32 -mcmodel=medany")
  cargo:rerun-if-env-changed=CC_riscv32em-athena-zkvm-elf
  CC_riscv32em-athena-zkvm-elf = None
  cargo:rerun-if-env-changed=CC_riscv32em_athena_zkvm_elf
  CC_riscv32em_athena_zkvm_elf = Some("cc")
  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=CFLAGS_riscv32em-athena-zkvm-elf
  CFLAGS_riscv32em-athena-zkvm-elf = None
  cargo:rerun-if-env-changed=CFLAGS_riscv32em_athena_zkvm_elf
  CFLAGS_riscv32em_athena_zkvm_elf = Some("-ffunction-sections -fdata-sections -fPIC -march=rv32em -mabi=ilp32 -mcmodel=medany")
  cargo:warning=clang: warning: argument unused during compilation: '-march=rv32em' [-Wunused-command-line-argument]
  cargo:warning=clang: warning: argument unused during compilation: '-mabi=ilp32' [-Wunused-command-line-argument]
  cargo:warning=error: unknown target triple 'riscv32em-athena-zkvm-elf', please use -triple or -arch

  --- stderr


  error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=riscv32em-athena-zkvm-elf" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=rv32em" "-mabi=ilp32" "-mcmodel=medany" "-fno-builtin" "-fvisibility=hidden" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-o" "/Users/lane/wip/rustc-rv32e-toolchain/rust/build/aarch64-apple-darwin/stage2-std/riscv32em-athena-zkvm-elf/release/build/compiler_builtins-1b7fd6306be4a4e1/out/a2cc1aa92af13a0b-absvdi2.o" "-c" "/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/absvdi2.c" with args "cc" did not execute successfully (status code exit status: 1).


warning: build failed, waiting for other jobs to finish...

Here's the error I get with the patch:

  cargo:warning=clang: error: no such file or directory: '/Users/lane/wip/rustc-rv32e-toolchain/rust/src/llvm-project/compiler-rt/lib/builtins/cpu_model.c'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant