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 is broken #38635

Open
bergwerf opened this issue Apr 24, 2020 · 2 comments
Open

x/mobile: gomobile init is broken #38635

bergwerf opened this issue Apr 24, 2020 · 2 comments
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bergwerf
Copy link

bergwerf commented Apr 24, 2020

I tried the experimental OpenAL bindings for gomobile but they won't build for Android because the AL/al.h header is missing. I don't know how the compilation works, and in a somewhat desperate attempt I installed https://github.com/AerialX/openal-soft-android, but with no success. Should these headers be installed in the Android NDK? I would appreciate some help :) (I saw several issues but AFAIK this is the only way to play audio in gomobile right now).

@gopherbot gopherbot added this to the Unreleased milestone Apr 24, 2020
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Apr 24, 2020
@bergwerf
Copy link
Author

bergwerf commented Apr 24, 2020

I have learned a few things by digging through the source code and long issue threads (almost nothing about this is properly documented unfortunately). It appears you have to install https://repo.or.cz/openal-soft.git, and for gomobile init to work you have to specify its path with -openal and set ANDROID_HOME and ANDROID_NDK_HOME (if you don't the tool fails silently). However the tool uses XCompile-Android.txt from the OpenAL-soft repository, which says you should use the toolchain included in the Android SDK at /build/cmake/android.toolchain.cmake, and hence gomobile init fails:

gomobile: /usr/bin/cmake /home/herman/repos/universe/openal-soft -DCMAKE_TOOLCHAIN_FILE=/home/herman/repos/universe/openal-soft/XCompile-Android.txt -DHOST=armv7a-linux-androideabi16 failed: exit status 1
CMake Error at XCompile-Android.txt:11 (MESSAGE):
  Use the toolchain provided by the Android NDK
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/CMakeDetermineSystem.cmake:94 (include)
  CMakeLists.txt:5 (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!

@bergwerf bergwerf changed the title x/mobile: OpenAL binding for Android misses header x/mobile: gomobile init is broken Apr 24, 2020
@bergwerf
Copy link
Author

bergwerf commented Apr 24, 2020

This could be related to the use of modules. The gomobile init tool does copy the AL/al.h header to $GOPATH/pkg/gomobile/include/AL/al.h, but this is still not found by go build.

@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants