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 : Can't generate library for android for the following go package https://github.com/ethereum/go-ethereum/whisper/whisperv6 #36731

Open
rohankeskar19 opened this issue Jan 24, 2020 · 16 comments
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rohankeskar19
Copy link

rohankeskar19 commented Jan 24, 2020

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

$ go version
go version go1.13.6 windows/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
```
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\rohan\AppData\Local\go-build
set GOENV=C:\Users\rohan\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\rohan\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\BE Project\go-ethereum-master\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\rohan\AppData\Local\Temp\go-build766559602=/tmp/go-build -gno-record-gcc-switches
```

What did you do?

gomobile bind -v -target android github.com/ethereum/go-ethereum/whisper/whisperv6

What did you expect to see?

I want to generate android library from the go library

What did you see instead?

write C:\Users\rohan\AppData\Local\Temp\gomobile-work-644583759\src\go.mod
go: downloading golang.org/x/mobile v0.0.0-20200123024942-82c397c4c527
go: extracting golang.org/x/mobile v0.0.0-20200123024942-82c397c4c527
go: downloading golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: downloading github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d
go: downloading golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: downloading github.com/golang/snappy v0.0.1
go: downloading github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00
go: downloading github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3
go: extracting golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: extracting github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d
go: extracting github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00
go: extracting github.com/golang/snappy v0.0.1
go: downloading github.com/go-stack/stack v1.8.0
go: downloading github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847
go: downloading github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521
go: downloading golang.org/x/net v0.0.0-20190628185345-da137c7871d7
go: downloading github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa
go: extracting github.com/go-stack/stack v1.8.0
go: extracting github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3
go: downloading github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989
go: downloading github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea
go: downloading github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458
go: extracting github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521
go: extracting github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa
go: downloading golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7
go: extracting github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458
go: extracting github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea
go: extracting github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989
go: extracting golang.org/x/net v0.0.0-20190628185345-da137c7871d7
go: downloading golang.org/x/text v0.3.2
go: extracting github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847
go: extracting golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7
go: extracting golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: extracting golang.org/x/text v0.3.2
go: finding golang.org/x/mobile v0.0.0-20200123024942-82c397c4c527
go: finding github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea
go: finding github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d
go: finding golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: finding golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: finding github.com/go-stack/stack v1.8.0
go: finding github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847
go: finding github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989
go: finding github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00
go: finding github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa
go: finding github.com/golang/snappy v0.0.1
go: finding github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3
go: finding github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458
go: finding github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521
go: finding golang.org/x/net v0.0.0-20190628185345-da137c7871d7
go: finding golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7
go: finding golang.org/x/text v0.3.2
golang.org/x/net/html/atom
golang.org/x/text/encoding/internal/identifier
golang.org/x/text/internal/utf8internal
golang.org/x/sync/syncmap
golang.org/x/text/internal/tag
runtime/cgo
github.com/syndtr/goleveldb/leveldb/comparer
golang.org/x/crypto/sha3
github.com/aristanetworks/goarista/monotime
golang.org/x/sys/unix
github.com/deckarep/golang-set
github.com/go-stack/stack
github.com/syndtr/goleveldb/leveldb/util
github.com/syndtr/goleveldb/leveldb/storage
github.com/ethereum/go-ethereum/common
github.com/syndtr/goleveldb/leveldb/cache
github.com/golang/snappy
github.com/ethereum/go-ethereum/common/mclock
github.com/syndtr/goleveldb/leveldb/errors
github.com/syndtr/goleveldb/leveldb/filter
github.com/elastic/gosigar
github.com/huin/goupnp/scpd
golang.org/x/net/html
github.com/ethereum/go-ethereum/event
github.com/syndtr/goleveldb/leveldb/iterator
github.com/syndtr/goleveldb/leveldb/journal
github.com/syndtr/goleveldb/leveldb/opt
golang.org/x/text/transform
golang.org/x/text/internal/language
golang.org/x/net/context
github.com/syndtr/goleveldb/leveldb/memdb
golang.org/x/crypto/pbkdf2
github.com/syndtr/goleveldb/leveldb/table
golang.org/x/text/encoding
golang.org/x/text/runes
golang.org/x/text/encoding/internal
golang.org/x/text/internal/language/compact
github.com/syndtr/goleveldb/leveldb
golang.org/x/text/encoding/charmap
golang.org/x/text/encoding/japanese
golang.org/x/text/encoding/traditionalchinese
golang.org/x/text/encoding/korean
golang.org/x/text/encoding/simplifiedchinese
golang.org/x/text/encoding/unicode
golang.org/x/text/language
golang.org/x/text/encoding/htmlindex
golang.org/x/net/html/charset
golang.org/x/mobile/internal/mobileinit
github.com/ethereum/go-ethereum/crypto/secp256k1
net
# golang.org/x/mobile/internal/mobileinit

C:\Users\rohan\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: fatal error: $WORK\b191\_cgo_.o: open: Invalid argument
clang: error: linker command failed with exit code 1 (use -v to see invocation)

# net

C:\Users\rohan\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: fatal error: $WORK\b078\_cgo_.o: open: Invalid argument
clang: error: linker command failed with exit code 1 (use -v to see invocation)

# github.com/ethereum/go-ethereum/crypto/secp256k1

C:\Users\rohan\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: fatal error: $WORK\b069\_cgo_.o: open: Invalid argument
clang: error: linker command failed with exit code 1 (use -v to see invocation)
go: failed to remove work dir: CreateFile C:\Users\rohan\AppData\Local\Temp\go-build488709430\b086\symabis: Access is denied.
gomobile: go build -v -buildmode=c-shared -o=C:\Users\rohan\AppData\Local\Temp\gomobile-work-644583759\android\src\main\jniLibs\armeabi-v7a\libgojni.so ./gobind failed: exit status 2
@gopherbot gopherbot added this to the Unreleased milestone Jan 24, 2020
@hyangah hyangah changed the title x/gomobile : Can't generate library for android for the following go package https://github.com/ethereum/go-ethereum/whisper/whisperv6 x/mobile/cmd/gomobile : Can't generate library for android for the following go package https://github.com/ethereum/go-ethereum/whisper/whisperv6 Jan 24, 2020
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jan 24, 2020
@hyangah
Copy link
Contributor

hyangah commented Jan 24, 2020

@hajimehoshi

@hajimehoshi
Copy link
Member

I could not reproduce this on macOS, but I encountered a different error:

whisperv6_android.c:503:78: error: redefinition of parameter 'env'
whisperv6_android.c:503:47: note: previous declaration is here
whisperv6_android.c:503:78: error: parameter name omitted
whisperv6_android.c:1410:94: error: redefinition of parameter 'env'
whisperv6_android.c:1410:63: note: previous declaration is here
whisperv6_android.c:1410:94: error: parameter name omitted
whisperv6_android.c:1417:10: error: redefinition of 'env' with a different type: 'JNIEnv *' (aka 'const struct JNINativeInterface **') vs 'int32_t' (aka 'int')
whisperv6_android.c:1416:65: note: previous definition is here
whisperv6_android.c:1418:33: error: incompatible integer to pointer conversion passing 'int32_t' (aka 'int') to parameter of type 'JNIEnv *' (aka 'const struct JNINativeInterface **') [-Werror,-Wint-conversion]
gobind/seq_android.h:42:43: note: passing argument to parameter 'env' here
whisperv6_android.c:1419:36: error: incompatible integer to pointer conversion passing 'int32_t' (aka 'int') to parameter of type 'JNIEnv *' (aka 'const struct JNINativeInterface **') [-Werror,-Wint-conversion]
gobind/seq_android.h:42:43: note: passing argument to parameter 'env' here
whisperv6_android.c:1420:3: error: indirection requires pointer operand ('int32_t' (aka 'int') invalid)
whisperv6_android.c:1421:25: error: incompatible integer to pointer conversion passing 'int32_t' (aka 'int') to parameter of type 'JNIEnv *' (aka 'const struct JNINativeInterface **') [-Werror,-Wint-conversion]
gobind/seq_android.h:59:44: note: passing argument to parameter 'env' here
gomobile: go build -v -buildmode=c-shared -o=/var/folders/ht/ky_bwgzs4bd5z1hh02k34x_h0000gn/T/gomobile-work-754074888/android/src/main/jniLibs/armeabi-v7a/libgojni.so ./gobind failed: exit status 2

@hajimehoshi
Copy link
Member

hajimehoshi commented Jan 24, 2020

C:\Users\rohan\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: fatal error: $WORK\b191_cgo_.o: open: Invalid argument

My guess is that this error complains that filepath mixes '\' and '/'.

EDIT: NVM, I think the path should work...

@hajimehoshi
Copy link
Member

@rohankeskar19 Did the old gomobile (e.g., 597adff16ade9d88626f8caea514bb189b8c74ee) worked? Of course this doesn't accept Go modules, but I was wondering if old gomobile worked with GO111MODULE=off.

@rohankeskar19
Copy link
Author

@hajimehoshi I don't know what you are asking, But I will try if you will tell me what to do...

@hajimehoshi
Copy link
Member

I assumed you were trying to test this with the latest gomobile (Git hash: 82c397c4c5279f331dce14d734fda7060e4a3691), but is that correct? If not, could you tell me the version of gomobile? gomobile version should show this.

And, I'd like you to try to change gomobile version if possible.

@rohankeskar19
Copy link
Author

I assumed you were trying to test this with the latest gomobile (Git hash: 82c397c4c5279f331dce14d734fda7060e4a3691), but is that correct? If not, could you tell me the version of gomobile? gomobile version should show this.

And, I'd like you to try to change gomobile version if possible.

gomobile version +82c397c Thu Jan 23 02:49:42 2020 +0000 (android); androidSDK=C:\Users\rohan\AppData\Local\Android\Sdk\platforms\android-29

@rohankeskar19
Copy link
Author

I assumed you were trying to test this with the latest gomobile (Git hash: 82c397c4c5279f331dce14d734fda7060e4a3691), but is that correct? If not, could you tell me the version of gomobile? gomobile version should show this.
And, I'd like you to try to change gomobile version if possible.

gomobile version +82c397c Thu Jan 23 02:49:42 2020 +0000 (android); androidSDK=C:\Users\rohan\AppData\Local\Android\Sdk\platforms\android-29

How can I install the version you are specifying??

@hajimehoshi
Copy link
Member

hajimehoshi commented Jan 24, 2020

Thank you! Looks like you are using the latest one.

You can install old versions by git-cloning:

git clone https://go.googlesource.com/mobile
cd mobile
git checkout 597adff16ade9d88626f8caea514bb189b8c74ee
go install ./cmd/...

Note that old gomobile cannot use Go modules, then you need to go-get libraries with GO111MODULE=off.

@rohankeskar19
Copy link
Author

Thank you! Looks like you are using the latest one.

You can install old versions by git-cloning:

git clone https://go.googlesource.com/mobile
cd mobile
git checkout 597adff16ade9d88626f8caea514bb189b8c74ee
go install ./cmd/...

Note that old gomobile cannot use Go modules, then you need to go-get libraries with GO111MODULE=off.

Hi, can you please tell me with how can I do what you are telling me to do in the note

@hajimehoshi
Copy link
Member

I think you can do it on your command prompt at any directory.

(If you don't have git, please install it https://git-scm.com/downloads)

@hajimehoshi
Copy link
Member

hajimehoshi commented Jan 24, 2020

Oops, I'm sorry, as old gomobile doesn't use Go modules, you need to install gomobile in $GOPATH. Then instead of cloning by you self, please go-get with GO111MODULE=off.

set GO111MODULE=off
go get -u golang.org/x/mobile
cd C:\Users\rohan\go\src\golang.org\x\gomobile
git checkout 597adff16ade9d88626f8caea514bb189b8c74ee
go install ./cmd/...

@rohankeskar19
Copy link
Author

Oops, I'm sorry, as old gomobile doesn't use Go modules, you need to install gomobile in $GOPATH. Then instead of cloning by you self, please go-get with GO111MODULE=off.

set GO111MODULE=off
go get -u golang.org/x/mobile
cd C:\Users\rohan\go\src\golang.org\x\gomobile
git checkout 597adff16ade9d88626f8caea514bb189b8c74ee
go install ./cmd/...

I'm getting this

C:\Users\rohan\go\src\golang.org\x\mobile (HEAD detached at 597adff)
λ go install ./cmd/...
internal\importers\java\java.go:14:2: cannot find package "bufio" in any of:
        C:\Go\bin\src\bufio (from $GOROOT)
        C:\Users\rohan\go\src\bufio (from $GOPATH)
cmd\gobind\gen.go:8:2: cannot find package "bytes" in any of:
        C:\Go\bin\src\bytes (from $GOROOT)
        C:\Users\rohan\go\src\bytes (from $GOPATH)
internal\importers\ast.go:29:2: cannot find package "errors" in any of:
        C:\Go\bin\src\errors (from $GOROOT)
        C:\Users\rohan\go\src\errors (from $GOPATH)
cmd\gobind\main.go:9:2: cannot find package "flag" in any of:
        C:\Go\bin\src\flag (from $GOROOT)
        C:\Users\rohan\go\src\flag (from $GOPATH)
cmd\gobind\gen.go:9:2: cannot find package "fmt" in any of:
        C:\Go\bin\src\fmt (from $GOROOT)
        C:\Users\rohan\go\src\fmt (from $GOPATH)
cmd\gobind\gen.go:10:2: cannot find package "go/ast" in any of:
        C:\Go\bin\src\go\ast (from $GOROOT)
        C:\Users\rohan\go\src\go\ast (from $GOPATH)
cmd\gobind\gen.go:11:2: cannot find package "go/build" in any of:
        C:\Go\bin\src\go\build (from $GOROOT)
        C:\Users\rohan\go\src\go\build (from $GOPATH)
bind\genjava.go:9:2: cannot find package "go/constant" in any of:
        C:\Go\bin\src\go\constant (from $GOROOT)
        C:\Users\rohan\go\src\go\constant (from $GOPATH)
bind\bind.go:17:2: cannot find package "go/format" in any of:
        C:\Go\bin\src\go\format (from $GOROOT)
        C:\Users\rohan\go\src\go\format (from $GOPATH)
cmd\gobind\main.go:13:2: cannot find package "go/importer" in any of:
        C:\Go\bin\src\go\importer (from $GOROOT)
        C:\Users\rohan\go\src\go\importer (from $GOPATH)
cmd\gobind\main.go:14:2: cannot find package "go/parser" in any of:
        C:\Go\bin\src\go\parser (from $GOROOT)
        C:\Users\rohan\go\src\go\parser (from $GOPATH)
cmd\gobind\gen.go:12:2: cannot find package "go/token" in any of:
        C:\Go\bin\src\go\token (from $GOROOT)
        C:\Users\rohan\go\src\go\token (from $GOPATH)
cmd\gobind\gen.go:13:2: cannot find package "go/types" in any of:
        C:\Go\bin\src\go\types (from $GOROOT)
        C:\Users\rohan\go\src\go\types (from $GOPATH)
bind\genjava.go:11:2: cannot find package "html" in any of:
        C:\Go\bin\src\html (from $GOROOT)
        C:\Users\rohan\go\src\html (from $GOPATH)
bind\bind.go:20:2: cannot find package "io" in any of:
        C:\Go\bin\src\io (from $GOROOT)
        C:\Users\rohan\go\src\io (from $GOPATH)
cmd\gobind\gen.go:15:2: cannot find package "io/ioutil" in any of:
        C:\Go\bin\src\io\ioutil (from $GOROOT)
        C:\Users\rohan\go\src\io\ioutil (from $GOPATH)
bind\types.go:10:2: cannot find package "log" in any of:
        C:\Go\bin\src\log (from $GOROOT)
        C:\Users\rohan\go\src\log (from $GOPATH)
bind\genjava.go:12:2: cannot find package "math" in any of:
        C:\Go\bin\src\math (from $GOROOT)
        C:\Users\rohan\go\src\math (from $GOPATH)
cmd\gobind\gen.go:16:2: cannot find package "os" in any of:
        C:\Go\bin\src\os (from $GOROOT)
        C:\Users\rohan\go\src\os (from $GOPATH)
internal\importers\java\java.go:18:2: cannot find package "os/exec" in any of:
        C:\Go\bin\src\os\exec (from $GOROOT)
        C:\Users\rohan\go\src\os\exec (from $GOPATH)
internal\importers\ast.go:34:2: cannot find package "path" in any of:
        C:\Go\bin\src\path (from $GOROOT)
        C:\Users\rohan\go\src\path (from $GOPATH)
internal\importers\ast.go:35:2: cannot find package "path/filepath" in any of:
        C:\Go\bin\src\path\filepath (from $GOROOT)
        C:\Users\rohan\go\src\path\filepath (from $GOPATH)
internal\importers\java\java.go:19:2: cannot find package "reflect" in any of:
        C:\Go\bin\src\reflect (from $GOROOT)
        C:\Users\rohan\go\src\reflect (from $GOPATH)
bind\gen.go:14:2: cannot find package "regexp" in any of:
        C:\Go\bin\src\regexp (from $GOROOT)
        C:\Users\rohan\go\src\regexp (from $GOPATH)
package golang.org/x/mobile/cmd/gobind
        imports runtime: cannot find package "runtime" in any of:
        C:\Go\bin\src\runtime (from $GOROOT)
        C:\Users\rohan\go\src\runtime (from $GOPATH)
internal\importers\ast.go:36:2: cannot find package "sort" in any of:
        C:\Go\bin\src\sort (from $GOROOT)
        C:\Users\rohan\go\src\sort (from $GOPATH)
internal\importers\ast.go:37:2: cannot find package "strconv" in any of:
        C:\Go\bin\src\strconv (from $GOROOT)
        C:\Users\rohan\go\src\strconv (from $GOPATH)
internal\importers\ast.go:38:2: cannot find package "strings" in any of:
        C:\Go\bin\src\strings (from $GOROOT)
        C:\Users\rohan\go\src\strings (from $GOPATH)
internal\importers\java\java.go:21:2: cannot find package "unicode" in any of:
        C:\Go\bin\src\unicode (from $GOROOT)
        C:\Users\rohan\go\src\unicode (from $GOPATH)
internal\importers\java\java.go:22:2: cannot find package "unicode/utf8" in any of:
        C:\Go\bin\src\unicode\utf8 (from $GOROOT)
        C:\Users\rohan\go\src\unicode\utf8 (from $GOPATH)
cmd\gomobile\bind_androidapp.go:8:2: cannot find package "archive/zip" in any of:
        C:\Go\bin\src\archive\zip (from $GOROOT)
        C:\Users\rohan\go\src\archive\zip (from $GOPATH)
internal\binres\sdk.go:6:2: cannot find package "compress/gzip" in any of:
        C:\Go\bin\src\compress\gzip (from $GOROOT)
        C:\Users\rohan\go\src\compress\gzip (from $GOPATH)
cmd\gomobile\cert.go:8:2: cannot find package "crypto" in any of:
        C:\Go\bin\src\crypto (from $GOROOT)
        C:\Users\rohan\go\src\crypto (from $GOPATH)
cmd\gomobile\writer.go:70:2: cannot find package "crypto/rand" in any of:
        C:\Go\bin\src\crypto\rand (from $GOROOT)
        C:\Users\rohan\go\src\crypto\rand (from $GOPATH)
cmd\gomobile\cert.go:9:2: cannot find package "crypto/rsa" in any of:
        C:\Go\bin\src\crypto\rsa (from $GOROOT)
        C:\Users\rohan\go\src\crypto\rsa (from $GOPATH)
cmd\gomobile\cert.go:10:2: cannot find package "crypto/sha1" in any of:
        C:\Go\bin\src\crypto\sha1 (from $GOROOT)
        C:\Users\rohan\go\src\crypto\sha1 (from $GOPATH)
cmd\gomobile\build_androidapp.go:9:2: cannot find package "crypto/x509" in any of:
        C:\Go\bin\src\crypto\x509 (from $GOROOT)
        C:\Users\rohan\go\src\crypto\x509 (from $GOPATH)
cmd\gomobile\cert.go:12:2: cannot find package "crypto/x509/pkix" in any of:
        C:\Go\bin\src\crypto\x509\pkix (from $GOROOT)
        C:\Users\rohan\go\src\crypto\x509\pkix (from $GOPATH)
internal\binres\binres.go:49:2: cannot find package "encoding" in any of:
        C:\Go\bin\src\encoding (from $GOROOT)
        C:\Users\rohan\go\src\encoding (from $GOPATH)
cmd\gomobile\cert.go:13:2: cannot find package "encoding/asn1" in any of:
        C:\Go\bin\src\encoding\asn1 (from $GOROOT)
        C:\Users\rohan\go\src\encoding\asn1 (from $GOPATH)
cmd\gomobile\build_androidapp.go:10:2: cannot find package "encoding/base64" in any of:
        C:\Go\bin\src\encoding\base64 (from $GOROOT)
        C:\Users\rohan\go\src\encoding\base64 (from $GOPATH)
internal\binres\binres.go:50:2: cannot find package "encoding/binary" in any of:
        C:\Go\bin\src\encoding\binary (from $GOROOT)
        C:\Users\rohan\go\src\encoding\binary (from $GOPATH)
cmd\gomobile\build_androidapp.go:11:2: cannot find package "encoding/pem" in any of:
        C:\Go\bin\src\encoding\pem (from $GOROOT)
        C:\Users\rohan\go\src\encoding\pem (from $GOPATH)
cmd\gomobile\binary_xml.go:8:2: cannot find package "encoding/xml" in any of:
        C:\Go\bin\src\encoding\xml (from $GOROOT)
        C:\Users\rohan\go\src\encoding\xml (from $GOPATH)
cmd\gomobile\writer.go:75:2: cannot find package "hash" in any of:
        C:\Go\bin\src\hash (from $GOROOT)
        C:\Users\rohan\go\src\hash (from $GOPATH)
cmd\gomobile\main.go:15:2: cannot find package "html/template" in any of:
        C:\Go\bin\src\html\template (from $GOROOT)
        C:\Users\rohan\go\src\html\template (from $GOPATH)
cmd\gomobile\cert.go:15:2: cannot find package "math/big" in any of:
        C:\Go\bin\src\math\big (from $GOROOT)
        C:\Users\rohan\go\src\math\big (from $GOPATH)
cmd\gomobile\bind_iosapp.go:14:2: cannot find package "text/template" in any of:
        C:\Go\bin\src\text\template (from $GOROOT)
        C:\Users\rohan\go\src\text\template (from $GOPATH)
cmd\gomobile\cert.go:16:2: cannot find package "time" in any of:
        C:\Go\bin\src\time (from $GOROOT)
        C:\Users\rohan\go\src\time (from $GOPATH)
internal\binres\pool.go:9:2: cannot find package "unicode/utf16" in any of:
        C:\Go\bin\src\unicode\utf16 (from $GOROOT)
        C:\Users\rohan\go\src\unicode\utf16 (from $GOPATH)

@hajimehoshi
Copy link
Member

That's odd... This seems loading standard libraries failed. @hyangah do you have any insights?

@AlexRouSg
Copy link
Contributor

With both 82c397... and 597adf... I'm getting identical results as #36731 (comment) on windows.

Reguarding the last post from @rohankeskar19, notice how the path says C:\Go\bin\src... and not C:\Go\src this looks like a system configuration issue or a bad Go install.

@hajimehoshi
Copy link
Member

With both 82c397... and 597adf... I'm getting identical results as #36731 (comment) on windows.

Thank you! This means that this issue has existed even before introducing Go modules.

@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile 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

6 participants