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

Failed to install pop-cli on my device! #320

Closed
ganesh1997oli opened this issue Oct 15, 2024 · 18 comments
Closed

Failed to install pop-cli on my device! #320

ganesh1997oli opened this issue Oct 15, 2024 · 18 comments

Comments

@ganesh1997oli
Copy link

I was trying to install pop-cli using this tutorial, but I am facing issue on my Macbook Air M1 device.

It would be really helpful if someone could help me to figure this out.

The following warnings were emitted during compilation:

warning: [email protected]: In file included from /Users/ganesholi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.126/src/cxx.cc:1:
warning: [email protected]: /Users/ganesholi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.126/src/../include/cxx.h:2:10: fatal error: 'algorithm' file not found
warning: [email protected]:     2 | #include <algorithm>
warning: [email protected]:       |          ^~~~~~~~~~~
warning: [email protected]: 1 error generated.

error: failed to run custom build command for `cxx v1.0.126`

Caused by:
  process didn't exit successfully: `/var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/cargo-installMwX0DV/release/build/cxx-4e43b54a857f030c/build-script-build` (exit status: 1)
  --- stdout
  OUT_DIR = Some(/var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/cargo-installMwX0DV/release/build/cxx-0fcf72758926503a/out)
  TARGET = Some(aarch64-apple-darwin)
  OPT_LEVEL = Some(3)
  HOST = Some(aarch64-apple-darwin)
  cargo:rerun-if-env-changed=CXX_aarch64-apple-darwin
  CXX_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CXX_aarch64_apple_darwin
  CXX_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  RUSTC_WRAPPER = None
  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=CXXFLAGS_aarch64-apple-darwin
  CXXFLAGS_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CXXFLAGS_aarch64_apple_darwin
  CXXFLAGS_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:warning=In file included from /Users/ganesholi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.126/src/cxx.cc:1:
  cargo:warning=/Users/ganesholi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.126/src/../include/cxx.h:2:10: fatal error: 'algorithm' file not found
  cargo:warning=    2 | #include <algorithm>
  cargo:warning=      |          ^~~~~~~~~~~
  cargo:warning=1 error generated.

  --- stderr


  error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin" "-mmacosx-version-min=15.0" "-std=c++11" "-Wall" "-Wextra" "-o" "/var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/cargo-installMwX0DV/release/build/cxx-0fcf72758926503a/out/864a09aa1c9d6326-cxx.o" "-c" "/Users/ganesholi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.126/src/cxx.cc" with args c++ did not execute successfully (status code exit status: 1).


warning: build failed, waiting for other jobs to finish...
error: failed to compile `pop-cli v0.4.0`, intermediate artifacts can be found at `/var/folders/q3/d699hkpx49xfy236ph7sltr40000gn/T/cargo-installMwX0DV`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@brunopgalvao
Copy link
Contributor

brunopgalvao commented Oct 15, 2024

Please include the output of rustup show as well as your operating system and version.

@ganesh1997oli
Copy link
Author

Please include the output of rustup show as well as your operating system and version.

ganesholi@Ganeshs-MacBook-Air ~ % rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/ganesholi/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
nightly-aarch64-apple-darwin

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.81.0 (eeb90cda1 2024-09-04)

Operation system and version: macOS 15.0.1 (24A348)

@brunopgalvao
Copy link
Contributor

Which command gave you this error?

@ganesh1997oli
Copy link
Author

Which command gave you this error?

cargo install --force --locked pop-cli

@ganesh1997oli
Copy link
Author

Which command gave you this error?

cargo install --force --locked pop-cli

any recommendation?

@AlexD10S
Copy link
Collaborator

Can you try to install it from Github? cargo install --locked --git https://github.com/r0gue-io/pop-cli

@ganesh1997oli
Copy link
Author

Can you try to install it from Github? cargo install --locked --git https://github.com/r0gue-io/pop-cli

no same issue as before

@AlexD10S
Copy link
Collaborator

I've never encountered this error before. It might be related to your environment. Could you please check our documentation to install the necessary prerequisites to use Pop CLI on macOS: https://learn.onpop.io/cli/installing-pop-cli/macos

Another thing you can try is to download the binary directly instead of building it: https://github.com/r0gue-io/pop-cli/releases/download/v0.4.0/pop-aarch64-apple-darwin.tar.gz

@cyanic-selkie
Copy link

@ganesh1997oli Did you manage to fix this error?

@kevin-valerio
Copy link

kevin-valerio commented Oct 31, 2024

@ganesh1997oli Did you manage to fix this error?

Somehow for me removing cxx worked. So in that case it would be rm -rf /Users/ganesholi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cxx-1.0.126/. Maybe you can give it a try ?

@cyanic-selkie
Copy link

@kevin-valerio Thanks, but I don't even have it. I tried deleting the entire src directory, but it didn't change anything.

@kevin-valerio
Copy link

kevin-valerio commented Oct 31, 2024

Thanks, but I don't even have it. I tried deleting the entire src directory, but it didn't change anything.

@cyanic-selkie
What's the error you're having exactly ? Can you send the trace?

@cyanic-selkie
Copy link

@kevin-valerio

Actually, it has nothing to do with this repo. I saw this issue was mentioned here (although I can't see where) and asked OP what was their solution on the off-chance it might be a similar fix.

@kevin-valerio
Copy link

@kevin-valerio

Actually, it has nothing to do with this repo. I saw this issue was mentioned here (although I can't see where) and asked OP what was their solution on the off-chance it might be a similar fix.

Mine was also not related to the repo, but I don't understand how you cannot have cxx-1.0.126 in your .cargo/registryif you're having that bug

@cyanic-selkie
Copy link

@kevin-valerio It's not the same error. I have the error in the linked issue. But I'm stuck so I figured I'll ask.

@ganesh1997oli
Copy link
Author

@ganesh1997oli Did you manage to fix this error?

yes I have fixed this error

@cyanic-selkie
Copy link

@ganesh1997oli Do you mind sharing how?

@ganesh1997oli
Copy link
Author

@ganesh1997oli Do you mind sharing how?

Actually, I just reinstalled all dependencies, and that worked for me!

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

5 participants