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: gomobile init no longer works due to openal-soft and Go changes #46943

Open
BenLubar opened this issue Jun 27, 2021 · 1 comment
Open

x/mobile: gomobile init no longer works due to openal-soft and Go changes #46943

BenLubar opened this issue Jun 27, 2021 · 1 comment

Comments

@BenLubar
Copy link

@BenLubar BenLubar commented Jun 27, 2021

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

$ go version
go version go1.16.5 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/ben/go/bin"
GOCACHE="/home/ben/.cache/go-build"
GOENV="/home/ben/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/ben/.golang-path/pkg/mod"
GONOPROXY="git.lubar.me/*"
GONOSUMDB="git.lubar.me/*"
GOOS="linux"
GOPATH="/home/ben/.golang-path"
GOPATH="/home/ben/.golang-path"
GOPRIVATE="git.lubar.me/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.5"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build979802223=/tmp/go-build -gno-record-gcc-switches"

What did you do?

git clone -b 1.21.1 https://github.com/kcat/openal-soft.git
gomobile init -openal openal-soft

What did you expect to see?

It builds the shared library.

What did you see instead?

gomobile: go install golang.org/x/mobile/cmd/gobind failed: exit status 1
go install: version is required when current directory is not in a module
        Try 'go install golang.org/x/mobile/cmd/gobind@latest' to install the latest version

and if I make a go.mod file to avoid that error:

gomobile: /usr/bin/cmake /home/ben/src/utils/openal-soft -DCMAKE_TOOLCHAIN_FILE=/home/ben/src/utils/openal-soft/XCompile-Android.txt -DHOST=armv7a-linux-androideabi16 failed: exit status 1
CMake Error at XCompile-Android.txt:16 (MESSAGE):
  Use the toolchain provided by the Android NDK
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/CMakeDetermineSystem.cmake:93 (include)
  CMakeLists.txt:30 (project)


CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
@jakubgs
Copy link

@jakubgs jakubgs commented Sep 13, 2021

I've been dealing with these issues in our Android/iOS library we build using gomobile: status-im/status-go#2352

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

Successfully merging a pull request may close this issue.

None yet
4 participants