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

Having trouble upgrading to wasmd v0.26 #861

Closed
p0mvn opened this issue May 17, 2022 · 4 comments
Closed

Having trouble upgrading to wasmd v0.26 #861

p0mvn opened this issue May 17, 2022 · 4 comments

Comments

@p0mvn
Copy link

p0mvn commented May 17, 2022

Hi there!

I'm trying to build wasmd v0.26.0 and having trouble doing so.

My ultimate goal is to upgrade osmosis to wasmd v0.26.0. I have some work done in this PR . However, it is failing to build with the following error:
https://github.com/osmosis-labs/osmosis/runs/6459547928?check_suite_focus=true

I made sure to match the wasmvm and wasmd versions according to: https://github.com/osmosis-labs/wasmd#compatibility.

Also, I tried building both locally and in Docker without success.

To further test, I attempted to git checkout the v0.26.0 wasmd tag and build it locally without Osmosis involved:

LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build
  • This is from wasmd Dockerfile:
    RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build

However, I would get the same error as before:

$ LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build
go build -mod=readonly -tags "netgo,muslc" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=wasm -X github.com/cosmos/cosmos-sdk/version.AppName=wasmd -X github.com/cosmos/cosmos-sdk/version.Version=0.26.0 -X github.com/cosmos/cosmos-sdk/version.Commit=dc5ef6fe84f0a5e3b0894692a18cc48fb5b00adf -X github.com/CosmWasm/wasmd/app.Bech32Prefix=wasm -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,muslc" -linkmode=external -extldflags "-Wl,-z,muldefs -static"' -trimpath -o build/wasmd ./cmd/wasmd
# github.com/CosmWasm/wasmvm/api
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(num_cpus-c4ff72c03458de44.num_cpus.a9a66fc0-cgu.1.rcgu.o): in function `num_cpus::linux::init_cgroups':
num_cpus.a9a66fc0-cgu.1:(.text._ZN8num_cpus5linux12init_cgroups17h501ed59e51417282E+0x900): undefined reference to `ceil'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(wasmer_vm-89f7c555213e842a.wasmer_vm.7c8f493e-cgu.11.rcgu.o): in function `wasmer_vm_f32_ceil':
wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f32_ceil+0x2): undefined reference to `ceilf'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(wasmer_vm-89f7c555213e842a.wasmer_vm.7c8f493e-cgu.11.rcgu.o): in function `wasmer_vm_f32_floor':
wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f32_floor+0x2): undefined reference to `floorf'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(wasmer_vm-89f7c555213e842a.wasmer_vm.7c8f493e-cgu.11.rcgu.o): in function `wasmer_vm_f32_trunc':
wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f32_trunc+0x2): undefined reference to `truncf'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(wasmer_vm-89f7c555213e842a.wasmer_vm.7c8f493e-cgu.11.rcgu.o): in function `wasmer_vm_f32_nearest':
wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f32_nearest+0x22): undefined reference to `ceilf'
/usr/bin/ld: wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f32_nearest+0x31): undefined reference to `floorf'
/usr/bin/ld: wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f32_nearest+0x87): undefined reference to `floorf'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(wasmer_vm-89f7c555213e842a.wasmer_vm.7c8f493e-cgu.11.rcgu.o): in function `wasmer_vm_f64_ceil':
wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f64_ceil+0x2): undefined reference to `ceil'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(wasmer_vm-89f7c555213e842a.wasmer_vm.7c8f493e-cgu.11.rcgu.o): in function `wasmer_vm_f64_floor':
wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f64_floor+0x2): undefined reference to `floor'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(wasmer_vm-89f7c555213e842a.wasmer_vm.7c8f493e-cgu.11.rcgu.o): in function `wasmer_vm_f64_trunc':
wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f64_trunc+0x2): undefined reference to `trunc'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(wasmer_vm-89f7c555213e842a.wasmer_vm.7c8f493e-cgu.11.rcgu.o): in function `wasmer_vm_f64_nearest':
wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f64_nearest+0x28): undefined reference to `ceil'
/usr/bin/ld: wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f64_nearest+0x39): undefined reference to `floor'
/usr/bin/ld: wasmer_vm.7c8f493e-cgu.11:(.text.wasmer_vm_f64_nearest+0x9d): undefined reference to `floor'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libwasmvm_muslc.a(handlers.o): in function `wasmer_register_setjmp':
handlers.c:(.text.wasmer_register_setjmp+0x32): undefined reference to `sigsetjmp'
collect2: error: ld returned 1 exit status
make: *** [Makefile:85: build] Error 2

Lastly, I tried building the image for the following Dockerfile: https://github.com/CosmWasm/wasmd/blob/dc5ef6fe84f0a5e3b0894692a18cc48fb5b00adf/Dockerfile and it worked.

As a result, it tells me that either the OS or some of the installed dependencies prevent me from building locally or in the Osmosis container. However, I do not see what exactly yet.

Is there anything obvious I am missing?

Any help would be greatly appreciated.

Roman

@p0mvn
Copy link
Author

p0mvn commented May 17, 2022

I'm trying to upgrade to v0.27.0.rc3 now instead. Will update here if I run into the same issue

@ethanfrey
Copy link
Member

hmmm... docker build error.

we are all afk after the conference. do mention me tomorrow if you cannot build with 0.27 rc3

@p0mvn
Copy link
Author

p0mvn commented May 18, 2022

The problem was the base image. We were using golang:1.18-bullseye.

Switched to using: 1.18.2-alpine3.15. The same one as in https://github.com/CosmWasm/wasmd/blob/dc5ef6fe84f0a5e3b0894692a18cc48fb5b00adf/Dockerfile . It ended up working

@alpe
Copy link
Contributor

alpe commented May 18, 2022

Thanks for letting us know how you fixed it. 👍
For support our discord is open as well

@alpe alpe closed this as completed May 18, 2022
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

3 participants