Skip to content

cmd/go: Cross-compilation for android/arm fails on Linux, while other arm platforms succeed #9412

@ChimeraCoder

Description

@ChimeraCoder

After updating to 1.4, I wanted to check out the sample Android applications. At first, go get golang.org/x/mobile/example/basic failed, as it couldn't find EGL/egl.h and GLES2/gl2.h (solution: install libgles2-mesa-dev and libegl1-mesa-dev, after which go get succeeds).

After installing these, I attempted to set up cross-compilation for the android/arm platform. For convenience, I used davecheney's helper script (it does not include android/arm, so I added it manually). Using this script, I am able to build Go for all the platforms except android/arm, which gives the following error:

gcc: error: unrecognized command line option ‘-marm’

However, freebsd/arm and linux/arm succeed with no such issue. (Attempting to compile the sample Android application fails with the same error message, for what it's worth).

I initially thought this was an issue with Debian (Wheezy) packages being out of date, but I run into the same issues on Arch as well (both machines are x86_64, and both have the Android SDK installed).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions