Open thinkinginmath opened 1 month ago
Thanks for reporting the problem! We updated our README to reflect the need to upgrade the WasmEdge version, which is a requirements to build the application.
Please try the following commands:
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0
source $HOME/.wasmedge/env
Said that, you're question is totally fair. What you can expect to be fully stable at this point is what is released. However, we're currently discussing and working on improving our dev process to have better quality assurance in our main branch without damaging our iteration speed.
with updated code and WASM, I got link error this time: (on M2 MacBook Pro)
23cc47fb21a9 in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) "_WasmEdge_ValTypeIsRef", referenced from: wasmedgesys::types::$LT$impl$u20$core..convert..From$LT$wasmedge_sys..ffi..WasmEdge_ValType$GT$$u20$for$u20$wasmedge_types..ValType$GT$::from::h45c123cc47fb21a9 in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) "_WasmEdge_ValTypeIsV128", referenced from: wasmedgesys::types::$LT$impl$u20$core..convert..From$LT$wasmedge_sys..ffi..WasmEdge_ValType$GT$$u20$for$u20$wasmedge_types..ValType$GT$::from::h45c123cc47fb21a9 in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) "_WasmEdge_ValidatorCreate", referenced from: wasmedge_sys::validator::Validator::create::hf3f58a9c8b3eb606 in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) "_WasmEdgeValidatorDelete", referenced from: $LT$wasmedge_sys..validator..Validator$u20$as$u20$core..ops..drop..Drop$GT$::drop::h316710f4a629bce4 in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) "_WasmEdge_ValidatorValidate", referenced from: wasmedge_sys::validator::Validator::validate::h829cf2bfcd5f5715 in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: could not compile moxin
(bin "_moxin_app") due to 1 previous error
@juntao @L-jasmine Can you help to diagnose this issue?
@thinkinginmath It looks like you have the wrong version of libwasmedge, so check that it links to 0.14
Maybe you can do a
wasmedge --version
to see the current version? Thanks.
it is 0.14.0 % wasmedge --version wasmedge version 0.14.0
does the current build assume certain MacOS version? Mine is Version 13.2.1 (22D68).
I looked at the error, and found this: ld: warning: object file ../src/moxin/target/debug/deps/liblibsqlite3_sys-8fee68f835b046c4.rlib(0343851c9008f270-sqlite3.o)) was built for newer macOS version (13.3) than being linked (13.0) ld: warning: ignoring file ../.wasmedge/lib/libwasmedge.tbd, building for macOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x7B 0x0A 0x20 0x20 0x22 0x6D 0x61 0x69 0x6E 0x5F 0x6C 0x69 0x62 0x72 0x61 0x72 ) Undefined symbols for architecture arm64: "_WasmEdgeASTModuleDelete", referenced from: $LT$wasmedge_sys..ast_module..Module$u20$as$u20$core..ops..drop..Drop$GT$::drop::h0b85422a05d0309d in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) "_WasmEdge_ExecutorCreate", referenced from: .... .... wasmedge_sys::validator::Validator::validate::h829cf2bfcd5f5715 in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
or does the project work on MacOS with m2 processor at all?
We know Moxin works fine on M1 and M3 processors, so M2 "should" work as well.
Have you tried the "release" version of the Moxin and install directly to see if that version works? It is the most stable one currently until we fix up some recent changes that's affecting stability.
The release versions can be downloaded here: https://github.com/moxin-org/moxin/releases/tag/v0.1.0-alpha or https://moxin.app
It appears that when you built it the first time, you installed WasmEdge 0.13 and then we updated to WasmEdge 0.14. When you build it the second time, it is still finding the old Wasmedge library file.
Can I ask you to re-install wasmedge like this?
rm -rf /usr/local/wasmedge
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.0
source $HOME/.wasmedge/env
Then you can run git pull
and cargo build
. Thanks.
it is 0.14.0 % wasmedge --version wasmedge version 0.14.0
does the current build assume certain MacOS version? Mine is Version 13.2.1 (22D68).
I looked at the error, and found this: ld: warning: object file ../src/moxin/target/debug/deps/liblibsqlite3_sys-8fee68f835b046c4.rlib(0343851c9008f270-sqlite3.o)) was built for newer macOS version (13.3) than being linked (13.0) ld: warning: ignoring file ../.wasmedge/lib/libwasmedge.tbd, building for macOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x7B 0x0A 0x20 0x20 0x22 0x6D 0x61 0x69 0x6E 0x5F 0x6C 0x69 0x62 0x72 0x61 0x72 ) Undefined symbols for architecture arm64: "_WasmEdgeASTModuleDelete", referenced from: $LT$wasmedge_sys..ast_module..Module$u20$as$u20$core..ops..drop..Drop$GT$::drop::h0b85422a05d0309d in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) "_WasmEdge_ExecutorCreate", referenced from: .... .... wasmedge_sys::validator::Validator::validate::h829cf2bfcd5f5715 in libwasmedge_sys-a58c0e8b8f346bb9.rlib(wasmedge_sys-a58c0e8b8f346bb9.wasmedge_sys.462b2a9bc189eb77-cgu.3.rcgu.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please provide the complete compilation error message. I need more information. Thank you.
what's your guy's QA process and release? I tried the code twice. For the first time, it builds but I was unable to search for any models. For today, the build is simply broken.
note: function defined here --> /Users/davidshao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmedge-sys-0.19.1/src/utils.rs:49:15 | 49 | pub(crate) fn check(result: WasmEdge_Result) -> WasmEdgeResult<()> { | ^^^^^ -----------------------
error[E0610]:
u32
is a primitive type and therefore doesn't have fields --> /Users/davidshao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmedge-sys-0.19.1/src/types.rs:386:50 | 386 | u64::from_be_bytes(value.Data) | ^^^^error[E0610]:
u32
is a primitive type and therefore doesn't have fields --> /Users/davidshao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmedge-sys-0.19.1/src/types.rs:393:46 | 393 | u64::from_be_bytes(value.Data) | ^^^^Some errors have detailed explanations: E0117, E0308, E0425, E0531, E0610. For more information about an error, try
rustc --explain E0117
. The following warnings were emitted during compilation:warning: wasmedge-sys@0.19.1: [wasmedge-sys] searching for existing libwasmedge install warning: wasmedge-sys@0.19.1: [wasmedge-sys] searching for libwasmedge at LibWasmEdgePaths { lib_dir: "/Users/davidshao/.wasmedge/lib64", inc_dir: "/Users/davidshao/.wasmedge/include" } warning: wasmedge-sys@0.19.1: [wasmedge-sys] searching for libwasmedge at LibWasmEdgePaths { lib_dir: "/Users/davidshao/.wasmedge/lib", inc_dir: "/Users/davidshao/.wasmedge/include" } warning: wasmedge-sys@0.19.1: [wasmedge-sys] found libwasmedge at LibWasmEdgePaths { lib_dir: "/Users/davidshao/.wasmedge/lib", inc_dir: "/Users/davidshao/.wasmedge/include" } warning: wasmedge-sys@0.19.1: [wasmedge-sys] generating bindgen header "/Users/davidshao/src/moxin/target/debug/build/wasmedge-sys-e43c08d727d8ebae/out/wasmedge.rs"
error: could not compile
wasmedge-sys
(lib) due to 98 previous errors