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

Build failure at optimization step #128

Open
hu55a1n1 opened this issue Nov 14, 2023 · 0 comments
Open

Build failure at optimization step #128

hu55a1n1 opened this issue Nov 14, 2023 · 0 comments

Comments

@hu55a1n1
Copy link

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?

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

1 participant