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

not able to use go run #29

Closed
benitogf opened this issue Feb 20, 2024 · 5 comments · Fixed by #30
Closed

not able to use go run #29

benitogf opened this issue Feb 20, 2024 · 5 comments · Fixed by #30

Comments

@benitogf
Copy link

I updated and now using go run fails:

# command-line-arguments
/usr/local/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
/usr/bin/ld: /tmp/go-link-598592747/000003.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

using go build and then running the binary still works tho

@SteffenL
Copy link
Contributor

SteffenL commented Feb 20, 2024

It looks like we need to link the dl library but I don't get this error on my end.

Can you please share the following?

  • Operating system
  • Compiler version (g++ --version)
  • Go version (go version)

@benitogf
Copy link
Author

OS (ubuntu on WSL)

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

g++

g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

go

go version go1.21.6 linux/amd64

@SteffenL
Copy link
Contributor

I can reproduce this on a real Ubuntu installation with the same versions of software.

@SteffenL SteffenL linked a pull request Feb 20, 2024 that will close this issue
@SteffenL
Copy link
Contributor

The fix works on my system so please check yours.

@benitogf
Copy link
Author

yes that worked, thank you! 👏

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

Successfully merging a pull request may close this issue.

2 participants