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

"Compiled binary cannot be executed" when trying to debug Go code #3221

Closed
ronisec opened this issue Jan 30, 2022 · 8 comments
Closed

"Compiled binary cannot be executed" when trying to debug Go code #3221

ronisec opened this issue Jan 30, 2022 · 8 comments
Assignees
Labels
lang: go Go rules integration product: GoLand GoLand plugin topic: debugging Issues related to debugging type: user support User support

Comments

@ronisec
Copy link

ronisec commented Jan 30, 2022

Running:

  1. GoLand 2021.2
  2. Bazel Plugin 2021.11.09.0.2-api-version-212

When trying to debug a Go unit test I am getting the following output:

Compilation finished with exit code 0

Compiled binary cannot be executed

See:
image

@ronisec
Copy link
Author

ronisec commented Jan 30, 2022

Solved, this was caused due to the following config in my .bazelrc:

build --symlink_prefix=/

Removed that config and it is working again. It would be nice if the plugin would be able to handle this case or print out a more informative debug message.

@sgowroji sgowroji added lang: go Go rules integration type: user support User support product: GoLand GoLand plugin topic: debugging Issues related to debugging labels Oct 12, 2022
@sgowroji
Copy link
Member

Thanks for sharing your resolution and Glad to see you resolve. We are closing this issue now. Please feel free to reach us if you have any further queries.

@kopax
Copy link

kopax commented Oct 4, 2024

I have same issue and no .bazelrc, any clue what could cause that ?

@tpasternak
Copy link
Collaborator

Can you please share a minimal repro?

@kopax
Copy link

kopax commented Oct 4, 2024

I finally found out, i need to use cmd/geth , instead of the root dir as an entrypoint (go ethereum project)

@tpasternak
Copy link
Collaborator

wait, but it's not even a bazel project

@kopax
Copy link

kopax commented Oct 4, 2024

Yeah sorry i just wanted an hint. :) you can close this again ^^

@tpasternak
Copy link
Collaborator

Np, please migrate the project to bazel and we'll provide support here :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: go Go rules integration product: GoLand GoLand plugin topic: debugging Issues related to debugging type: user support User support
Projects
Development

No branches or pull requests

4 participants