Closed ww9rivers closed 4 years ago
This is the actual issue:
CMake Error at /usr/share/cmake-3.10/Modules/FindQt4.cmake:1320 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
cmake/OpenCVFindLibsGUI.cmake:30 (find_package)
CMakeLists.txt:669 (include)
To turn Qt4 off, use:
export CMAKE_ARGS="-DWITH_QT=OFF"
python setup.py bdist_wheel
Thank you for the response.
Your tip helps getting the build process to installation:
. . . . . .
-- Installing: /home/weiwang/ai/opencv-python/_skbuild/linux-aarch64-3.6/cmake-install/share/opencv4/lbpcascades/lbpcascade_frontalface_improved.xml
-- Installing: /home/weiwang/ai/opencv-python/_skbuild/linux-aarch64-3.6/cmake-install/share/opencv4/lbpcascades/lbpcascade_profileface.xml
-- Installing: /home/weiwang/ai/opencv-python/_skbuild/linux-aarch64-3.6/cmake-install/share/opencv4/lbpcascades/lbpcascade_silverware.xml
Copying files from CMake output
Traceback (most recent call last):
File "setup.py", line 392, in <module>
main()
File "setup.py", line 214, in main
cmake_source_dir=cmake_source_dir,
File "/home/weiwang/env/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 604, in setup
cmake_source_dir, skbuild_kw['cmake_install_dir'])
File "setup.py", line 304, in _classify_installed_files_override
if not found: raise Exception("Not found: '%s'" % relpath_re)
Exception: Not found: 'python/cv2[^/]*\.cpython\-36m\-aarch64\-linux\-gnu\.so'
I searched in the folder where I started the build and found no .so file at all.
I have done a clean up and rebuilt everything. Same result.
Going back to retry with libqt4-dev package installed.
That new error is not related to Qt. setup.py
is searching for the cv2
binary from that location. It might be located in a different place in your system or the build might have failed and the binary wasn't generated properly. I cannot help much since I have no Orange Pi / Armbian environment available.
Understood.
I suppose the build process creates the .so
libraries, correct? I did find that missing binary that setup.py
is looking for in the package installed through Armbian:
python3-opencv: /usr/lib/python3/dist-packages/cv2.cpython-36m-aarch64-linux-gnu.so
Also, installing the libqt4-dev
package allows the build to work.
Yes, the build generates single statically linked binary which ends on Linux with .so
.
That python3-opencv: /usr/lib/python3/dist-packages/cv2.cpython-36m-aarch64-linux-gnu.so
is the OpenCV version which you have installed via your system package manager (apt-get
or similar). That's completely different binary. The binaries created with the toolchain in this repository end up in cv2
subfolder under dist-packages
after you install the generated wheel file.
Expected behaviour
Expecting to build a binary package on an Orange Pi 3 running Armbian:
python setup.py bdist_wheel
Actual behaviour
Found in
/home/weiwang/ai/opencv-python/_skbuild/linux-aarch64-3.6/cmake-build/CMakeFiles/CMakeError.log
:Steps to reproduce
git clone git@github.com:skvark/opencv-python.git
Ubuntu 18.04.3 LTS
git clone git@github.com:skvark/opencv-python.git