Open kesmit13 opened 1 year ago
It does look like these functions have been in libc.a
for quite a while, so I'm guessing it's an updated dependency of wasi-vfs.
Even when I build with wasi-sdk 14, I get those errors, so I'm not sure what the difference is between your builds and mine.
Oh, I bet that the linker was filtering out the symbols if they weren't used. I'm compiling the pandas package of Python which does a lot of numeric computation and probably uses the rintf
and rint
functions, which then causes the linker to include those symbols. Since they are both defined in two separate places, I get this error.
It looks like rustc archives compiler_builtins implementations into .a
. The rust people implemented it by themselves https://github.com/rust-lang/compiler-builtins and the alloc library depends on it, so there is no way to avoid including compiler_builtins in .a unfortunately.
If we adopt the component model, this problem will be solved.
I was getting a crash when initializing a wasm module that used wasi-vfs. I was using wasi-sdk 20 and thought that maybe I should build wasi-vfs against that to make sure that wasn't the issue. However, after getting it built, I get the following errors when attempting to link libwasi_vfs.a into a module. The libc included with wasi-sdk includes the
rintf
andrint
functions already. I was wondering if you had run across this before, or if this is possibly an addition to one of wasi-vfs' dependencies?