xlab/android-go

example-egl build fails

Closed this issue · 0 comments

I have followed the instructions as per the readme, but I can't build the example app.

I also am having problems building the nk-android example. I must have something missing in my environment. Any help appreciated.

The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead.
:android:prepareToolchain
Preparing toolchains for ABIs: armeabi-v7a x86 Android API: 26
Using existing standalone toolchain for arch: x86
Using existing standalone toolchain for arch: arm
:android:buildGo
Build Go sources using ABIs: armeabi-v7a x86 Android API: 26
Cleaning output dir build_go/output
++ pwd
+ CURRENT_DIR=/home/simulator/go/src/github.com/xlab/android-go/example-egl
+ CC=/home/simulator/go/src/github.com/xlab/android-go/example-egl/android/build_go/toolchain/arm/bin/arm-linux-androideabi-gcc
+ CXX=/home/simulator/go/src/github.com/xlab/android-go/example-egl/android/build_go/toolchain/arm/bin/arm-linux-androideabi-g++
+ CGO_ENABLED=1
+ CGO_CFLAGS=-march=armv7-a
+ GOOS=android
+ GOARCH=arm
+ GOARM=7
+ go build -i -pkgdir /home/simulator/go/src/github.com/xlab/android-go/example-egl/android/build_go/output/armeabi-v7a -buildmode=c-shared -o android/src/main/jniLibs/armeabi-v7a/libgomain.so
# runtime/cgo
_cgo_export.c:2:20: fatal error: stdlib.h: No such file or directory
 #include <stdlib.h>
                    ^
compilation terminated.
:android:buildGo FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android:buildGo'.
> Process 'command '../bash_script/build_go.sh'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
2 actionable tasks: 2 executed


Any help appreciated. I have written a nuklear app, and it runs on Linux/FreeBSD I am trying to get it to run on Android.