Repository: go
Issue: x/mobile/cmd/gomobile : Can't generate library for android for the following go package https://github.com/ethereum/go-ethereum/whisper/whisperv6
Labels: NeedsInvestigation,mobile

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.6 windows/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
```
$ 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
```
</pre></details>

### What did you do?
```
gomobile bind -v -target android github.com/ethereum/go-ethereum/whisper/whisperv6
```
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->



### 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
```