Skip to content

OT-COMMISSIONER Android Build Error #243

@Hariprabhu13

Description

@Hariprabhu13

Hi,

   I have clone the ot-commissioner repository in WSL . In that ot-commissioner cli tool is working , but the build for Android app in ot-commissioner is showing an error.

   1.) WSL ubuntu Version  :  Ubuntu 22.04.3 LTS
   2.) Android Studio Version  :  Iguana | 2023.2.1

I have cloned the repository using this guide --> "https://openthread.io/guides/commissioner/build"

The ot-commissioner is working but running the android in the ot-commissioner creating error

Error Log :

root@LAPTOP-0IPM4116:/mnt/c/Commissioner/ot-commissioner/android# ../script/bootstrap.sh
OS is Linux
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
libreadline-dev is already the newest version (8.1.2-1).
jsonlint is already the newest version (1.8.3-2).
lcov is already the newest version (1.15-1).
ninja-build is already the newest version (1.10.1-1).
swig is already the newest version (4.0.2-1ubuntu1).
cmake is already the newest version (3.22.1-1ubuntu1.22.04.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package clang-format-9
WARNING: could not install clang-format-9, which is useful if you plan to contribute C/C++ code to the OpenThread project.
Requirement already satisfied: yapf==0.29.0 in /usr/local/lib/python3.10/dist-packages (0.29.0)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
/mnt/c/Commissioner/ot-commissioner/android
root@LAPTOP-0IPM4116:/mnt/c/Commissioner/ot-commissioner/android# ANDROID_ABI=arm64-v8a ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle ./build-commissioner-libs.sh
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:30 (project):
The CMAKE_C_COMPILER:

/mnt/c/Users/hariprabhu/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

CMake Error at CMakeLists.txt:30 (project):
The CMAKE_CXX_COMPILER:

/mnt/c/Users/hariprabhu/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/mnt/c/Commissioner/ot-commissioner/android/.build-arm64-v8a/CMakeFiles/CMakeOutput.log".
See also "/mnt/c/Commissioner/ot-commissioner/android/.build-arm64-v8a/CMakeFiles/CMakeError.log".
root@LAPTOP-0IPM4116:/mnt/c/Commissioner/ot-commissioner/android#

The followed Guide that have been given by the ot-commissioner , I have used,

1.) ../script/bootstrap.sh
2.) ANDROID_ABI=arm64-v8a ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle ./build-commissioner-libs.sh

Please suggest me to clear the cmake error to build the ot-commissioner app in WSL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions