WasmEdge
WasmEdge copied to clipboard
bug: link to static lib 0.14.0 encounters undefined reference to `fmtt::v10::***`
Summary
As the title, the new released version of the static library cannot be linked.
Current State
The symbols related to fmt are undefined.
Expected State
Without compile error.
Reproduction steps
- When releasing the current Rust SDK, we forgot to update the archives version and checksum. You could use mine for test https://github.com/CaptainVincent/wasmedge-rust-sdk/tree/update-archives
- Create a new cargo proj Cargo.toml
[package]
name = "test_wasmedge_static_link"
version = "0.1.0"
edition = "2021"
[dependencies]
wasmedge-sdk = { git = "https://github.com/CaptainVincent/wasmedge-rust-sdk.git", branch = "update-archives" }
[features]
default = ["standalone", "static"]
standalone = ["wasmedge-sdk/standalone"]
static = ["wasmedge-sdk/static"]
wasi_nn = ["wasmedge-sdk/wasi_nn"]
src/main.rs
use wasmedge_sdk::wasi::WasiModule;
fn main() {
let mut _wasi = WasiModule::create(None, None, Some(vec!["/:/"])).unwrap();
println!("Hello, world!");
}
- run
cargo build
Screenshots
None
Any logs you want to share for showing the specific issue
Components
Rust SDK
WasmEdge Version or Commit you used
0.14.0
Operating system information
Ubuntu 22.04.4 LTS
Hardware Architecture
x86_64
Compiler flags and options
Appendix:
I tried to verify this issue in the pure WasmEdge compile flow using the following flags.
cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_SHARED_LIB=Off -DWASMEDGE_BUILD_STATIC_LIB=On -DWASMEDGE_LINK_TOOLS_STATIC=On -DWASMEDGE_BUILD_PLUGINS=Off -DWASMEDGE_BUILD_AOT_RUNTIME=OFF
But when I tried to compile the static library and link it to the tool, I encountered the following error, which prevented me from verifying:
ninja: error: '/usr/lib/llvm-11/lib/libPolly.a', needed by 'tools/wasmedge/wasmedgec', missing and no known rule to make it