matiasinsaurralde / go-wasm3

Golang wrapper for WASM3 (https://github.com/wasm3/wasm3)
MIT License
77 stars 10 forks source link

build fails on arm #2

Open donpdonp opened 4 years ago

donpdonp commented 4 years ago

I'm working on incorporating go-wasm3 into my project, compiled on an arm64 board. go build claims the m3.a file is "incompatible". Is this a supported platform for go-wasm3?

cd src/gluon; go build -o ../../bin/
# github.com/matiasinsaurralde/go-wasm3
/usr/bin/ld: skipping incompatible /home/donp/go/pkg/mod/github.com/matiasinsaurralde/go-wasm3@v0.0.0-20200430145938-3a21e6ba62e7/lib/linux/libm3.a when searching for -lm3
/usr/bin/ld: cannot find -lm3

the board is a Pine64 (Allwinner A64 CPU) and the OS is Armbian (ARM Port) of Ubuntu 18.04.

matiasinsaurralde commented 4 years ago

Hi, that's very interesting! I will investigate support for this architecture over the next days. Thanks for reporting the issue

donpdonp commented 4 years ago

taking a second look at the out, "skipping incompatible" indicates the wrong architecture. sure enough the contents of libm3.a are

libm3.a:              current ar archive
m3_api_libc.c.o:      ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
...

I'm not sure how that happened, i didnt know this arm64 board could cross-compile for x86.