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

External native build issues while building LSL Android Studio examples #363

Open
nikhiljacob123 opened this issue Nov 28, 2018 · 4 comments

Comments

@nikhiljacob123
Copy link

Hi,

Would appreciate your help here. I have been trying to run the example android studio 'SendStringMarkers' in Android studio and am getting errors related to external native build issues. I have followed the instructions on the github page and downgraded the ndk to revision 14b. Yet the error remains. Could you please advice me on what went wrong? I have attached a screenshot of the error here.

@nikhiljacob123
Copy link
Author

Here is the error:

Build command failed.

Error while executing process C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Work\SleepApp_final\liblsl-Android\AndroidStudio -BC:\Work\SleepApp_final\liblsl-Android\AndroidStudio\ReceiveStringMarkers.externalNativeBuild\cmake\debug\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Work\SleepApp_final\liblsl-Android\AndroidStudio\ReceiveStringMarkers\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

You have called ADD_LIBRARY for library lsl without any source files. This typically indicates a problem with your CMakeLists.txt file

-- Configuring done

CMake Error: CMake can not determine linker language for target: lsl

-- Generating done

-- Build files have been written to: C:/Work/SleepApp_final/liblsl-Android/AndroidStudio/ReceiveStringMarkers/.externalNativeBuild/cmake/debug/armeabi

Build command failed.

Error while executing process C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Work\SleepApp_final\liblsl-Android\AndroidStudio -BC:\Work\SleepApp_final\liblsl-Android\AndroidStudio\ReceiveStringMarkers.externalNativeBuild\cmake\release\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Work\SleepApp_final\liblsl-Android\AndroidStudio\ReceiveStringMarkers\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

You have called ADD_LIBRARY for library lsl without any source files. This typically indicates a problem with your CMakeLists.txt file

-- Configuring done

CMake Error: CMake can not determine linker language for target: lsl

-- Generating done

-- Build files have been written to: C:/Work/SleepApp_final/liblsl-Android/AndroidStudio/ReceiveStringMarkers/.externalNativeBuild/cmake/release/armeabi

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Build command failed.

Error while executing process C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Work\SleepApp_final\liblsl-Android\AndroidStudio -BC:\Work\SleepApp_final\liblsl-Android\AndroidStudio\SendStringMarkers.externalNativeBuild\cmake\release\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Work\SleepApp_final\liblsl-Android\AndroidStudio\SendStringMarkers\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

You have called ADD_LIBRARY for library lsl without any source files. This typically indicates a problem with your CMakeLists.txt file

-- Configuring done

CMake Error: CMake can not determine linker language for target: lsl

-- Generating done

-- Build files have been written to: C:/Work/SleepApp_final/liblsl-Android/AndroidStudio/SendStringMarkers/.externalNativeBuild/cmake/release/armeabi

Build command failed.

Error while executing process C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Work\SleepApp_final\liblsl-Android\AndroidStudio -BC:\Work\SleepApp_final\liblsl-Android\AndroidStudio\SendStringMarkers.externalNativeBuild\cmake\debug\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-17 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Work\SleepApp_final\liblsl-Android\AndroidStudio\SendStringMarkers\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions -DCMAKE_TOOLCHAIN_FILE=C:\Work\SleepApp_final\android-ndk-r14b-windows-x86_64\android-ndk-r14b\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\man-mchimnj2\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

-- Check for working C compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

-- Check for working CXX compiler: C:/Work/SleepApp_final/android-ndk-r14b-windows-x86_64/android-ndk-r14b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

You have called ADD_LIBRARY for library lsl without any source files. This typically indicates a problem with your CMakeLists.txt file

-- Configuring done

CMake Error: CMake can not determine linker language for target: lsl

-- Generating done

-- Build files have been written to: C:/Work/SleepApp_final/liblsl-Android/AndroidStudio/SendStringMarkers/.externalNativeBuild/cmake/debug/armeabi

Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Any help would be much appreciated,
Thanks,
Nikhil

@mgrivich
Copy link
Collaborator

Doing a full recheck of Android is on my to-do list (since the recent repository reorganization), but it may be next week. I will get back to you.

@tstenner
Copy link
Collaborator

In two weeks Boost 1.69 is out which fixes a build failure with Asio and some versions of the Android NDK, so if you can wait until then it'll be a lot easier.

@mgrivich
Copy link
Collaborator

mgrivich commented Dec 6, 2018

Nikhil, I've gone through and updated and tested the Android examples. Please update to Android Studio 3.2.1, and get the latest version from master:

git clone --recursive https://github.com/sccn/labstreaminglayer.git

Then rerun your tests and let me know how it goes.

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

No branches or pull requests

3 participants