osmosis-labs / beaker

Beaker helps streamlining CosmWasm development workflow.
Apache License 2.0
106 stars 30 forks source link

Build failure at optimization step #128

Open hu55a1n1 opened 10 months ago

hu55a1n1 commented 10 months ago

Trying to deploy the counter-example on testnet using the following commands ->

$ cargo install -f beaker
$ beaker --version
beaker 0.1.7
$ beaker new counter-dapp   # chose counter-example
$ cd counter-dapp/
$ export SIGNER="<24 words mnemonic>"
$ beaker wasm deploy counter --signer-mnemonic "$SIGNER" --raw '{ "count": 0 }' --network testnet

The last command fails with the a lot of errors ->

    Finished release [optimized] target(s) in 22.11s
Optimizing wasm...
1.63.0-x86_64-unknown-linux-musl (default)
cargo 1.63.0 (fd9c4297c 2022-07-01)
Building artifacts in workspace...
Found workspace member entries: ["contracts/*"]
Package directories: ["contracts/counter"]
Contracts to be built: ["contracts/counter"]
Building "contracts/counter" ...
warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
package:   /code/contracts/counter/Cargo.toml
workspace: /code/Cargo.toml
   Compiling bnum v0.8.0
error[E0599]: no method named `cast_mut` found for raw pointer `*const [u8; 8]` in the current scope
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/bnum-0.8.0/src/bint/endian.rs:85:47
    |
85  |                     let ptr = uninit.as_ptr().cast_mut() as *mut u8;
    |                                               ^^^^^^^^ help: there is an associated function with a similar name: `as_mut`
...
240 | crate::macro_impl!(endian);
    | -------------------------- in this macro invocation
    |
    = note: try using `<*const T>::as_ref()` to get a reference to the type behind the pointer: https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref
    = note: using `<*const T>::as_ref()` on a pointer which is unaligned or points to invalid or uninitialized memory is undefined behavior
    = note: this error originates in the macro `endian` (in Nightly builds, run with -Z macro-backtrace for more info)

// -------------------------------------------------------------------------------------------------------------------
// TRUNCATED
// --------------------------------------------------------------------------------------------------------------------

For more information about this error, try `rustc --explain E0599`.
error: could not compile `bnum` due to 36 previous errors
thread 'main' panicked at 'assertion failed: error_code.success()', src/main.rs:78:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Failed to execute: `Command {
    program: "docker",
    args: [
        "docker",
        "run",
        "--rm",
        "-v",
        "/home/vboxuser/Downloads/counter-dapp:/code",
        "--mount",
        "type=volume,source=counter-dapp_cache,target=/code/target",
        "--mount",
        "type=volume,source=registry_cache,target=/usr/local/cargo/registry",
        "cosmwasm/workspace-optimizer:0.12.8",
    ],
    create_pidfd: false,
}`

Any ideas what I am doing wrong? Or what might be causing this?