ohos-rs / example

A set of exmaples with ohos-rs for HarmonyOS
MIT License
7 stars 1 forks source link

cargo install ohrs 失败 #21

Closed jiabochao closed 3 months ago

jiabochao commented 3 months ago
bochao@BochaodeMBP hello_ohos % cargo install ohrs        
    Updating crates.io index
  Installing ohrs v0.5.2
    Updating crates.io index
     Locking 88 packages to latest compatible versions
      Adding bitflags v1.3.2 (latest: v2.6.0)
      Adding generic-array v0.14.7 (latest: v1.1.0)
      Adding git2 v0.18.3 (latest: v0.19.0)
      Adding idna v0.5.0 (latest: v1.0.2)
      Adding libgit2-sys v0.16.2+1.7.2 (latest: v0.17.0+1.8.1)
      Adding linux-raw-sys v0.4.14 (latest: v0.6.4)
      Adding redox_syscall v0.4.1 (latest: v0.5.3)
   Compiling libc v0.2.155
   Compiling pkg-config v0.3.30
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling vcpkg v0.2.15
   Compiling version_check v0.9.4
   Compiling typenum v1.17.0
   Compiling serde v1.0.204
   Compiling cfg-if v1.0.0
   Compiling tinyvec_macros v0.1.1
   Compiling rustix v0.38.34
   Compiling tinyvec v1.8.0
   Compiling bitflags v2.6.0
   Compiling camino v1.1.7
   Compiling generic-array v0.14.7
   Compiling unicode-bidi v0.3.15
   Compiling serde_json v1.0.120
error: failed to run custom build command for `generic-array v0.14.7`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/generic-array-3ab10ad6b55e9cb2/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `proc-macro2 v1.0.86`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/proc-macro2-b35825358680b6ee/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `libc v0.2.155`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/libc-69fc1ce02ad5b6cc/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `rustix v0.38.34`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/rustix-747af681e5b11bd7/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `typenum v1.17.0`

Caused by:
  process didn't exit successfully: `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx/release/build/typenum-cd1b97ae7285ff9a/build-script-main` (signal: 9, SIGKILL: kill)
error: failed to compile `ohrs v0.5.2`, intermediate artifacts can be found at `/var/folders/9p/z32hf03n74dc7bymx2d23xqm0000gn/T/cargo-installBVPlxx`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
bochao@BochaodeMBP hello_ohos % rustup --version
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.79.0 (129f3b996 2024-06-10)`
bochao@BochaodeMBP hello_ohos % rustc --version
rustc 1.79.0 (129f3b996 2024-06-10)
bochao@BochaodeMBP hello_ohos % cargo --version 
cargo 1.79.0 (ffa9cf99a 2024-06-03)
bochao@BochaodeMBP hello_ohos % 
github-actions[bot] commented 3 months ago

@richerfu Please check this issue, thanks.

richerfu commented 3 months ago

重置环境试下,看起来是环境导致的构建失败。之前出现过 git2 构建失败。 @jiabochao

jiabochao commented 3 months ago

重置环境试下,看起来是环境导致的构建失败。之前出现过 git2 构建失败。 @jiabochao

重置环境是重新安装一下rust环境吗

richerfu commented 3 months ago

重置环境试下,看起来是环境导致的构建失败。之前出现过 git2 构建失败。 @jiabochao

重置环境是重新安装一下rust环境吗

是的 同时尝试清理各种用户自定义配置项。比如用户级别的 config.toml 等

jiabochao commented 3 weeks ago

参考如下issue

执行如下命令问题解决

brew uninstall binutils