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

Cannot install Bitcoin Pro 0.1.0-beta.2 on macOS Big Sur #8

Open
louneskmt opened this issue Mar 9, 2021 · 17 comments
Open

Cannot install Bitcoin Pro 0.1.0-beta.2 on macOS Big Sur #8

louneskmt opened this issue Mar 9, 2021 · 17 comments
Labels
install Issues related to installation/compilation process macos macOS specific issues unconfirmed The issue/bug that is not comfirmed

Comments

@louneskmt
Copy link

louneskmt commented Mar 9, 2021

Hey!

I tried to install Bitcoin Pro using with cargo:

cargo install bitcoin-pro --version 0.1.0-beta.2   

But it couldn't compile rgb-core and the installation resulted in the following errors.

   Compiling lnpbp v0.3.3
   Compiling rgb-core v0.3.1
error[E0599]: the method `strict_encode` exists for struct `secp256k1zkp::SecretKey`, but its trait bounds were not satisfied
   --> /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:255:17
    |
255 |                 strict_encode_list!(e; EncodingTag::U64, self.value, self.blinding),
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `secp256k1zkp::SecretKey` due to unsatisfied trait bounds
    | 
   ::: /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.1.1/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictEncode`
    | 
   ::: /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictEncode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictEncode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: the function or associated item `strict_decode` exists for struct `secp256k1zkp::SecretKey`, but its trait bounds were not satisfied
   --> /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:266:47
    |
266 |                     blinding: BlindingFactor::strict_decode(&mut d)?,
    |                                               ^^^^^^^^^^^^^ function or associated item cannot be called on `secp256k1zkp::SecretKey` due to unsatisfied trait bounds
    | 
   ::: /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.1.1/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictDecode`
    | 
   ::: /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictDecode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&mut secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&mut secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
error: could not compile `rgb-core`

Rust version:

➜  ~ rustc -V
rustc 1.52.0-nightly (35dbef235 2021-03-02)

macOS version: Big Sur 11.0.1 (latest)
Xcode and Xcode CLT: latest versions

Any ideas?

@louneskmt
Copy link
Author

I just tested on an Ubuntu 20.04.2 VM, same error.

@vafanassieff
Copy link

vafanassieff commented Mar 12, 2021

Same with OSX Mojave

➜  bitcoin-pro git:(master)  sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G6032

➜  bitcoin-pro git:(master)  rustup -V
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active rustc version is rustc 1.52.0-nightly (4a8b6f708 2021-03-11)

EDIT : With cargo update and cargo build --all-features i managed to build the bitcoin-pro binary

@louneskmt
Copy link
Author

louneskmt commented Mar 12, 2021

Hey @vafanassieff! I've the same error manually building it from the v0.1.0-beta.2 branch. I also tried from master and it couldn't compile amplify_derive_helpers (error: unknown 'doc' attribute 'hide').

@vafanassieff
Copy link

I went from master and run the cargo command in the previous comment
I guess it's missing some stuff for osx i have no icon with this build.

See here #7 (comment)

@louneskmt
Copy link
Author

louneskmt commented Mar 13, 2021

@vafanassieff I managed to build from master, but only on Ubuntu. Thanks!

@Goosie
Copy link

Goosie commented Mar 15, 2021

Try the commands:
git checkout master
git pull origin
cargo clean
cargo update
cargo build --all-features

Than go to bitcoin-pro/target/debug and run there
./bitcoin-pro

@dr-orlovsky
Copy link
Member

alternatively after the new release you can use cargo install bitcoin-pro which will install 0.1.0 version

@Goosie
Copy link

Goosie commented Mar 17, 2021

NIce tried it, and it is working. Some small warnings comes up on my machine:
image
small errors

@louneskmt
Copy link
Author

Thanks for your answer @dr-orlovsky. Unfortunately, I'm facing the following error:

   Compiling amplify_derive_helpers v0.0.4
error: unknown `doc` attribute `hide`
   --> /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify_derive_helpers-0.0.4/src/attr.rs:492:7
    |
492 | #[doc(hide)]
    |       ^^^^

error: unknown `doc` attribute `hide`
   --> /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify_derive_helpers-0.0.4/src/attr.rs:494:11
    |
494 |     #[doc(hide)]
    |           ^^^^

error: unknown `doc` attribute `hide`
   --> /Users/lounesksouri/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify_derive_helpers-0.0.4/src/attr.rs:501:11
    |
501 |     #[doc(hide)]
    |           ^^^^

   Compiling zeroize_derive v0.9.3
error: aborting due to 3 previous errors

error: could not compile `amplify_derive_helpers`

@dr-orlovsky
Copy link
Member

@louneskmt seems you are using outdated rust compiler version. Can you try to compile with nightly? cargo +nightly install bitcoin-pro or, if you are cloning the repo, cargo +nightly build --release

@louneskmt
Copy link
Author

@dr-orlovsky I'm using the nightly compiler version.

➜  bitcoin-pro git:(master) rustup -V
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.52.0-nightly (35dbef235 2021-03-02)`
➜  bitcoin-pro git:(master) rustc -V                                            
rustc 1.52.0-nightly (35dbef235 2021-03-02)

I get the exact same error with both commands you provided me.

@dr-orlovsky
Copy link
Member

We experience very strange behaviour of Cargo (rust package manager) using wrong versions of dependencies and unable to understand the reasons of it... Have not the situation changed after removing the repo, cloning it back, doing cargo clear and building from scratch?

Related discussion from here: LNP-WG/lnp-node#22 (comment)

@louneskmt
Copy link
Author

@dr-orlovsky Still the exact same error as here: #8 (comment)

@UkolovaOlga UkolovaOlga added bug Something isn't working install Issues related to installation/compilation process macos macOS specific issues labels Apr 28, 2021
@dr-orlovsky
Copy link
Member

@louneskmt v0.1.1 with upstream dependency problems fixed is out. Can you try it? (It works on my Mac OS Big Sur).

Just do cargo install bitcoin-pro from anywhere or pull the latest master and do cargo run from inside the repo

@louneskmt
Copy link
Author

Thanks @dr-orlovsky, will try asap and report back.

@louneskmt
Copy link
Author

@dr-orlovsky Unfortunately, still the same issue. I tried both the cargo install and running from master, it fails at the same point #8 (comment).

@dr-orlovsky
Copy link
Member

Well, it certainly builds on my local machine with Mac OS Big Sure, so this seems to be some cache/cargo issue. Try delete the repo, git clone it again, do cargo update inside of it and run cargo run - it must work after that. If not, do cargo clean once again.

@dr-orlovsky dr-orlovsky added unconfirmed The issue/bug that is not comfirmed and removed bug Something isn't working labels Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install Issues related to installation/compilation process macos macOS specific issues unconfirmed The issue/bug that is not comfirmed
Projects
None yet
Development

No branches or pull requests

5 participants