wasmerio/wasmer-go

Issue compiling, parses `-lwasmer` flag as directory?

Nigel2392 opened this issue · 1 comments

Describe the bug

Nothing says more than the error log. It's a linker error.

PS C:\Users\Nigel\Desktop\wasi> wasmer --version
wasmer 4.0.0
PS C:\Users\Nigel\Desktop\wasi> go run .        
# github.com/wasmerio/wasmer-go/wasmer
..\..\go\pkg\mod\github.com\wasmerio\wasmer-go@v1.0.4\wasmer\wasi.go: In function 'to_wasi_env_read_inner':
..\..\go\pkg\mod\github.com\wasmerio\wasmer-go@v1.0.4\wasmer\wasi.go:23:22: warning: implicit declaration of function 'open_memstream' [-Wimplicit-function-declaration]
   23 | //     memory_stream = open_memstream(buffer, &buffer_size);
      |                      ^~~~~~~~~~~~~~
..\..\go\pkg\mod\github.com\wasmerio\wasmer-go@v1.0.4\wasmer\wasi.go:23:20: warning: assignment to 'FILE *' {aka 'struct _iobuf *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]     
   23 | //     memory_stream = open_memstream(buffer, &buffer_size);
      |                    ^
# main
C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwasmer: No such file or directory
collect2.exe: error: ld returned 1 exit status

Steps to reproduce

Simply run or try to compile a go program.

Expected behavior

I expected it to build.

Actual behavior

A linker error occurred, where it looks like it tries to parse the -lwasmer flag as a directory.

Additional context

Installed normally at first, same error occurred, Then installed with scoop, this bug report.

I met the same error , could anyone tell me how to solve this problem?