-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
cmd/ebitenmobile: doesn't work with go1.23 in go.mod #3086
Comments
I found a similar issue: diff --git a/go.mod b/go.mod
index 485e3b5..071069c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/hajimehoshi/go-inovation
-go 1.19
+go 1.23
require (
github.com/hajimehoshi/bitmapfont/v3 v3.1.0
|
Another error with the lastest Ebitengine...
|
diff --git a/go.mod b/go.mod
index 485e3b5..a8e53c3 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,8 @@
module github.com/hajimehoshi/go-inovation
-go 1.19
+go 1.23
+
+toolchain go1.23.0
require (
github.com/hajimehoshi/bitmapfont/v3 v3.1.0
|
Ebitenmobile tries to compile gomobile under a temporary directory, and in this case the Go version differs unfortunately. package main
import (
"os"
"os/exec"
"strings"
)
func printGoVersion() {
cmd := exec.Command("go", "version")
out, err := cmd.Output()
if err != nil {
panic(err)
}
println(strings.TrimSpace(string(out)))
}
func main() {
println("Under go.mod")
printGoVersion()
origDir, err := os.Getwd()
if err != nil {
panic(err)
}
println("Under a temporary directory")
if err := os.Chdir(os.TempDir()); err != nil {
panic(err)
}
printGoVersion()
println("Under go.mod again")
if err := os.Chdir(origDir); err != nil {
panic(err)
}
printGoVersion()
}
I'll add a toolchain line to the temporary go.mod under the temporary directory. |
Let me close this. I'll reopen this if the latest commit doesn't work yet. EDIT: I'll reopen this as @2me2 reported this was not fixed yet. |
@2me2 Have you update the Ebitengine version in go-inovation's go.mod? |
ping |
I couldn't reproduce the original issue even with Ebitengine 2.7 (and with Go 1.23). The mysterious thing is,
says go1.23, but shouldn't this be go1.23.0? |
Sorry I missed the ping earlier. Yes it should be 1.23.0, i do get that same error if I change to just 1.23 and run go mod tidy right away. Ok so I just tried pulling the latest go-innovation code again, here are the order of the operations:
Output:
If i change the version to 1.22, it seems to work fine. In any case it seems like I'm having the issue with gomobile. I tried a minimal example and same issue with that using just |
What the result of your |
I think I could find a similar issue. go.mod's Go version is 1.19 in my case. And my Go version is 1.23.1 and ebitenmobile was built with it.
EDIT: This happens when go-inovation's Ebitengine version and ebitenmobile's Ebitengine version don't match. It is possible to fix this case, but similar things can happen in the future, so I'll leave this case as it is. |
@2me2 I'm afraid I cannot reproduce your case yet. Could you try '-x' to show a log?
|
Also, instead of |
2.8.0-rc.1 still has the same issue, but I'm seeing this outside of ebiten anyway. I suspect its something I'm having with gomobile- are you able to even use gomobile with 1.23? Could it be restricted by the version in gomobile (https://cs.opensource.google/go/x/mobile/+/master:go.mod;l=3) ? |
Thanks.
ebitenmobile uses a fork of gomobile so in my case Go 1.23 should work with gomobile. I'll check this with the original gomobile. |
Go 1.23.1 worked perfectly with gomobile. |
My
Interestingly, GOROOT is different. My understanding is that this happens when your Go version and go.mod's Go version don't match, go.mod's Go version is automatically selected. I'll take a look further. |
As we discussed at Discord, this issue happens with Intel macOS with Go installed via Homebrew. Also, the same issue occurs even only with Gomobile without Ebitengine. Thus, I'll remove the milestone. |
Ebitengine Version
github.com/hajimehoshi/ebiten/v2 v2.7.8
Operating System
Go Version (
go version
)1.23
What steps will reproduce the problem?
git clone https://github.com/hajimehoshi/go-inovation
cd go-inovation
go run github.com/hajimehoshi/ebiten/v2/cmd/ebitenmobile bind -target ios -o ./mobile/ios/Mobile.xcframework ./mobile
confirm that works
vi go.mod # and then make the changes to go 1.23 and toolchain go1.23.0
go run github.com/hajimehoshi/ebiten/v2/cmd/ebitenmobile bind -target ios -o ./mobile/ios/Mobile.xcframework ./mobile
and then try with 1.22 as well to see if that works (it did for me, only 1.23 didn't work)
What is the expected result?
Should not fail- it worked for 1.22 and below.
What happens instead?
gomobile: go mod tidy failed: exit status 1
go: downloading go1.23 (darwin/amd64)
go: download go1.23 for darwin/amd64: toolchain not available
Anything else you feel useful to add?
Not sure if it's just my computer.
The text was updated successfully, but these errors were encountered: