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: darwin rename issue #14503

diegostamigni opened this issue Feb 25, 2016 · 5 comments

x/mobile/cmd/gomobile: darwin rename issue #14503

diegostamigni opened this issue Feb 25, 2016 · 5 comments


Copy link

@diegostamigni diegostamigni commented Feb 25, 2016

Hello guys, I've updated gomobile and gobind today with go get but unfortunately I'm getting this error while trying to initialize it:

➜ ~ gomobile init
gomobile: rename /Users/osiris/Sviluppo/go/pkg/gomobile/work-984282710/android-ndk-r10e/platforms/android-15/arch-x86/usr /Users/osiris/Sviluppo/go/pkg/gomobile/android-ndk-r10e/x86/sysroot/usr: no such file or directory
➜ ~

Here it is the version:
➜ ~ gomobile version
gomobile version +74f8898 Thu Feb 25 00:29:21 2016 +0000 (android,ios); androidSDK=/Users/osiris/Sviluppo/Android/adt-bundle-mac-x86_64-20140702/sdk/platforms/android-23
➜ ~

@rakyll rakyll added this to the Unreleased milestone Feb 29, 2016
@rakyll rakyll changed the title gomobile darwin rename issue x/mobile/cmd/gomobile: darwin rename issue Feb 29, 2016
Copy link

@hyangah hyangah commented Mar 3, 2016

Deleting $GOPATH/pkg/gomobile/dl directory and run gomobile init again may fix the problem.

@diegostamigni can you do me a favor before deleting the directory?


ls -al $GOPATH/pkg/gomobile/dl

If you find gomobile-ndk-r10e-darwin-x86_64.tar.gz file (or similar) in the directory, let me know what's in the file (tmp.txt from the following command output)

tar -tvzf gomobile-ndk-r10e-darwin-x86_64.tar.gz > tmp.txt


Copy link

@diegostamigni diegostamigni commented Mar 3, 2016

Hello @hyangah,
Let's see:

➜ ~ ls -al $GOPATH/pkg/gomobile/dl
total 67232
drwxr-xr-x 5 osiris staff 170 25 Feb 11:24 .
drwxr-xr-x 4 osiris staff 136 3 Mar 17:18 ..
-rw-r--r--@ 1 osiris staff 6148 25 Feb 11:25 .DS_Store
-rw------- 1 osiris staff 33772609 27 Ago 2015 gomobile-ndk-r10e-darwin-x86_64.tar.gz
-rw------- 1 osiris staff 636130 27 Ago 2015 gomobile-openal-soft-
➜ ~ tar -tvzf $GOPATH/pkg/gomobile/dl/gomobile-ndk-r10e-darwin-x86_64.tar.gz > ~/Desktop/tmp.txt
➜ ~ gomobile init
➜ ~

As you suggested, deleting the $GOPATH/pkg/gomobile/dl fixes the issue.
Regarding the tmp.txt, there you go: tmp.txt


Copy link

@DavidYangNO1 DavidYangNO1 commented Mar 24, 2016

can't download gomobile-ndk-r10e-darwin-x86_64 pkg

Copy link

@hyangah hyangah commented Mar 24, 2016

@DavidYangNO1 Please attach gomobile init -v -x output.

Also, can you check if you can download (using wget or with your browser)?

aoeu pushed a commit to aoeu/mobile that referenced this issue Apr 19, 2016
The gomobile init command will use files cached in a 'dl' folder
in lieu of downloading a new file from scratch. If a user of gomobile
does not upgrade for a substantial amount of time, the cached files
will be out of date and possibly cause the init command to fail because
they are missing something the init command now expects.

The init command has a list of expectad sha256 message digests of files
it downloads, which can be utilized to check a file that exists in the 'dl'
folder before proceeeding to utilize it to continue with the init process.

This fixes the problem cited in issue #14503, which is not platform-specific:

Some files detailing debugging of the original problem and asserting a solution
are at the following URL:
Copy link

@aoeu aoeu commented Apr 21, 2016

I encountered the same error on one of my systems, and there was enough information here to attempt debugging. I don't believe this problem is unique to Darwin. It appears that gomobile init will use any existing archive file in the 'dl' directory matching an expected filename, even if that archive file has since changed on the hosting server after being originally fetched by gomobile init (and therefore may have a different SHA256 checksum than what is defined for the filename in hashes.go).

I realize this behavior of gomobile init is consistent with go get (fetch, and don't update unless the -u flag is specified), but maybe the code in init.go could assert an archive file found in the 'dl' directory matches the expected hash defined in hashes.go, and provide an error or recommendation to run with the -u flag (or just re-download the archive file automatically)?

If it helps, I documented my debugging session in a forked repository (that Github apparently automatically referenced above) and in . Also, if there's a change that could be advised and no one else is already working on it, I can volunteer an attempt at implementing it. (I'm more accustomed to using Gerrit than Github.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants