I'm getting cmake error while installing termuxa opencv - python

CMake Error at cmake/android/OpenCVDetectAndroidSDK.cmake:49 (message):
Android SDK: specify path to Android SDK via ANDROID_SDK_ROOT /
ANDROID_HOME / ANDROID_SDK variables
Call Stack (most recent call first):
cmake/android/OpenCVDetectAndroidSDK.cmake:172 (ocv_detect_android_sdk)
CMakeLists.txt:761 (include)
-- Configuring incomplete, errors occurred!
See also "/data/data/com.termux/files/usr/lib/python3.10/opencv/build/CMakeFiles/CMakeOutput.log".
See also "/data/data/com.termux/files/usr/lib/python3.10/opencv/build/CMakeFiles/CMakeError.log".
I will install opencv on termux, but I get such an error, how can I solve it during configuration?
If my configuration is
LDFLAGS=" -llog -lpython3" cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=$PREFIX -DBUILD_opencv_python3=on -DBUILD_opencv_python2=off -DWITH_QT=OFF -DWITH_GTK=OFF ..

Related

CMake cant find installed Python Interpreter

My system is of Ubuntu 20.04 LTS having a python version 3.8.10. but while installing USRP open source tool chain UHD 3.14.0.0. there arises an error regarding python interpreter for cmake as follows
$ cmake ..
-
-- Configuring the python interpreter...
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.0")
-- Python interpreter: PYTHON_EXECUTABLE-NOTFOUND
-- Override with: -DPYTHON_EXECUTABLE=<path-to-python>
CMake Error at cmake/Modules/UHDPython.cmake:54 (message):
Error: Python interpreter required by the build system.
Call Stack (most recent call first):
cmake/Modules/UHDVersion.cmake:9 (include)
cmake/Modules/UHDPackage.cmake:9 (include)
CMakeLists.txt:110 (include)
-- Configuring incomplete, errors occurred!
See also "/home/capsys/workarea/uhd/host/build/CMakeFiles/CMakeOutput.log".
all the available python versions in my system as follows
$ python3 --version
Python 3.8.10`
$ ls /usr/bin/python*
/usr/bin/python3 /usr/bin/python3.8-config /usr/bin/python3.8-dbg /usr/bin/python3.8d-config /usr/bin/python3d /usr/bin/python3-dbg-config /usr/bin/python3-futurize
/usr/bin/python3.8 /usr/bin/python3.8d /usr/bin/python3.8-dbg-config /usr/bin/python3-config /usr/bin/python3-dbg /usr/bin/python3d-config /usr/bin/python3-pasteurize
why cant cmake find the installed libraries? is there any specific cmd to make cmake look for specific python library for build?
Do I need to install any specific version of python for this ?
$ cmake ..
-
-- Configuring the python interpreter...
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.0")
-- Python interpreter: PYTHON_EXECUTABLE-NOTFOUND
-- Override with: -DPYTHON_EXECUTABLE=<path-to-python>
CMake Error at cmake/Modules/UHDPython.cmake:54 (message):
Error: Python interpreter required by the build system.
Call Stack (most recent call first):
cmake/Modules/UHDVersion.cmake:9 (include)
cmake/Modules/UHDPackage.cmake:9 (include)
CMakeLists.txt:110 (include)
-- Configuring incomplete, errors occurred!
See also "/home/capsys/workarea/uhd/host/build/CMakeFiles/CMakeOutput.log".

Cmake error - Cmakeoutput error - trying to build APBS program with compiling

I am building a program called APBS, I cloned the GitHub repository, and ran cmake .. command.
I got the following error in 2 files (CMakeError.log and CMakeOutput.log files)
errors are:
Missing/invalid rpc/rpc.h header. XDR support disabled
Call Stack (most recent call first):
externals/fetk/maloc/CMakeLists.txt:49 (header_and_type_checks)
CMake Error at externals/fetk/maloc/src/CMakeLists.txt:40 (install):
install FILES given no DESTINATION!

cmake can't find Python3 but found version 3.8

Error using cmake, does not recongnize python3, but also says (found version "3.8").
I have Python 3.8.5 located in:
python3.8: /usr/bin/python3.8 /usr/lib/python3.8 /etc/python3.8 /usr/local/lib/python3.8 /usr/include/python3.8 /usr/share/man/man1/python3.8.1.gz
and also Python 2.7.18 in
python2: /usr/bin/python2 /usr/bin/python2.7 /usr/bin/python2.7-config /usr/lib/python2.7 /etc/python2.7 /usr/local/lib/python2.7 /usr/include/python2.7 /usr/share/man/man1/python2.1.gz
I also have the python development package updated (3.8.5-1~20.04).
I'm using cmake version 3.16.3
The error is this one:
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Python3 (missing: Interpreter) (found version "3.8")
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindPython/Support.cmake:2214 (find_package_handle_standard_args)
/usr/share/cmake-3.16/Modules/FindPython3.cmake:300 (include)
src/CMakeLists.txt:72 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/dani/ALE/build/CMakeFiles/CMakeOutput.log".
See also "/home/dani/ALE/build/CMakeFiles/CMakeError.log".
The error line in src/CMakeLists.txt is:
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)

Install fb-python on Linux machine

I am trying to install fb-python library -a bridge between Lua and Python:
https://github.com/facebookarchive/fblualib/tree/master/fblualib/python
on my Linux machine using the command
cd fblualib/fblualib/python
luarocks make rockspec/fbpython-0.1-1.rockspec
however all my attempts are encountering the error below:
cmake -E make_directory build &&
cd build &&
cmake -DROCKS_PREFIX=/home/current_user/torch/install/lib/luarocks/rocks/fbpython/0.1-1 \
-DROCKS_LUADIR=/home/current_user/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lua \
-DROCKS_LIBDIR=/home/current_user/torch/install/lib/luarocks/rocks/fbpython/0.1-1/lib \
.. &&
make
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
REQUIRED_ARGS (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315
(_FPHSA_FAILURE_MESSAGE)
cmake/FindGlog.cmake:21 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:27 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
The file throwing the error is this: https://github.com/facebookarchive/fblualib/blob/master/fblualib/cmake/FindGlog.cmake
However, I have installed the Glog library https://github.com/google/glog/releases: given that I don't have sudo access to the machine, I set ./configure to a custom location that I probably need to specify now for the GLOG_INCLUDE_DIR and GLOG_LIBRARY flags. How to do this? Any suggestion is appreciated. Thank you!

Issue with Boost and CMake on Mac Sierra when install dlib

So I've installed Boost via brew, similarly installed with cmake and python:
brew install boost --with-python3
brew install boost-python
brew install cmake
I'm currently using miniconda3 (python3.6) and am trying to install Dlib. So far I can install dlib fine, but when it comes to python setup, it fails. Dlib can be obtained by cloning the repo dlib_repo
Here I do python setup.py install, Getting the following errors
-- Detecting CXX compile features - done
CMake Warning at /usr/local/Cellar/cmake/3.7.2/share/cmake/Modules/FindBoost.cmake:1518 (message):
No header defined for python-py34; skipping header check
Call Stack (most recent call first):
/Users/userx/dlib/dlib/cmake_utils/add_python_module:61 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Could NOT find Boost
CMake Warning at /usr/local/Cellar/cmake/3.7.2/share/cmake/Modules/FindBoost.cmake:1518 (message):
No header defined for python-py35; skipping header check
Call Stack (most recent call first):
/Users/userx/dlib/dlib/cmake_utils/add_python_module:63 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Could NOT find Boost
CMake Warning at /usr/local/Cellar/cmake/3.7.2/share/cmake/Modules/FindBoost.cmake:1518 (message):
No header defined for python3; skipping header check
Call Stack (most recent call first):
/Users/userx/dlib/dlib/cmake_utils/add_python_module:66 (FIND_PACKAGE)
CMakeLists.txt:6 (include)
-- Boost version: 1.61.0
-- Found the following Boost libraries:
-- python3
-- Found PythonLibs: /Users/userx/miniconda3/lib/libpython3.5.dylib (found suitable version "3.5.2", minimum required is "3.4")
-- USING BOOST_LIBS: /Users/userx/miniconda3/lib/libboost_python3.dylib
-- USING PYTHON_LIBS: /Users/userx/miniconda3/lib/libpython3.5.dylib
...
...
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [dlib_build/CMakeFiles/dlib.dir/gui_widgets/fonts.cpp.o] Error 1
make[1]: *** [dlib_build/CMakeFiles/dlib.dir/all] Error 2
make: *** [all] Error 2
error: cmake build failed!
So here, I felt cmake couldn't find the boost variables, so I added these to my .bashrc and restarted my shell.
export BOOST_ROOT="/usr/local/Cellar/boost/1.63.0"
export BOOST_INCLUDE="/usr/local/Cellar/boost/1.63.0/include"
export BOOST_LIBDIR="/usr/local/Cellar/boost/1.63.0/lib"
Note these paths were found them via brew info and checked them to ensure correctness.
I'm using a macbook with Sierra OS - as I know Sierra has changed the way a lot of builds happen.
I have also tried to remove boost and download from the site and build directly, but same problem persists.
Any help much appreciated
It might be caused by the CMAKE_PREFIX_PATH setting.
I met the same problem and I solved it by this sequence:
First I install the boost using this:
brew install boost-python --with-python3
then I found the BOOST Not Found error when running the following commands to install the dlib 19.7.0:
pip install dlib --upgrade
So I edit the Bash Profile with following commands:
nano ~/.bash*le
and add the following line into this file:
export CMAKE_PREFIX_PATH="/usr/local:/usr/local/Cellar/boost/1.65.1:$PATH"
Notice
I am using the boost 1.65.1, which is installed at /usr/local/Cellar/boost/1.65.1, you might change it to the location that you install boost with brew.
after this step, I run pip install dlib --upgrade again on both python2.7.14 and 3.6.1 and 3.6.3, everything goes on the right way now.
I did the same in my system, except for one difference:
python3 setup.py install
Instead of
python setup.py install
And I don't see that error.

Categories