Created
December 6, 2018 16:34
-
-
Save sillyfellow/99d8e3cf022489b07f58a53d2c232b40 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/D/ndk ❯❯❯ ls | |
android-ndk-r18b android-ndk-r18b-linux-x86_64.zip | |
~/D/ndk ❯❯❯ ls android-ndk-r18b/ | |
build meta ndk-depends ndk-stack NOTICE platforms python-packages shader-tools source.properties sysroot wrap.sh | |
CHANGELOG.md ndk-build ndk-gdb ndk-which NOTICE.toolchain prebuilt README.md simpleperf sources toolchains | |
~/g/s/g/sillyfellow ❯❯❯ mkdir wget-go | |
~/g/s/g/sillyfellow ❯❯❯ cd wget-go | |
~/g/s/g/s/wget-go ❯❯❯ ls | |
~/g/s/g/s/wget-go ❯❯❯ vim main.go | |
~/g/s/g/s/wget-go ❯❯❯ go run main.go | |
Hello World | |
~/g/s/g/s/wget-go ❯❯❯ env GOOS=android GOARCH=arm go build ✘ 2 | |
# github.com/sillyfellow/wget-go | |
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 | |
gcc: error: unrecognized command line option ‘-marm’; did you mean ‘-mabm’? | |
~/g/s/g/s/wget-go ❯❯❯ env GOOS=android GOARCH=arm go build ✘ 2 | |
# github.com/sillyfellow/wget-go | |
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 | |
gcc: error: unrecognized command line option ‘-marm’; did you mean ‘-mabm’? | |
~/g/s/g/s/wget-go ❯❯❯ export NDK_ROOT=~/ndkroot ✘ 1 | |
~/g/s/g/s/wget-go ❯❯❯ ~/ndk/build/tools/make-standalone-toolchain.sh --platform=android-16 --install-dir=$NDK_ROOT | |
HOST_OS=linux | |
HOST_EXE= | |
HOST_ARCH=x86_64 | |
HOST_TAG=linux-x86_64 | |
HOST_NUM_CPUS=8 | |
BUILD_NUM_CPUS=16 | |
Auto-config: --arch=arm | |
Toolchain installed to /home/sands/ndkroot. | |
~/g/s/g/s/wget-go ❯❯❯ export NDK_CC=~/ndkroot/bin/arm-linux-androideabi-gcc ✘ 130 | |
~/g/s/g/s/wget-go ❯❯❯ export NDK_TOOLCHAIN=~/ndkroot | |
~/g/s/g/s/wget-go ❯❯❯ export GOOS=android | |
~/g/s/g/s/wget-go ❯❯❯ export GOARCH=arm | |
~/g/s/g/s/wget-go ❯❯❯ export GOARM=7 | |
~/g/s/g/s/wget-go ❯❯❯ export CGO_ENABLED=1 | |
~/g/s/g/s/wget-go ❯❯❯ | |
~/g/s/g/s/wget-go ❯❯❯ | |
~/g/s/g/s/wget-go ❯❯❯ | |
~/g/s/g/s/wget-go ❯❯❯ env GOOS=android GOARCH=arm go build | |
# runtime/cgo | |
gcc: error: unrecognized command line option '-marm'; did you mean '-mabm'? | |
~/g/s/g/s/wget-go ❯❯❯ ls -rt ✘ 2 | |
main.go | |
~/g/s/g/s/wget-go ❯❯❯ export CC=~/ndkroot/bin/arm-linux-androideabi-gcc | |
~/g/s/g/s/wget-go ❯❯❯ env GOOS=android GOARCH=arm go build | |
~/g/s/g/s/wget-go ❯❯❯ ls -rt | |
main.go wget-go | |
~/g/s/g/s/wget-go ❯❯❯ ./wget-go | |
zsh: exec format error: ./wget-go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment