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 brew install rust incompatibility with fdev #885

Open
kernelkind opened this issue Nov 2, 2023 · 1 comment
Open

MacOS brew install rust incompatibility with fdev #885

kernelkind opened this issue Nov 2, 2023 · 1 comment
Labels
A-developer-xp Area: developer experience A-os-integration Area: OS integration planned This has been synced to PT for triage

Comments

@kernelkind
Copy link
Contributor

kernelkind commented Nov 2, 2023

It should be noted that developers using brew install rust will run into issues when using fdev.

Here's how to replicate the problem:

  1. $ brew install rust
  2. $ curl https://sh.rustup.rs -sSf | sh
  3. $ cargo install freenet fdev
  4. $ rustup target add wasm32-unknown-unknown
  5. $ cd <absolute path to identity-managent in freenet-core>
  6. $ gmake build

The following is output from gmake build:
brew_build_output.txt

This problem can be avoided by not using the homebrew version of rust. Here's how to get fdev working again:

  1. $ brew remove rust
  2. $ gmake build

Here's the new (correct) output from gmake build:

cd /Users/redacted/Documents/GitRemotes/freenet-core/modules/identity-management
fdev build --package-type delegate --features contract
Compiling delegate with rust
   Compiling identity-management v0.0.1 (/Users/redacted/Documents/GitRemotes/freenet-core/modules/identity-management)
    Finished release [optimized] target(s) in 1.84s
cd /Users/redacted/Documents/GitRemotes/freenet-core/modules/identity-management
hash=$(bash -c "fdev inspect build/freenet/identity_management delegate | grep 'code hash:' | cut -d' ' -f3")
mkdir -p /Users/redacted/Documents/GitRemotes/freenet-core/modules/identity-management/build
echo -n $hash > /Users/redacted/Documents/GitRemotes/freenet-core/modules/identity-management/build/identity_management_code_hash
cd /Users/redacted/Documents/GitRemotes/freenet-core/modules/identity-management
cargo run -- --path /Users/redacted/Documents/GitRemotes/freenet-core/modules/identity-management/build
    Finished dev [unoptimized + debuginfo] target(s) in 0.10s
     Running `/Users/redacted/Documents/GitRemotes/freenet-core/target/debug/tool --path /Users/redacted/Documents/GitRemotes/freenet-core/modules/identity-management/build`
storing private key file: `identity-manager-key.private.pem`
storing private key file: `identity-manager-key.public.pem`
storing parameters file: `identity-manager-params`
@sanity sanity added A-developer-xp Area: developer experience A-os-integration Area: OS integration planned This has been synced to PT for triage labels Nov 8, 2023
Copy link

github-actions bot commented Nov 8, 2023

Pivotal Tracker story: https://www.pivotaltracker.com/story/show/186434974

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-developer-xp Area: developer experience A-os-integration Area: OS integration planned This has been synced to PT for triage
Projects
None yet
Development

No branches or pull requests

2 participants