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).
The text was updated successfully, but these errors were encountered:
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):
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!