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: build error when compiling with openal #20902

Open
HaHahrf opened this Issue Jul 4, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@HaHahrf

HaHahrf commented Jul 4, 2017

What version of Go are you using (go version)?

go version go1.8.1 darwin/amd64
gomobile version +44a54e9 Wed May 24 10:27:38 2017 +0000 (android,ios); androidSDK=

What operating system and processor architecture are you using (go env)?

MacOS10.12.1

What did you do?

gomobile init -ndk /Users/bluepants/Documents/adt-bundle-mac-x86_64-20131030/sdk/ndk-bundle -openal "/Users/bluepants/Downloads/openal-soft-1.18.0"

gomobile build

What did you expect to see?

SUCCESS

What did you see instead?

gomobile: the Android requires the golang.org/x/mobile/exp/audio/al, but the OpenAL libraries was not found. Please run gomobile init with the -openal flag pointing to an OpenAL source directory.

Is somewhere I did wrong?Why did I can't do it right?Please help me.

@HaHahrf

This comment has been minimized.

HaHahrf commented Jul 4, 2017

sorry,the go env:
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/bluepants/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tf/wy4j596n6cb8g0t6njx0jx0w0000gn/T/go-build096375210=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

@HaHahrf

This comment has been minimized.

HaHahrf commented Jul 4, 2017

PS,if I didn't run "gomobile init" with -openal flag,I will get the same error output.This stuff is just driving me crazy ...
It seems like it ignored the -openal flag??

@HaHahrf

This comment has been minimized.

HaHahrf commented Jul 4, 2017

Another thing. At first I built this,I got the error

golang.org/x/mobile/exp/audio/al

../../../golang.org/x/mobile/exp/audio/al/al_android.go:13:10: fatal error: 'AL/al.h' file not found
#include <AL/al.h>
^
1 error generated.

Then I added AL/ directory from what I just downloaded to exp/audio/al/,and init gomobile with openal flag pointing what I just downloaded.

I'm confused because I don't know what's the right way to deal with it

@odeke-em odeke-em changed the title from gomobile build error when compiling with openal to x/mobile: build error when compiling with openal Jul 21, 2017

@gopherbot gopherbot added this to the Unreleased milestone Jul 21, 2017

@odeke-em

This comment has been minimized.

Member

odeke-em commented Jul 21, 2017

/cc @hyangah @rakyll @crawshaw. Also not a regression from Go1.8.

@gopherbot gopherbot added the mobile label Jul 27, 2017

@gopherbot

This comment has been minimized.

gopherbot commented Mar 16, 2018

Change https://golang.org/cl/101136 mentions this issue: cmd/gomobile: don't ignore -openal if no NDK was found

@eliasnaur

This comment has been minimized.

Contributor

eliasnaur commented Mar 16, 2018

Please run gomobile init with the -ndk flag as well. I'll send a CL that won't silently ignore -openal if no NDK is found.

gopherbot pushed a commit to golang/mobile that referenced this issue Mar 26, 2018

cmd/gomobile: don't ignore -openal if no NDK was found
Updates golang/go#20902

Change-Id: I523c0b7a205e620c143f2ba9c7cdbe30865a9c59
Reviewed-on: https://go-review.googlesource.com/101136
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment