Skip to content

M1 Mac using cargo run doesn't work unless remove rust-toolchain.toml #14673

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

Closed
jonathanpv opened this issue Sep 30, 2022 · 4 comments
Closed
Labels
type: bug A code related bug.

Comments

@jonathanpv
Copy link
Contributor

jonathanpv commented Sep 30, 2022

A note for the community

For some reason removing rust-toolchain.toml makes cargo run work again

error: the 'cargo' binary, normally provided by the 'cargo' component, is not applicable to the '1.64.0-aarch64-apple-darwin' toolchain

image

However we then get the issue again:

error: package `vector v0.25.0 (/Users/jon.padilla/Documents/datadoge/vector)` cannot be built because it requires rustc 1.64.0 or newer, while the currently active rustc version is 1.63.0

image

Problem

Seems to be a problem with mac not working with the version of rust.

Configuration

No response

Version

v0.25.0

Debug Output

No response

Example Data

No response

Additional Context

No response

References

rust-lang/rustup#3025

@jonathanpv jonathanpv added the type: bug A code related bug. label Sep 30, 2022
@jonathanpv jonathanpv changed the title Mac using cargo run doesn't work unless remove rust-toolchain.toml M1 Mac using cargo run doesn't work unless remove rust-toolchain.toml Sep 30, 2022
@jonathanpv jonathanpv changed the title M1 Mac using cargo run doesn't work unless remove rust-toolchain.toml M1 Mac using cargo run doesn't work unless remove rust-toolchain.toml Sep 30, 2022
@jonathanpv
Copy link
Contributor Author

Steps to solve:
We need to uninstall and reinstall by doing

rustup self uninstall
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Go with default installation and cargo run should now work.

@jonathanpv
Copy link
Contributor Author

After reinstalling there was an issue with updating some git submodules as seen by this output

jon.padilla@COMP-W936N7C769 vector % cargo run 
    Updating git submodule `https://boringssl.googlesource.com/boringssl`
warning: spurious network error (2 tries remaining): SecureTransport error: connection closed via error; class=Net (12)
warning: spurious network error (1 tries remaining): SecureTransport error: connection closed via error; class=Net (12)
error: failed to load source for dependency `openssl-src`

Caused by:
  Unable to update https://github.com/vectordotdev/openssl-src-rs.git?branch=enable_engine#52be5ec9

Caused by:
  failed to update submodule `openssl`

Caused by:
  failed to update submodule `boringssl`

Caused by:
  failed to fetch submodule `boringssl` from https://boringssl.googlesource.com/boringssl

Caused by:
  network failure seems to have happened
  if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  SecureTransport error: connection closed via error; class=Net (12)
jon.padilla@COMP-W936N7C769 vector % export CARGO_NET_GIT_FETCH_WITH_CLI=true
jon.padilla@COMP-W936N7C769 vector % cargo run                               
    Updating git submodule `https://boringssl.googlesource.com/boringssl`
    Updating git submodule `https://github.com/krb5/krb5`
    Updating git submodule `https://github.com/pyca/cryptography.git`
    Updating git submodule `https://github.com/google/wycheproof`
    Updating git repository `https://github.com/vectordotdev/tokio`
    Updating crates.io index

The solution was to set a temporary env variable to continue with compilation of vector

@jonathanpv
Copy link
Contributor Author

I also had to

brew install protobuf

to run vector locally

@jonathanpv
Copy link
Contributor Author

vector now runs locally and I can run cargo run in lib/vrl/cli to get the REPL working again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

1 participant