Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are static libraries provided by default instead of dynamic ones? #150

Open
rayowang opened this issue Sep 17, 2022 · 5 comments
Open

Comments

@rayowang
Copy link

rayowang commented Sep 17, 2022

I think a dynamic library version should be provided to support some users, because static libraries may cause symbol redefinition conflicts, what do you think? @alexcrichton

@alexcrichton
Copy link
Member

In short I don't know how to get dynamic libraries working in Go. A PR to implement this would be appreciated!

@rayowang
Copy link
Author

rayowang commented Oct 28, 2022

In short I don't know how to get dynamic libraries working in Go. A PR to implement this would be appreciated!

Sorry, maybe I didn't describe it clearly, what I mean is to use .so or .dylib or .dll to avoid the following symbol conflict errors @alexcrichton

/usr/local/Cellar/go/1.17.2/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
duplicate symbol '_ZSTD_isError' in:
    /var/folders/l2/z53nzn7x0zq404jrdkrqqybh0000gp/T/go-link-1822175626/000101.o
    /Users/wangzhilong23/go/pkg/mod/github.com/bytecodealliance/wasmtime-go@v1.0.0/build/macos-x86_64/libwasmtime.a(zstd_common.o)
duplicate symbol '_ZSTD_versionNumber' in:
    /var/folders/l2/z53nzn7x0zq404jrdkrqqybh0000gp/T/go-link-1822175626/000101.o
    /Users/wangzhilong23/go/pkg/mod/github.com/bytecodealliance/wasmtime-go@v1.0.0/build/macos-x86_64/libwasmtime.a(zstd_common.o)
duplicate symbol '_ZSTD_getErrorString' in:
    /var/folders/l2/z53nzn7x0zq404jrdkrqqybh0000gp/T/go-link-1822175626/000101.o
    /Users/wangzhilong23/go/pkg/mod/github.com/bytecodealliance/wasmtime-go@v1.0.0/build/macos-x86_64/libwasmtime.a(zstd_common.o)
duplicate symbol '_ZSTD_versionString' in:
    /var/folders/l2/z53nzn7x0zq404jrdkrqqybh0000gp/T/go-link-1822175626/000101.o

@seeflood
Copy link

I have same issue. @alexcrichton Is there any workaround solution?

@alexcrichton
Copy link
Member

Yes I understand what this issue is asking for, and my response is "I don't know how to do this in Go". A PR would be appreciated if y'all know how to implement this in Go.

@rayowang
Copy link
Author

rayowang commented Oct 31, 2022

Yes I understand what this issue is asking for, and my response is "I don't know how to do this in Go". A PR would be appreciated if y'all know how to implement this in Go.

@alexcrichton I made a simple modification to let wasmtime-go use the dynamic library by default in the linux, so that symbol conflicts can be avoided in dapr related projects. If you have time, please help to review and see if there are any problems and suggestions, thank you. #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants