How do i download opencv to termux

I want to install opencv on termux but it doesn’t work, how do I install it??

1 Like

please, more details required. what exactly do you want to do here ?
and, what do you have, so far ?

while there is a (java based) android sdk, there is no builtin support for anything like termux on android

related:

i been reading some bits about termux, and it seems, you have to build special ‘packages’ for it. however, those are all (standalone) applications, so how would opencv, being a library fit in there ?

I tried to install from this source
https://blog.katastros.com/a?ID=00700-491c79ea-bc8f-422c-976f-8ca2bff1200d

this page mentions a prebuilt opencv package (as well as a numpy one, which you’ll need anyway) so you might want to try those first.

but anyway, what exactly did YOU do, and how far did you get ?

imo the blogpost above is quite useless, as that will just build a local cv2 on your box (which also means: the arch of your box, not that of your target machine (e.g. armeabi). it also fails to mention, that you need an adroid ndk to cross-compile things (or numpy, even)

p.s. Search · termux · GitHub

2 Likes

I haven’t made any progress can you help me?

again, please try the prebuilt packages first.
building stuff from src (for an exotic platform, even) is definitely not for noobs

Aga olmuyor işte yardım ediceksen et etmiyeceksen fizolof gibi konuşma

you’d better ask those questions in the termux community. we don’t know anything about termux, nor are we responsible for it.

and please stick to english when voicing your displeasure.

Ok, I wrote in Turkish because I am Turkish.

you can try this
Step 1: Download OpenCV Android Library. …
Step 2: Setup project. …
Step 3: Import OpenCV Module. …
Step 4: Fixing Gradle Sync Errors. …
Step 5: Add the OpenCV Dependency. …
Step 6: Add Native Libraries. …
Step 7: Add Required Permissions. …
Step 8: Try out Sample.

welcome, @paanjii2 , nice, that you’re trying to help here !

however, your receipt is more to build a java based android app, while the op wanted to build a cv2 python termux package, so unfortunately, not a good fit ;(

[quote=“nacicaner093, post:11, topic:10237, full:true”]
Ok, I wrote in Turkish because I am Turkish.
[/quote] :grinning:

try

pkg upgrade 
pkg install cmake
pkg install ninja
python3 -m pip install numpy
python3 -m pip install opencv_python

and be patient… I’m still waiting result.

hi laurent, nice to have you here :wink:

so, you run that from termux ?

aaand, it needs cmake & ninja, bc. there is no prebuilt thing for your arch (which is ?) and it starts building wheels on the phone, hehe ?

Hi berak,
I have got termux install on my smartphone. I tried to install opencv_python only for fun

Now in termux :

python -m pip list
Package            Version
------------------ ---------
branca             0.4.2
certifi            2021.10.8
charset-normalizer 2.0.7
folium             0.12.1
geographiclib      1.52
geopy              2.2.0
idna               3.3
Jinja2             3.0.3
MarkupSafe         2.0.1
numpy              1.21.4
pip                22.2.2
requests           2.26.0
setuptools         63.2.0
tqdm               4.62.3
urllib3            1.26.7

python
Python 3.10.7 (main, Sep  8 2022, 06:55:17) [Clang 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

Now I have got sshd in my termux. I can paste result as TEXT :grinning:

python -m pip install opencv_python
Collecting opencv_python
  Using cached opencv-python-4.6.0.66.tar.gz (90.3 MB)
  Installing build dependencies ... /
error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [351 lines of output]
      Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment
      Ignoring numpy: markers 'python_version <= "3.9" and sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.9" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Collecting setuptools==59.2.0
        Using cached setuptools-59.2.0-py3-none-any.whl (952 kB)
      Collecting wheel==0.37.0
        Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
      Collecting cmake>=3.1
        Using cached cmake-3.24.1.1.tar.gz (33 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting pip
        Using cached pip-22.2.2-py3-none-any.whl (2.0 MB)
      Collecting scikit-build>=0.13.2
        Using cached scikit_build-0.15.0-py2.py3-none-any.whl (77 kB)
      Collecting numpy==1.21.2
        Using cached numpy-1.21.2-cp310-cp310-linux_aarch64.whl
      Collecting packaging
        Using cached packaging-21.3-py3-none-any.whl (40 kB)
      Collecting distro
        Using cached distro-1.7.0-py3-none-any.whl (20 kB)
      Collecting pyparsing!=3.0.5,>=2.0.2
        Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
      Building wheels for collected packages: cmake
        Building wheel for cmake (pyproject.toml): started
        Building wheel for cmake (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        × Building wheel for cmake (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [307 lines of output]
            Not searching for unused variables given on the command line.
            -- The C compiler identification is Clang 14.0.6
            -- Detecting C compiler ABI info
            -- Detecting C compiler ABI info - done
            -- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc - skipped
            -- Detecting C compile features
            -- Detecting C compile features - done
            -- The CXX compiler identification is Clang 14.0.6
            -- Detecting CXX compiler ABI info
            -- Detecting CXX compiler ABI info - done
            -- Check for working CXX compiler: /data/data/com.termux/files/usr/bin/c++ - skipped
            -- Detecting CXX compile features
            -- Detecting CXX compile features - done
            -- Configuring done
            -- Generating done
            -- Build files have been written to: /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_cmake_test_compile/build
            -- The CXX compiler identification is Clang 14.0.6
            -- Detecting CXX compiler ABI info
            -- Detecting CXX compiler ABI info - done
            -- Check for working CXX compiler: /data/data/com.termux/files/usr/bin/c++ - skipped
            -- Detecting CXX compile features
            -- Detecting CXX compile features - done
            -- ***************************************************
            -- Build CMake from source: ON
            -- ***************************************************
            CMake Warning (dev) at /data/data/com.termux/files/usr/share/cmake-3.24/Modules/ExternalProject.cmake:3071 (message):
              The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
              not set.  The policy's OLD behavior will be used.  When using a URL
              download, the timestamps of extracted files should preferably be that of
              the time of extraction, otherwise code that depends on the extracted
              contents might not be rebuilt if the URL changes.  The OLD behavior
              preserves the timestamps from the archive instead, but this is usually not
              what you want.  Update your project to the NEW behavior or specify the
              DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
              robustness issue.
            Call Stack (most recent call first):
              /data/data/com.termux/files/usr/share/cmake-3.24/Modules/ExternalProject.cmake:4167 (_ep_add_download_command)
              CMakeLists.txt:134 (ExternalProject_add)
            This warning is for project developers.  Use -Wno-dev to suppress it.

            -- SuperBuild - CMakeProject-src-download
            -- SuperBuild - CMakeProject-src-download - URL: https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1.tar.gz
            -- SuperBuild - CMakeProject-src-download - CMakeProject_SOURCE_DIR: /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/CMake-src
            -- Looking for __GLIBC__
            -- Looking for __GLIBC__ - not found
            -- Looking for __GLIBC_MINOR__
            -- Looking for __GLIBC_MINOR__ - not found
            -- SuperBuild -   CMakeProject-build
            -- SuperBuild -   CMakeProject-build - CMakeProject_BINARY_DIR: /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build
            -- SuperBuild -   CMakePythonDistributions
            -- Configuring done
            -- Generating done
            CMake Warning:
              Manually-specified variables were not used by the project:

                PYTHON_EXECUTABLE
                PYTHON_INCLUDE_DIR
                PYTHON_LIBRARY
                PYTHON_VERSION_STRING
                Python3_EXECUTABLE
                Python3_INCLUDE_DIR
                Python3_LIBRARY
                Python_EXECUTABLE
                Python_INCLUDE_DIR
                Python_LIBRARY
                SKBUILD


            -- Build files have been written to: /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build
            [1/27] Creating directories for 'CMakeProject-src-download'
            [1/27] Performing download step (download, verify and extract) for 'CMakeProject-src-download'
            -- Downloading...
               dst='/data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/cmake-3.24.1.tar.gz'
               timeout='none'
               inactivity timeout='none'
            -- Using src='https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1.tar.gz'
            -- [download 0% complete]
            -- [download 1% complete]
            -- [download 2% complete]
            -- [download 3% complete]
            -- [download 4% complete]
            -- [download 5% complete]
            -- [download 6% complete]
            -- [download 7% complete]
            -- [download 8% complete]
            -- [download 9% complete]
            -- [download 10% complete]
            -- [download 11% complete]
            -- [download 12% complete]
            -- [download 13% complete]
            -- [download 14% complete]
            -- [download 15% complete]
            -- [download 16% complete]
            -- [download 17% complete]
            -- [download 18% complete]
            -- [download 19% complete]
            -- [download 20% complete]
            -- [download 21% complete]
            -- [download 22% complete]
            -- [download 23% complete]
            -- [download 24% complete]
            -- [download 25% complete]
            -- [download 26% complete]
            -- [download 27% complete]
            -- [download 28% complete]
            -- [download 29% complete]
            -- [download 30% complete]
            -- [download 31% complete]
            -- [download 32% complete]
            -- [download 33% complete]
            -- [download 34% complete]
            -- [download 35% complete]
            -- [download 37% complete]
            -- [download 38% complete]
            -- [download 39% complete]
            -- [download 40% complete]
            -- [download 41% complete]
            -- [download 42% complete]
            -- [download 43% complete]
            -- [download 44% complete]
            -- [download 45% complete]
            -- [download 46% complete]
            -- [download 47% complete]
            -- [download 48% complete]
            -- [download 49% complete]
            -- [download 50% complete]
            -- [download 51% complete]
            -- [download 52% complete]
            -- [download 53% complete]
            -- [download 55% complete]
            -- [download 56% complete]
            -- [download 57% complete]
            -- [download 58% complete]
            -- [download 59% complete]
            -- [download 60% complete]
            -- [download 61% complete]
            -- [download 62% complete]
            -- [download 63% complete]
            -- [download 64% complete]
            -- [download 65% complete]
            -- [download 66% complete]
            -- [download 67% complete]
            -- [download 68% complete]
            -- [download 69% complete]
            -- [download 70% complete]
            -- [download 71% complete]
            -- [download 72% complete]
            -- [download 73% complete]
            -- [download 74% complete]
            -- [download 75% complete]
            -- [download 76% complete]
            -- [download 77% complete]
            -- [download 78% complete]
            -- [download 79% complete]
            -- [download 80% complete]
            -- [download 81% complete]
            -- [download 82% complete]
            -- [download 83% complete]
            -- [download 84% complete]
            -- [download 85% complete]
            -- [download 86% complete]
            -- [download 87% complete]
            -- [download 88% complete]
            -- [download 89% complete]
            -- [download 90% complete]
            -- [download 91% complete]
            -- [download 92% complete]
            -- [download 93% complete]
            -- [download 94% complete]
            -- [download 95% complete]
            -- [download 96% complete]
            -- [download 97% complete]
            -- [download 98% complete]
            -- [download 99% complete]
            -- [download 100% complete]
            -- verifying file...
                   file='/data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/cmake-3.24.1.tar.gz'
            -- Downloading... done
            -- extracting...
                 src='/data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/cmake-3.24.1.tar.gz'
                 dst='/data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/CMake-src'
            -- extracting... [tar xfz]
            -- extracting... [analysis]
            -- extracting... [rename]
            -- extracting... [clean up]
            -- extracting... done
            [3/27] No update step for 'CMakeProject-src-download'
            [4/27] No patch step for 'CMakeProject-src-download'
            [5/27] No configure step for 'CMakeProject-src-download'
            [6/27] No build step for 'CMakeProject-src-download'
            [7/27] No install step for 'CMakeProject-src-download'
            [8/27] Completed 'CMakeProject-src-download'
            [9/27] Creating directories for 'CMakeProject-build'
            [10/27] No download step for 'CMakeProject-build'
            [11/27] No update step for 'CMakeProject-build'
            [12/27] No patch step for 'CMakeProject-build'
            [12/27] Performing configure step for 'CMakeProject-build'
            loading initial cache file /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/initial-cache.txt
            loading initial cache file /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build-prefix/tmp/CMakeProject-build-cache-Release.cmake
            -- The C compiler identification is Clang 14.0.6
            -- The CXX compiler identification is Clang 14.0.6
            -- Detecting C compiler ABI info
            -- Detecting C compiler ABI info - failed
            -- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc
            -- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc - broken
            CMake Error at /data/data/com.termux/files/usr/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
              The C compiler

                "/data/data/com.termux/files/usr/bin/cc"

              is not able to compile a simple test program.

              It fails with the following output:

                Change Dir: /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build/CMakeFiles/CMakeTmp

                Run Build Command(s):/data/data/com.termux/files/usr/bin/ninja cmTC_0743b && [1/2] Building C object CMakeFiles/cmTC_0743b.dir/testCCompiler.c.o
                [2/2] Linking C executable cmTC_0743b
                FAILED: cmTC_0743b
                : && /data/data/com.termux/files/usr/bin/cc -D_POSIX_C_SOURCE=199506L -D_POSIX_SOURCE=1 -D_SVID_SOURCE=1 -D_BSD_SOURCE=1  -O2 -g -DNDEBUG -lstdc++ -lgcc -lrt CMakeFiles/cmTC_0743b.dir/testCCompiler.c.o -o cmTC_0743b   && :
                ld.lld: error: unable to find library -lgcc
                clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
                ninja: build stopped: subcommand failed.





              CMake will not be able to correctly generate this project.
            Call Stack (most recent call first):
              CMakeLists.txt:12 (project)


            -- Configuring incomplete, errors occurred!
            See also "/data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build/CMakeFiles/CMakeOutput.log".
            See also "/data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build/CMakeFiles/CMakeError.log".
            FAILED: CMakeProject-build-prefix/src/CMakeProject-build-stamp/CMakeProject-build-configure /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build-prefix/src/CMakeProject-build-stamp/CMakeProject-build-configure
            cd /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build && /data/data/com.termux/files/usr/bin/cmake -C /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/initial-cache.txt -GNinja -C/data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build-prefix/tmp/CMakeProject-build-cache-Release.cmake /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/CMake-src && /data/data/com.termux/files/usr/bin/cmake -E touch /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build/CMakeProject-build-prefix/src/CMakeProject-build-stamp/CMakeProject-build-configure
            ninja: build stopped: subcommand failed.
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-tupphzym/overlay/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
                cmkr.make(make_args, install_target=cmake_install_target, env=env)
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-tupphzym/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 680, in make
                self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
              File "/data/data/com.termux/files/usr/tmp/pip-build-env-tupphzym/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 704, in make_impl
                raise SKBuildError(


            --------------------------------------------------------------------------------
            -- Trying "Ninja" generator
            --------------------------------
            ---------------------------
            ----------------------
            -----------------
            ------------
            -------
            --
            --
            -------
            ------------
            -----------------
            ----------------------
            ---------------------------
            --------------------------------
            -- Trying "Ninja" generator - success
            --------------------------------------------------------------------------------

            Configuring Project
              Working directory:
                /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build
              Command:
                cmake /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-install/src/cmake/data -DPYTHON_VERSION_STRING:STRING=3.10.7 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/data/data/com.termux/files/usr/tmp/pip-build-env-tupphzym/overlay/lib/python3.10/site-packages/skbuild/resources/cmake -DPython3_EXECUTABLE:FILEPATH=/data/data/com.termux/files/usr/bin/python -DPython3_INCLUDE_DIR:PATH=/data/data/com.termux/files/usr/include/python3.10 -DPython3_LIBRARY:PATH=/data/data/com.termux/files/usr/lib/libpython3.10.so -DPython_EXECUTABLE:FILEPATH=/data/data/com.termux/files/usr/bin/python -DPython_INCLUDE_DIR:PATH=/data/data/com.termux/files/usr/include/python3.10 -DPython_LIBRARY:PATH=/data/data/com.termux/files/usr/lib/libpython3.10.so -DPYTHON_EXECUTABLE:FILEPATH=/data/data/com.termux/files/usr/bin/python -DPYTHON_INCLUDE_DIR:PATH=/data/data/com.termux/files/usr/include/python3.10 -DPYTHON_LIBRARY:PATH=/data/data/com.termux/files/usr/lib/libpython3.10.so -DCMAKE_BUILD_TYPE:STRING=Release

            Traceback (most recent call last):


                =============================DEBUG ASSISTANCE=============================
                If you are seeing a compilation error please try the following steps to
                successfully install cmake:
                1) Upgrade to the latest pip and try again. This will fix errors for most
                   users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
                2) If on Linux, with glibc < 2.12, you can set PIP_ONLY_BINARY=cmake in
                   order to retrieve the last manylinux1 compatible wheel.
                3) If on Linux, with glibc < 2.12, you can cap "cmake<3.23" in your
                   requirements in order to retrieve the last manylinux1 compatible wheel.
                4) Open an issue with the debug information that follows at
                   https://github.com/scikit-build/cmake-python-distributions/issues

                Python: 3.10.7
                platform: Linux-4.9.227-perf+-aarch64-with-libc
                machine: aarch64
                bits: 64
                pip: n/a
                setuptools: 65.3.0
                scikit-build: 0.15.0
                PEP517_BUILD_BACKEND=setuptools.build_meta
                =============================DEBUG ASSISTANCE=============================

            An error occurred while building with CMake.
              Command:
                cmake --build . --target install --config Release --
              Install target:
                install
              Source directory:
                /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563
              Working directory:
                /data/data/com.termux/files/usr/tmp/pip-install-7vyhasg8/cmake_45a7a21dbb324b90b276db752588b563/_skbuild/linux-aarch64-3.10/cmake-build
            Please check the install target is valid and see CMake's output for more information.
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for cmake
      Failed to build cmake
      ERROR: Could not build wheels for cmake, which is required to install pyproject.toml-based projects
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
1 Like

now I tried compile opencv from source using cmake . Some errors but this issue is usefull CMake Error on Termux, Android SDK: specify path to Android SDK via ANDROID_SDK_ROOT / ANDROID_HOME / ANDROID_SDK variables · Issue #15769 · opencv/opencv · GitHub

Now :

 cmake ../opencv -DBUILD_JAVA=OFF  -DBUILD_ANDROID_EXAMPLES=OFF
-- 'Release' build type is used by default. Use CMAKE_BUILD_TYPE to specify build type (Release or Debug)
-- The CXX compiler identification is Clang 14.0.6
-- The C compiler identification is Clang 14.0.6
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /data/data/com.termux/files/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detected processor: aarch64
-- Found PythonInterp: /data/data/com.termux/files/usr/bin/python (found suitable version "3.10.7", minimum required is "2.7")
CMake Warning at cmake/OpenCVDetectPython.cmake:81 (message):
  CMake's 'find_host_package(PythonInterp 2.7)' found wrong Python version:

  PYTHON_EXECUTABLE=/data/data/com.termux/files/usr/bin/python

  PYTHON_VERSION_STRING=3.10.7

  Consider providing the 'PYTHON2_EXECUTABLE' variable via CMake command line
  or environment variables

Call Stack (most recent call first):
  cmake/OpenCVDetectPython.cmake:271 (find_python)
  CMakeLists.txt:637 (include)


-- Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter)
    Reason given by package:
        Interpreter: Wrong major version for the interpreter "/data/data/com.termux/files/usr/bin/python"

-- Found PythonInterp: /data/data/com.termux/files/usr/bin/python3 (found suitable version "3.10.7", minimum required is "3.2")
-- Looking for ccache - not found
-- Performing Test HAVE_CXX_FSIGNED_CHAR
-- Performing Test HAVE_CXX_FSIGNED_CHAR - Success
-- Performing Test HAVE_C_FSIGNED_CHAR
-- Performing Test HAVE_C_FSIGNED_CHAR - Success
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Success
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Success
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Success
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Success
-- Performing Test HAVE_CXX_WRETURN_TYPE
-- Performing Test HAVE_CXX_WRETURN_TYPE - Success
-- Performing Test HAVE_C_WRETURN_TYPE
-- Performing Test HAVE_C_WRETURN_TYPE - Success
-- Performing Test HAVE_CXX_WNON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WADDRESS
-- Performing Test HAVE_CXX_WADDRESS - Success
-- Performing Test HAVE_C_WADDRESS
-- Performing Test HAVE_C_WADDRESS - Success
-- Performing Test HAVE_CXX_WSEQUENCE_POINT
-- Performing Test HAVE_CXX_WSEQUENCE_POINT - Success
-- Performing Test HAVE_C_WSEQUENCE_POINT
-- Performing Test HAVE_C_WSEQUENCE_POINT - Success
-- Performing Test HAVE_CXX_WFORMAT
-- Performing Test HAVE_CXX_WFORMAT - Success
-- Performing Test HAVE_C_WFORMAT
-- Performing Test HAVE_C_WFORMAT - Success
-- Performing Test HAVE_CXX_WFORMAT_SECURITY
-- Performing Test HAVE_CXX_WFORMAT_SECURITY - Success
-- Performing Test HAVE_C_WFORMAT_SECURITY
-- Performing Test HAVE_C_WFORMAT_SECURITY - Success
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WMISSING_DECLARATIONS
-- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WMISSING_PROTOTYPES
-- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
-- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES
-- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WUNDEF
-- Performing Test HAVE_CXX_WUNDEF - Success
-- Performing Test HAVE_C_WUNDEF
-- Performing Test HAVE_C_WUNDEF - Success
-- Performing Test HAVE_CXX_WINIT_SELF
-- Performing Test HAVE_CXX_WINIT_SELF - Success
-- Performing Test HAVE_C_WINIT_SELF
-- Performing Test HAVE_C_WINIT_SELF - Success
-- Performing Test HAVE_CXX_WPOINTER_ARITH
-- Performing Test HAVE_CXX_WPOINTER_ARITH - Success
-- Performing Test HAVE_C_WPOINTER_ARITH
-- Performing Test HAVE_C_WPOINTER_ARITH - Success
-- Performing Test HAVE_CXX_WSHADOW
-- Performing Test HAVE_CXX_WSHADOW - Success
-- Performing Test HAVE_C_WSHADOW
-- Performing Test HAVE_C_WSHADOW - Success
-- Performing Test HAVE_CXX_WSIGN_PROMO
-- Performing Test HAVE_CXX_WSIGN_PROMO - Success
-- Performing Test HAVE_C_WSIGN_PROMO
-- Performing Test HAVE_C_WSIGN_PROMO - Success
-- Performing Test HAVE_CXX_WUNINITIALIZED
-- Performing Test HAVE_CXX_WUNINITIALIZED - Success
-- Performing Test HAVE_C_WUNINITIALIZED
-- Performing Test HAVE_C_WUNINITIALIZED - Success
-- Performing Test HAVE_CXX_WINCONSISTENT_MISSING_OVERRIDE
-- Performing Test HAVE_CXX_WINCONSISTENT_MISSING_OVERRIDE - Success
-- Performing Test HAVE_C_WINCONSISTENT_MISSING_OVERRIDE
-- Performing Test HAVE_C_WINCONSISTENT_MISSING_OVERRIDE - Success
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
-- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Success
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
-- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Success
-- Performing Test HAVE_CXX_WNO_COMMENT
-- Performing Test HAVE_CXX_WNO_COMMENT - Success
-- Performing Test HAVE_C_WNO_COMMENT
-- Performing Test HAVE_C_WNO_COMMENT - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_ENUM_ENUM_CONVERSION
-- Performing Test HAVE_CXX_WNO_DEPRECATED_ENUM_ENUM_CONVERSION - Success
-- Performing Test HAVE_C_WNO_DEPRECATED_ENUM_ENUM_CONVERSION
-- Performing Test HAVE_C_WNO_DEPRECATED_ENUM_ENUM_CONVERSION - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_ANON_ENUM_ENUM_CONVERSION
-- Performing Test HAVE_CXX_WNO_DEPRECATED_ANON_ENUM_ENUM_CONVERSION - Success
-- Performing Test HAVE_C_WNO_DEPRECATED_ANON_ENUM_ENUM_CONVERSION
-- Performing Test HAVE_C_WNO_DEPRECATED_ANON_ENUM_ENUM_CONVERSION - Success
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION
-- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success
-- Performing Test HAVE_CXX_QUNUSED_ARGUMENTS
-- Performing Test HAVE_CXX_QUNUSED_ARGUMENTS - Success
-- Performing Test HAVE_C_QUNUSED_ARGUMENTS
-- Performing Test HAVE_C_QUNUSED_ARGUMENTS - Success
-- Performing Test HAVE_CPU_NEON_SUPPORT (check file: cmake/checks/cpu_neon.cpp)
-- Performing Test HAVE_CPU_NEON_SUPPORT - Success
-- Performing Test HAVE_CPU_FP16_SUPPORT (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CPU_FP16_SUPPORT - Success
-- Performing Test HAVE_CPU_BASELINE_FLAGS
-- Performing Test HAVE_CPU_BASELINE_FLAGS - Success
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_HIDDEN - Success
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_CXX_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
-- Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Success
-- Performing Test HAVE_LINK_AS_NEEDED
-- Performing Test HAVE_LINK_AS_NEEDED - Success
-- Performing Test HAVE_LINK_NO_UNDEFINED
-- Performing Test HAVE_LINK_NO_UNDEFINED - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for memalign
-- Looking for memalign - found
-- Found ZLIB: /data/data/com.termux/files/usr/lib/libz.so (found suitable version "1.2.12", minimum required is "1.2.3")
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_C_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_C_WNO_SIGN_COMPARE
-- Performing Test HAVE_C_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32
-- Performing Test HAVE_C_WNO_SHORTEN_64_TO_32 - Success
-- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH
-- Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH - Success
-- libjpeg-turbo: VERSION = 2.1.3, BUILD = opencv-4.6.0-dev-libjpeg-turbo
-- 64-bit build (arm64)
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of unsigned long
-- Check size of unsigned long - done
-- Performing Test HAVE_BUILTIN_CTZL
-- Performing Test HAVE_BUILTIN_CTZL - Success
-- Looking for include file locale.h
-- Looking for include file locale.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Performing Test HAVE_VLD1_S16_X3
-- Performing Test HAVE_VLD1_S16_X3 - Success
-- Performing Test HAVE_VLD1_U16_X2
-- Performing Test HAVE_VLD1_U16_X2 - Success
-- Performing Test HAVE_VLD1Q_U8_X4
-- Performing Test HAVE_VLD1Q_U8_X4 - Success
-- Use full Neon SIMD intrinsics implementation (NEON_INTRINSICS = ON)
-- SIMD extensions: arm64 (WITH_SIMD = 1)
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for limits.h
-- Looking for limits.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for search.h
-- Looking for search.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Performing Test C_HAS_inline
-- Performing Test C_HAS_inline - Success
-- Check size of signed short
-- Check size of signed short - done
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Check size of signed int
-- Check size of signed int - done
-- Check size of unsigned int
-- Check size of unsigned int - done
-- Check size of signed long
-- Check size of signed long - done
-- Check size of signed long long
-- Check size of signed long long - done
-- Check size of unsigned long long
-- Check size of unsigned long long - done
-- Check size of unsigned char *
-- Check size of unsigned char * - done
-- Check size of ptrdiff_t
-- Check size of ptrdiff_t - done
-- Check size of INT8
-- Check size of INT8 - failed
-- Check size of INT16
-- Check size of INT16 - failed
-- Check size of INT32
-- Check size of INT32 - failed
-- Looking for floor
-- Looking for floor - not found
-- Looking for pow
-- Looking for pow - not found
-- Looking for sqrt
-- Looking for sqrt - not found
-- Looking for isascii
-- Looking for isascii - found
-- Looking for memset
-- Looking for memset - found
-- Looking for mmap
-- Looking for mmap - found
-- Looking for getopt
-- Looking for getopt - found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for setmode
-- Looking for setmode - not found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strchr
-- Looking for strchr - found
-- Looking for strrchr
-- Looking for strrchr - found
-- Looking for strstr
-- Looking for strstr - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for strtol
-- Looking for strtol - found
-- Looking for strtoull
-- Looking for strtoull - found
-- Looking for lfind
-- Looking for lfind - found
-- Performing Test HAVE_SNPRINTF
-- Performing Test HAVE_SNPRINTF - Success
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_C_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_C_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_C_WNO_UNDEF
-- Performing Test HAVE_C_WNO_UNDEF - Success
-- Performing Test HAVE_C_WNO_UNUSED
-- Performing Test HAVE_C_WNO_UNUSED - Success
-- Performing Test HAVE_C_WNO_CAST_ALIGN
-- Performing Test HAVE_C_WNO_CAST_ALIGN - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED
-- Performing Test HAVE_C_WNO_MAYBE_UNINITIALIZED - Failed
-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST
-- Performing Test HAVE_C_WNO_POINTER_TO_INT_CAST - Success
-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST
-- Performing Test HAVE_C_WNO_INT_TO_POINTER_CAST - Success
-- Performing Test HAVE_C_WNO_MISLEADING_INDENTATION
-- Performing Test HAVE_C_WNO_MISLEADING_INDENTATION - Success
-- Performing Test HAVE_C_WNO_ARRAY_PARAMETER
-- Performing Test HAVE_C_WNO_ARRAY_PARAMETER - Failed
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES
-- Performing Test HAVE_C_WNO_STRICT_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER
-- Performing Test HAVE_CXX_WNO_UNUSED_PARAMETER - Success
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Success
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Performing Test HAVE_C_STD_C99
-- Performing Test HAVE_C_STD_C99 - Success
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_C_WNO_UNUSED_FUNCTION - Success
-- Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1). OpenJPEG will be built from sources
-- Performing Test HAVE_C_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION
-- Performing Test HAVE_C_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION - Success
-- OpenJPEG: VERSION = 2.4.0, BUILD = opencv-4.6.0-dev-openjp2-2.4.0
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for math.h
-- Looking for math.h - found
-- Looking for float.h
-- Looking for float.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for stdarg.h
-- Looking for stdarg.h - found
-- Looking for ctype.h
-- Looking for ctype.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for include file malloc.h
-- Looking for include file malloc.h - found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - not found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Looking for memalign
-- Looking for memalign - found
-- Performing Test HAVE_C_WNO_CAST_FUNCTION_TYPE
-- Performing Test HAVE_C_WNO_CAST_FUNCTION_TYPE - Success
-- OpenJPEG libraries will be built from sources: libopenjp2 (version "2.4.0")
-- math lib 'libm' not found; floating point support disabled
-- Performing Test HAVE_C_WNO_NULL_POINTER_SUBTRACTION
-- Performing Test HAVE_C_WNO_NULL_POINTER_SUBTRACTION - Success
-- Looking for semaphore.h
-- Looking for semaphore.h - found
-- Performing Test HAVE_CXX_WNO_SHADOW
-- Performing Test HAVE_CXX_WNO_SHADOW - Success
-- Performing Test HAVE_CXX_WNO_UNUSED
-- Performing Test HAVE_CXX_WNO_UNUSED - Success
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE
-- Performing Test HAVE_CXX_WNO_SIGN_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED
-- Performing Test HAVE_CXX_WNO_UNINITIALIZED - Success
-- Performing Test HAVE_CXX_WNO_SWITCH
-- Performing Test HAVE_CXX_WNO_SWITCH - Success
-- Performing Test HAVE_CXX_WNO_PARENTHESES
-- Performing Test HAVE_CXX_WNO_PARENTHESES - Success
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS
-- Performing Test HAVE_CXX_WNO_ARRAY_BOUNDS - Success
-- Performing Test HAVE_CXX_WNO_EXTRA
-- Performing Test HAVE_CXX_WNO_EXTRA - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_WNO_MISLEADING_INDENTATION
-- Performing Test HAVE_CXX_WNO_MISLEADING_INDENTATION - Success
-- Performing Test HAVE_CXX_WNO_DEPRECATED
-- Performing Test HAVE_CXX_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_WNO_SUGGEST_OVERRIDE - Success
-- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE
-- Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE - Success
-- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH
-- Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH - Success
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_COMPARE
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_REORDER
-- Performing Test HAVE_CXX_WNO_REORDER - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_RESULT
-- Performing Test HAVE_CXX_WNO_UNUSED_RESULT - Success
-- Performing Test HAVE_CXX_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION
-- Performing Test HAVE_CXX_WNO_IMPLICIT_CONST_INT_FLOAT_CONVERSION - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Success
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE - Success
-- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32
-- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF - Success
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Success
-- Looking for dlerror in dl
-- Looking for dlerror in dl - found
-- ADE: Downloading v0.1.2a.zip from https://github.com/opencv/ade/archive/v0.1.2a.zip
-- Allocator metrics storage type: 'int'
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse2.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse3.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.ssse3.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse4_1.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.sse4_2.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin128.avx512_skx.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin256.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin256.avx512_skx.cpp
-- Excluding from source files list: <BUILD>/modules/core/test/test_intrin512.avx512_skx.cpp
-- Excluding from source files list: modules/imgproc/src/corner.avx.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/resize.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/resize.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/resize.sse4_1.cpp
-- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': /data/data/com.termux/files/home/tmp/opencv/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
-- opencv_dnn: filter out ocl4dnn source code
-- opencv_dnn: filter out cuda4dnn source code
-- Excluding from source files list: modules/dnn/src/layers/fast_convolution/fast_convolution.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/int8layers/layers_common.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/int8layers/layers_common.avx512_skx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/int8layers/layers_common.lasx.cpp
-- Excluding from source files list: modules/features2d/src/fast.avx2.cpp
-- imgcodecs: OpenEXR codec is disabled in runtime. Details: https://github.com/opencv/opencv/issues/21326
-- highgui: using builtin backend: NONE
-- Android OpenCV Manager is ignored
--
-- General configuration for OpenCV 4.6.0-dev =====================================
--   Version control:               4.6.0-310-gfcf9f117b0
--
--   Platform:
--     Timestamp:                   2022-09-19T17:11:32Z
--     Host:                        Android 4.9.227-perf+ aarch64
--     CMake:                       3.24.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /data/data/com.termux/files/usr/bin/make
--     Configuration:               Release
--
--   CPU/HW features:
--     Baseline:                    NEON FP16
--
--   C/C++:
--     Built as dynamic libs?:      NO
--     C++ standard:                11
--     C++ Compiler:                /data/data/com.termux/files/usr/bin/c++  (ver 14.0.6)
--     C++ flags (Release):         -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments    -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments    -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /data/data/com.termux/files/usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments    -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Qunused-arguments    -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--as-needed -Wl,--no-undefined
--     Linker flags (Debug):        -Wl,--as-needed -Wl,--no-undefined
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          z dl m log
--     3rdparty dependencies:       libcpufeatures libprotobuf ade ittnotify libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf quirc tegra_hal
--
--   OpenCV modules:
--     To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 java python2 python3
--     Applications:                tests perf_tests
--     Documentation:               NO
--     Non-free algorithms:         NO
--
--   Android NDK:                   location:
--     Android ABI:
--     STL type:
--     Native API level:
--   Android SDK:                   (tools:  build tools: )
--
--   GUI:                           NONE
--
--   Media I/O:
--     ZLib:                        z (ver 1.2.12)
--     JPEG:                        build-libjpeg-turbo (ver 2.1.3-62)
--         SIMD Support Request:    YES
--         SIMD Support:            YES
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         build (ver 1.6.37)
--     TIFF:                        build (ver 42 - 4.2.0)
--     JPEG 2000:                   build (ver 2.4.0)
--     OpenEXR:                     build (ver 2.3.0)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
--
--   Video I/O:
--
--   Parallel framework:            pthreads
--
--   Trace:                         YES (with Intel ITT)
--
--   Other third-party libraries:
--     Eigen:                       NO
--     Custom HAL:                  YES (carotene (ver 0.0.1))
--     Protobuf:                    build (3.19.1)
--
--   Python (for build):            /data/data/com.termux/files/usr/bin/python3
--
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /data/data/com.termux/files/home/tmp/build

Thanks and regards...

How I accesed OpenCv with Termux:

  1. Made simple javascript/html code with index.html containing opencv code.
  2. Installed python on termux.
  3. Made http server from python.
  4. Opened localhost in browser.
    Be sure that your html code is working in desktop mode, its easier to debug it there.