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

Unable to get it to work in WSL #7

Open
ljrodriguez1 opened this issue Dec 29, 2023 · 3 comments
Open

Unable to get it to work in WSL #7

ljrodriguez1 opened this issue Dec 29, 2023 · 3 comments

Comments

@ljrodriguez1
Copy link

I have not been able to get this to run on wsl, as there are binaries for linux i thought this would work, but i been unable to get it to work, do you have any ideas on this

@haclark30
Copy link

I was able to get this to run on WSL by setting the following environment variables:

CGO_ENABLED="1"
CGO_LDFLAGS="-ldl"

@sullyTheDev
Copy link

I was able to get this to run on WSL by setting the following environment variables:

CGO_ENABLED="1"
CGO_LDFLAGS="-ldl"

Even after setting this env vars i am still getting link errors which i thought -ldl would fix

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(sqlite3.o): in function `unixDlClose':
sqlite3.c:(.text.unixDlClose+0x4): undefined reference to `dlclose'
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(sqlite3.o): in function `unixDlSym':
sqlite3.c:(.text.unixDlSym+0x7): undefined reference to `dlsym'
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(sqlite3.o): in function `unixDlOpen':
sqlite3.c:(.text.unixDlOpen+0x9): undefined reference to `dlopen'
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(sqlite3.o): in function `unixDlError':
sqlite3.c:(.text.unixDlError+0x18): undefined reference to `dlerror'
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(std-6498d8891e016dca.std.3759e478f3a6c4f2-cgu.0.rcgu.o): in function `std::sys::unix::weak::fetch':
/rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/weak.rs:138: undefined reference to `dlsym'
collect2: error: ld returned 1 exit status

@RiwEZ
Copy link

RiwEZ commented Apr 25, 2024

I was able to get this to run on WSL by setting the following environment variables:

CGO_ENABLED="1"
CGO_LDFLAGS="-ldl"

Even after setting this env vars i am still getting link errors which i thought -ldl would fix

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(sqlite3.o): in function `unixDlClose':
sqlite3.c:(.text.unixDlClose+0x4): undefined reference to `dlclose'
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(sqlite3.o): in function `unixDlSym':
sqlite3.c:(.text.unixDlSym+0x7): undefined reference to `dlsym'
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(sqlite3.o): in function `unixDlOpen':
sqlite3.c:(.text.unixDlOpen+0x9): undefined reference to `dlopen'
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(sqlite3.o): in function `unixDlError':
sqlite3.c:(.text.unixDlError+0x18): undefined reference to `dlerror'
/usr/bin/ld: /home/sully/go/pkg/mod/github.com/libsql/[email protected]/lib/linux_amd64/libsql_experimental.a(std-6498d8891e016dca.std.3759e478f3a6c4f2-cgu.0.rcgu.o): in function `std::sys::unix::weak::fetch':
/rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys/unix/weak.rs:138: undefined reference to `dlsym'
collect2: error: ld returned 1 exit status

Same for me too. (AMD CPU)

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

4 participants