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

x/mobile/cmd/gomobile: init fails on 32-bit Windows #17376

Closed
techtonik opened this issue Oct 7, 2016 · 9 comments
Closed

x/mobile/cmd/gomobile: init fails on 32-bit Windows #17376

techtonik opened this issue Oct 7, 2016 · 9 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@techtonik
Copy link

What version of Go are you using (go version)?

go version go1.6.3 windows/386

What operating system and processor architecture are you using (go env)?

set GOARCH=386
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=E:\go
set GORACE=
set GOROOT=C:\Program Files\Go
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_386
set GO15VENDOREXPERIMENT=1
set CC=gcc
set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

What did you do?

%GOPATH%\bin\gomobile.exe init

What did you expect to see?

What did you see instead?

E:\go\bin\gomobile.exe: go install -gcflags=-shared -ldflags=-shared -pkgdir=E:\go\pkg\gomobile/pkg_android_arm64 std failed: exit status 2
# runtime/cgo
fork/exec E:\go\pkg\gomobile\android-ndk-r12b\arm64\bin\aarch64-linux-android-clang.exe: This version of %1 is not compatible with the version of Windows you're running. Check
your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
@techtonik techtonik changed the title Needs Windows 7? =/ x/mobile/cmd/gomobile: needs Windows 7? =/ Oct 7, 2016
@quentinmit
Copy link
Contributor

Go itself supports XP and newer. This error is coming from the Android NDK that gomobile uses. What Windows are you on? XP 32-bit?

@quentinmit quentinmit added this to the Unreleased milestone Oct 7, 2016
@quentinmit quentinmit added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 7, 2016
@crawshaw
Copy link
Member

crawshaw commented Oct 7, 2016

This is unfortunate but we cannot support a version of windows unless the NDK toolchain is supported on it.

@quentinmit
Copy link
Contributor

@crawshaw: From the error message I was wondering if what actually happened is we incorrectly downloaded the 64-bit NDK on a 32-bit arch.

@techtonik
Copy link
Author

I've got 32-bit Vista.

@alexbrainman
Copy link
Member

I was wondering if what actually happened is we incorrectly downloaded the 64-bit NDK on a 32-bit arch.

What is actually happening gomobile downloads gomobile-ndk-r12b-windows-x86.tar.gz wich contains both 32-bit (clang_32.exe) and 64-bit (clang.exe) versions of clang:

# ls -l android-ndk-r12b/toolchains/llvm/prebuilt/windows/bin/
total 141384
drwxr-xr-x 2 root root     4096 Oct 14 11:14 arm64-v8a
drwxr-xr-x 2 root root     4096 Oct 14 11:14 armeabi
drwxr-xr-x 2 root root     4096 Oct 14 11:14 armeabi-v7a
drwxr-xr-x 2 root root     4096 Oct 14 11:14 armeabi-v7a-hard
-rwxr-xr-x 1 root root    12545 Jan  1  1970 asan_device_setup
-rwxr-xr-x 1 root root 43847680 Jan  1  1970 clang++.exe
-rwxr-xr-x 1 root root 16918528 Jan  1  1970 clang-tidy.exe
-rwxr-xr-x 1 root root 43847680 Jan  1  1970 clang.exe
-rwxr-xr-x 1 root root 39943680 Jan  1  1970 clang_32.exe
drwxr-xr-x 2 root root     4096 Oct 14 11:14 mips
drwxr-xr-x 2 root root     4096 Oct 14 11:14 mips64
drwxr-xr-x 2 root root     4096 Oct 14 11:14 x86
drwxr-xr-x 2 root root     4096 Oct 14 11:14 x86_64
#

But gomobile always copy clang.exe to be used on both 32-bit and 64-bit versions of windows.

Alex

@gopherbot
Copy link

CL https://golang.org/cl/31110 mentions this issue.

@alexbrainman
Copy link
Member

@techtonik does this change https://go-review.googlesource.com/#/c/31110/ fixes your problem?

Thank you.

Alex

@techtonik
Copy link
Author

@alexbrainman init passed ok. Problem fixed.

@techtonik techtonik changed the title x/mobile/cmd/gomobile: needs Windows 7? =/ x/mobile/cmd/gomobile: init fails on 32-bit Windows Oct 17, 2016
@techtonik
Copy link
Author

Thanks! =)

@golang golang locked and limited conversation to collaborators Oct 21, 2017
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
Fixes golang/go#16823
Fixes golang/go#17376

Change-Id: Ia9c15242cce66eca1d36a5e1dc6106b3549c251d
Reviewed-on: https://go-review.googlesource.com/31110
Reviewed-by: Elias Naur <elias.naur@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
Fixes golang/go#16823
Fixes golang/go#17376

Change-Id: Ia9c15242cce66eca1d36a5e1dc6106b3549c251d
Reviewed-on: https://go-review.googlesource.com/31110
Reviewed-by: Elias Naur <elias.naur@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants