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

libwasmvm_muslc.aarch64.a cannot be linked #306

Closed
webmaster128 opened this issue Mar 22, 2022 · 5 comments
Closed

libwasmvm_muslc.aarch64.a cannot be linked #306

webmaster128 opened this issue Mar 22, 2022 · 5 comments

Comments

@webmaster128
Copy link
Member

webmaster128 commented Mar 22, 2022

wasmvm v1.0.0-beta8 adds a libwasmvm_muslc.aarch64.a from cross compile setup (#305).

Unfortunately when trying to link this to wasmd, I get the following error:

#21 31.57 # github.com/CosmWasm/wasmvm/api
#21 31.57 /lib/../lib/libwasmvm_muslc.a(sigsetjmp.lo): in function `sigsetjmp':
#21 31.57 (.text+0x0): relocation truncated to fit: R_AARCH64_CONDBR19 against symbol `setjmp' defined in .text section in /lib/../lib/libwasmvm_muslc.a(setjmp.lo)
#21 31.57 collect2: error: ld returned 1 exit status
#21 46.04 make: *** [Makefile:82: build] Error 2

I don't know what this means and everything I find deals with assembly code I don't understand.

@mandrean
Copy link

Got the same errors roughly a month ago using a Dockerized muslc arm64 build on my M1 Mac

Gave up after a couple of days and switched to the .so artifact, but before that I experimented with various suggestions and linker flags from this thread:

https://stackoverflow.com/questions/10486116/what-does-this-gcc-error-relocation-truncated-to-fit-mean

Maybe you can make more sense of it 😄

@webmaster128
Copy link
Member Author

I think I will do #277 first, hoping the error will resolve by upgrading the compiler.

@webmaster128
Copy link
Member Author

Upgrading Rust (#277) solved the problem. I have a statically linked musl binary for Linux now that runs fine in a docker container on an M1 mac.

@webmaster128
Copy link
Member Author

Shipped as part of v1.0.0-beta9 and it is working.

@mandrean
Copy link

Amazing! Great work @webmaster128

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

2 participants