-
Notifications
You must be signed in to change notification settings - Fork 18k
x/mobile: gomobile bind is failing with latest version [+cafc553] of gomobile #33859
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
Comments
Hello @hajimehoshi , Can you please please let me know, what update I have to make to gobind command ? |
Hi, I'm not sure your question, but my last patch should fix some bugs and gobind should work (as long as go module is not used). |
Could you try gomobile with |
Now, I removed the gomobile and gobind from my system completely. (src and bin folder) Now, I tried freshly to do: But following error is coming:
Any idea ? |
@jay11ca39 You can try the following order, to see if that helps (still
|
@torbenschinke I tried the suggested way, but it is also giving the same error:
I have one basic query regarding: GO111MODULE=off Is it a flag we have to give while doing go get ?
|
It is safe to give
EDIT: module-aware go-get also installs binaries under $GOPATH/bin, so |
I am using gomobile for couple of months.. I used to give:
As you see above commands, I do not have use GO111MODULE flag. This issue is raised for gobind on latest gomobile version. Edit: How can I fix this go get ? |
I have the same issue, running inside a docker (debian:stretch-slim). |
We're having the same issue ( Edit: note that we're not using Go modules |
I was wondering if the previous commit golang/mobile@30c70e3 worked on your environment. |
I could not reproduce the issue. The latest gomobile worked on my MacBook Pro:
|
Hello @rayvbr , Are you building gomobile from source, I mean cloning and building or cc @hajimehoshi |
You can use any version of gomobile by using git:
|
I had the same issue. |
OK I think I found the solution: could you try
? https://go-review.googlesource.com/c/tools/+/190339 should be the necessary change. |
I tried this (with modules enabled and disabled) but that doesn't seem to work. |
Updating all tools with |
I can confirm, that reverting back to |
Thanks. It looks like this happens when the default driver is not used. I am not familiar with drivers... @HeavyHorst do you have @matloob If an external driver in go/packages is used, the fix https://go-review.googlesource.com/c/tools/+/190339 is not applied. Is my understanding correct? I was wondering if there is a workaround. CC @hyangah |
No, neither one nor the other. |
Hmm, thanks.
Could you tell me the Git hash of |
Thanks for investigating. The hash is: b29f5f6 Let me know if you need anything else. |
Thanks! Could you try
and tell me the result? |
|
Not sure if that helps but when i readd this line: |
I guess this condition is suspicious: the error message might not be exactly 2 lines. Probably the stderr of
Thanks! Though this suppresses the error, I don't think this is a correct fix since go/packages would miss some files for Cgo. |
Hm, I don't see any error if I run go list directly in the terminal:
|
Sry, I had to enable cgo with export CGO_ENABLED=1. After that go list prints this error:
|
@HeavyHorst Thank you for confirming! I think that's the cause and we should fix go/packages. @matloob : As we discussed here, there are two problems in go/packages:
What do you think? |
Just to confirm:
I then removed
|
Change https://golang.org/cl/191942 mentions this issue: |
I am getting this problem |
|
@stonedreamforest try this go get -u golang.org/x/tools/... |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, the issue is produced only on the latest gomobile version.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Trying to generate the java binding for my go file:
Error:
What did you see instead?
Error in generating the java binding.
Note: Before updating the gomobile same code was building.
The text was updated successfully, but these errors were encountered: